Skip to content

Commit

Permalink
Add a more specific RunFinalizer signature for Summer Vacation! Scram…
Browse files Browse the repository at this point in the history
…ble (#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.
  • Loading branch information
y0soro authored Jan 11, 2025
1 parent 3f97933 commit a096080
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ private void Hook(IntPtr obj, IntPtr data)
xref = false
},
new()
{
// Summer Vacation! Scramble - 2021.3.33 (x64)
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",
mask = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
xref = false,
},
new()
{
// Test Game - 2021.3.22 (x64)
pattern = "\x40\x53\x48\x83\xEC\x20\x48\x8B\xD9\x48\xC7\x44\x24\x30\x00\x00\x00\x00\x48\x8B",
Expand Down

0 comments on commit a096080

Please sign in to comment.