Код: Выделить всё
DWORD mainModule = (DWORD)GetModuleHandle("GAME.exe");
auto CatchTheValue(uintptr_t BaseAddr, std::vector Offsets) {
try {
uintptr_t addr = (DWORD)(mainModule + BaseAddr);
auto value = NULL;
for (unsigned int i = 0; i < Offsets.size(); ++i)
{
if (IsBadReadPtr((uintptr_t*)addr, sizeof(uintptr_t)))
{
return NULL; // Invalid address
}
addr = *(uintptr_t*)addr;
addr += Offsets[i];
}
if ((DWORD)addr > (DWORD)0x00400000) {
value = *reinterpret_cast(addr);
}
return value;
}
catch (...) { return NULL; }
}
Код: Выделить всё
int check_value(){
return CatchTheValue(0xDEADBEEF, {0x1BD8} );
}
Код: Выделить всё
int check_value(){
return CatchTheValue(0xDEADBEEF, {0x10, 0x10, 0x140} );
}
Подробнее здесь: https://stackoverflow.com/questions/798 ... ll-address
Мобильная версия