Skip to content

Commit a096080

Browse files
authored
Add a more specific RunFinalizer signature for Summer Vacation! Scramble (#199)
The "Test Game" signature is a bit general that it matched `MS.Internal.Xml.Cache.XPathDocumentNavigator$$MoveToId` in Summer Vacation! Scramble(SVS) assembly, causing NULL finalier access crashes due to HasFinalize not being handled. The one actually matched RunFinalizer in SVS is "V Rising" signature, though it's listed after the "Test Game" signature. Although a simple reorder can fix the issue for SVS, both signatures mentioned are quiet general so this could breaks other games relying on this matching order, otherwise the same crash can happen due to hooking on the wrong location. Thus I instead add a more specific signature that should solely matches RunFinalizer on SVS or other games with similar compilation options before the too general one.
1 parent 3f97933 commit a096080

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Il2CppInterop.Runtime/Injection/Hooks/GarbageCollector_RunFinalizer_Patch.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ private void Hook(IntPtr obj, IntPtr data)
3838
xref = false
3939
},
4040
new()
41+
{
42+
// Summer Vacation! Scramble - 2021.3.33 (x64)
43+
pattern = "\x48\x89\x5c\x24\x10\x48\x89\x74\x24\x18\x57\x48\x83\xec\x20\x48\x8b\x19\x33\xff\x48\x89\x7c\x24\x30\x48\x8b\xf1\xf6\x83\x32\x01\x00\x00\x02\x75\x08\x48\x8b\xcb\xe8",
44+
mask = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
45+
xref = false,
46+
},
47+
new()
4148
{
4249
// Test Game - 2021.3.22 (x64)
4350
pattern = "\x40\x53\x48\x83\xEC\x20\x48\x8B\xD9\x48\xC7\x44\x24\x30\x00\x00\x00\x00\x48\x8B",

0 commit comments

Comments
 (0)