Skip to content

Commit

Permalink
Fix ResourceToken::OnLoaded pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
wopss committed Sep 22, 2023
1 parent 7c75147 commit 74d2b89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def get_groups() -> List[Group]:
Group(name='ResourceToken', functions=[
Item(name='dtor', pattern='48 89 5C 24 10 57 48 83 EC 20 8B 41 58 48 8B D9 85 C0 74'),
Item(name='Fetch', pattern='40 53 48 83 EC 50 48 8B D9 E8 ? ? ? ? 84 C0 74 0A 48 8D 43 28'),
Item(name='OnLoaded', pattern='48 89 5C 24 18 48 89 74 24 20 55 57 41 56 48 8B EC 48 83 EC 60 48 8D 79 18 48 8B F1'), # different call than previous version
Item(name='OnLoaded', pattern='48 8B C4 48 89 58 ? 48 89 70 ? 48 89 78 ? 55 48 8D 68 ? 48 81 EC ? ? ? ?', expected=680, index=159),
Item(name='CancelUnk38', pattern='F6 05 5D ? ? ? ? 75 07 48 83 79 68 FF 75 01 C3'),
Item(name='DestructUnk38', pattern='40 53 48 83 EC 30 48 8B D9 E8 ? ? ? ? 84 C0 75 ? 48 83 C4 30 5B C3', expected=194, index=27)
]),
Expand Down

3 comments on commit 74d2b89

@maximegmd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this is the proper way to do it, 680 matches will mess up ordering at some point, an xref to the pattern I used is way better.

@Lukas0610
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also add 48 8B F2 48 8B D9 48 8B D1 to the pattern, shrinks the results down to 2 with the function being at index 0, but it makes quite the big pattern.

@wopss
Copy link
Owner Author

@wopss wopss commented on 74d2b89 Sep 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added more to the pattern to make it more specific. I will go one more time through the patterns and after we are done.

Please sign in to comment.