Skip to content

Commit 56bf1da

Browse files
committed
Add extra signatures for V Rising and use first xref for MetadataCache
1 parent 8ea82dd commit 56bf1da

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

Il2CppInterop.Runtime/Injection/Hooks/Class_GetFieldDefaultValue_Hook.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ internal unsafe class Class_GetFieldDefaultValue_Hook : Hook<Class_GetFieldDefau
4242
mask = "xxxxxxxxxxxxxx?xxxxxxxxxxxxx",
4343
xref = false
4444
},
45+
46+
// V Rising - Unity 2022.3.23 (x64)
47+
new MemoryUtils.SignatureDefinition
48+
{
49+
pattern = "\x48\x89\x5C\x24\x08\x48\x89\x74\x24\x10\x57\x48\x83\xEC\x40\x48\x8B\x41\x10",
50+
mask = "xxxxxxxxxxxxxxxxxxx",
51+
xref = false
52+
},
4553
// GTFO - Unity 2019.4.21 (x64)
4654
new MemoryUtils.SignatureDefinition
4755
{

Il2CppInterop.Runtime/Injection/Hooks/GarbageCollector_RunFinalizer_Patch.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ private void Hook(IntPtr obj, IntPtr data)
4343
pattern = "\x40\x53\x48\x83\xEC\x20\x48\x8B\xD9\x48\xC7\x44\x24\x30\x00\x00\x00\x00\x48\x8B",
4444
mask = "xxxxxxxxxxxxxxxxxxxx",
4545
xref = false,
46+
},
47+
new()
48+
{
49+
// V Rising - 2022.3.23 (x64)
50+
pattern = "\x48\x89\x5C\x24\x10\x48\x89\x74\x24\x18\x57\x48\x83\xEC\x20\x48\x8B\x19",
51+
mask = "xxxxxxxxxxxxxxxxxx",
52+
xref = false,
4653
}
4754
};
4855

Il2CppInterop.Runtime/Injection/Hooks/MetadataCache_GetTypeInfoFromTypeDefinitionIndex_Hook.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private IntPtr FindGetTypeInfoFromTypeDefinitionIndex(bool forceICallMethod = fa
6161
var imageGetClassAPI = InjectorHelpers.GetIl2CppExport(nameof(IL2CPP.il2cpp_image_get_class));
6262
Logger.Instance.LogTrace("il2cpp_image_get_class: 0x{ImageGetClassApiAddress}", imageGetClassAPI.ToInt64().ToString("X2"));
6363

64-
var imageGetType = XrefScannerLowLevel.JumpTargets(imageGetClassAPI).Single();
64+
var imageGetType = XrefScannerLowLevel.JumpTargets(imageGetClassAPI).First();
6565
Logger.Instance.LogTrace("Image::GetType: 0x{ImageGetTypeAddress}", imageGetType.ToInt64().ToString("X2"));
6666

6767
var imageGetTypeXrefs = XrefScannerLowLevel.JumpTargets(imageGetType).ToArray();

0 commit comments

Comments
 (0)