Skip to content

Commit 68bc75b

Browse files
committed
Generalize release function pattern
1 parent 3737c72 commit 68bc75b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shared/sdk/REManagedObject.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,11 @@ void resolve_release() {
5454
// because we need to make sure we don't resolve release to the same function.
5555
resolve_add_ref();
5656

57-
constexpr std::array<std::string_view, 3> possible_patterns{
57+
constexpr std::array<std::string_view, 4> possible_patterns{
5858
"40 53 48 83 EC ? 8B 41 08 48 8B D9 85 C0 0F", // RE2+
5959
"40 53 48 83 EC ? 8B 41 08 48 8B D9 48 83 C1 08 85 C0 78", // RE7
60-
"41 57 41 56 41 55 41 54 56 57 55 53 48 83 EC ? 48 8B 05 ? ? ? ? 48 31 E0 48 89 44 24 30 8B 41 08", // MHWILDS+ (or unoptimized compiler builds?)
60+
// In MHWilds TU4, last ? is 0x40, while older is 0x30. The instruction is "mov [rsp+30h(TU3)/40h(TU4)], rax"
61+
"41 57 41 56 41 55 41 54 56 57 55 53 48 83 EC ? 48 8B 05 ? ? ? ? 48 31 E0 48 89 44 24 ? 8B 41 08", // MHWILDS+ (or unoptimized compiler builds?)
6162
};
6263

6364
spdlog::info("[REManagedObject] Finding release function...");

0 commit comments

Comments
 (0)