diff --git a/Memory/Hooks.cpp b/Memory/Hooks.cpp index b4f6fed5..c00940b1 100644 --- a/Memory/Hooks.cpp +++ b/Memory/Hooks.cpp @@ -1584,7 +1584,15 @@ __int64 Hooks::PaintingRenderer__render(__int64 _this, __int64 a2, __int64 a3) { bool Hooks::DirectoryPackAccessStrategy__isTrusted(__int64 _this) { static auto func = g_Hooks.DirectoryPackAccessStrategy__isTrustedHook->GetFastcall(); - if (Utils::getRttiBaseClassName(reinterpret_cast(_this)) == "DirectoryPackAccessStrategy") + static uintptr_t** directoryPackAccessStrategyVtable = 0; + + if (!directoryPackAccessStrategyVtable) { + uintptr_t sigOffset = FindSignature("48 8D 05 ?? ?? ?? ?? 49 89 06 49 8D 76 50"); + int offset = *reinterpret_cast(sigOffset + 3); + directoryPackAccessStrategyVtable = reinterpret_cast(sigOffset + offset + 7); + } + + if (*reinterpret_cast(_this) == (uintptr_t)directoryPackAccessStrategyVtable) return true; return func(_this);