i play this unity game, gearblocks, and im trying to mod python scripting into the game
i want to have a python process hook into the game in a similar way like this C++ win32 code
uintptr_t FindPatternIDA(const char* szSignature)
{
MODULEINFO modInfo;
GetModuleInformation(GetCurrentProcess(), GetModuleHandleA(NULL), &modInfo, sizeof(MODULEINFO));
uintptr_t startAddress = (uintptr_t)GetModuleHandleA(NULL);
uintptr_t endAddress = (startAddress + (uintptr_t)modInfo.SizeOfImage);
const char* pat = szSignature;
uintptr_t firstMatch = 0;
for (uintptr_t pCur = startAddress; pCur < endAddress; pCur++) {
if (!*pat) return firstMatch;
if (*(PBYTE)pat == ('\?') || *(BYTE*)pCur == get_byte(pat)) {
if (!firstMatch) firstMatch = pCur;
if (!pat[2]) return firstMatch;
if (*(PWORD)pat == ('\?\?') || *(PBYTE)pat != ('\?')) pat += 3;
else pat += 2;
}
else {
pat = szSignature;
firstMatch = 0;
}
}
printf("[Error] Unable to find memory pattern!\n");
return NULL;
}
is there some way for me to probe memory and obtain pointers in python like you can in c?