You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (IsBadReadPtr(*(void**)vtable, sizeof(uintptr_t)))
110
+
if (IsBadReadPtr(*(void**)classInstanceWithVtablePtr, sizeof(uintptr_t)))
111
111
{
112
112
return"";
113
113
}
114
114
115
115
116
-
v2* v = (v2*)vtable;
116
+
v2* v = (v2*)classInstanceWithVtablePtr;
117
117
try {
118
118
// Validate that we have a RTTI enabled type
119
-
if (!*reinterpret_cast<uintptr_t*>(vtable)) // vtable points to nothing, if it were a vtable there would be a function pointer there
119
+
if (!*reinterpret_cast<uintptr_t*>(classInstanceWithVtablePtr)) // vtable points to nothing, if it were a vtable there would be a function pointer there
result = memorySections.findInMemoryPattern("\x48\x89\x5C\x24\x00\x48\x89\x74\x24\x00\x57\x48\x83\xEC\x20\xFF\x41\x00\x33\xF6\x48\x8B\x41\x00\x48\x8B\xD9\x48\x3B\xC1\x74\x00\x48\x85\xC0\x74\x00\x48\x83\xC0\xE0\x0F\x85\x00\x00\x00\x00\x48\x8B\x41\x00\x48\x8D\x79\x00\x48\x3B\xC7\x74\x00\x48\x85\xC0\x74\x00\x48\x83\xC0\xE0\x0F\x85\x00\x00\x00\x00\x48\x63\x51\x00\x48\x8B\x0D\x00\x00\x00\x00\x4C\x8B\xC2\x48\x8B\x01\xFF\x50\x00\x4C\x8B\xC0\x48\x85\xC0\x0F\x84\x00\x00\x00\x00\x48\x89\x70\x00\x48\x8D\x50\x00\x48\x89\x70\x00\x48\x85\xC0\x89\x30\x48\x0F\x44\xD6\x89\x70\x00\x48\x89\x58\x00\x48\x8B\x47\x00\x48\x89\x10\x48\x8B\x47\x00\x49\x89\x40\x00\x49\x89\x78\x00\xFF\x47\x00\x48\x89\x57\x00\x44\x8B\x4B\x00\x8B\x53\x00\x41\xFF\xC9\x4C\x63\x53\x00\x44\x0F\xAF\xCA\x49\x83\xC2\x30\x4D\x03\xD0\x49\x8B\xCA\x4D\x03\xCA\x4D\x3B\xD1\x73\x00\x66\x66\x66\x0F\x1F\x84\x00\x00\x00\x00\x00\x8B\xC2\x48\x03\xC1", "xxxx?xxxx?xxxxxxx?xxxxx?xxxxxxx?xxxx?xxxxxx????xxx?xxx?xxxx?xxxx?xxxxxx????xxx?xxx????xxxxxxxx?xxxxxxxx????xxx?xxx?xxx?xxxxxxxxxxx?xxx?xxx?xxxxxx?xxx?xxx?xx?xxx?xxx?xx?xxxxxx?xxxxxxxxxxxxxxxxxxxxx?xxxxxxx????xxxxx");
246
+
}
247
+
196
248
return result;
197
249
});
198
250
auto future_poolFuncDealloc = std::async([&]() {
@@ -330,47 +382,21 @@ namespace intercept {
330
382
constchar* test = getRTTIName((uintptr_t)(&allocatorVtablePtr));
331
383
assert(strcmp(test, "12MemFunctions") == 0);
332
384
#else
333
-
constchar* test = getRTTIName(allocatorVtablePtr);
334
-
bool vc143Allocator = false;
385
+
constchar* test = getRTTIName((uintptr_t)(&allocatorVtablePtr));
386
+
constexprbool vc143Allocator = true;
335
387
if (strlen(test) == 0 || strcmp(test, ".?AVMemTableFunctions@@") != 0) {
336
-
allocatorVtablePtr -= 0x4B8; // vc143 build
337
-
test = getRTTIName(allocatorVtablePtr);
338
-
339
-
if (strlen(test) == 0 || strcmp(test, ".?AVMemTableFunctions@@") != 0) {
340
-
// Okey... Lets go nuts.
341
-
allocatorVtablePtr -= 0x200;
342
-
343
-
auto canBeVtable = [&memorySections](uintptr_t value) {
0 commit comments