Help! hooking function

power2020202020

Solid & Active Platinian
Hello, I'm hoking my game with this function

bool IsEnemy = *(bool*)((uint64_t)instance + 0x8C)

But my game is not working with hoking and also my game is 32 bits I must change the ((uint64_t) to ((uint32_t) for it to work or whatever when hooking? and my cell phone is also 32
bits and not 64 bits Does this affect the mod menu when it works?
 
bool GoldUpdates = false;

void (*old_EnoughUpdate)(void *instance);
void EnoughUpdate(void *instance) {
if(instance != NULL) {
if (GoldUpdates) {
*(bool*)((uint64_t)instance + 0x8C) = true;
}
}
old_EnoughUpdate(instance);
}

A64hookfunction((void *)getAbsoluteAddress("libil2cpp.so", 0x7273A2), (void *) EnoughUpdate, (void **) &old_EnoughUpdate);
 
You can still use uint64_t
Can you show full hook, how you're using that function?
bool GoldUpdates = false;

void (*old_EnoughUpdate)(void *instance);
void EnoughUpdate(void *instance) {
if(instance != NULL) {
if (GoldUpdates) {
*(bool*)((uint64_t)instance + 0x8C) = true;
}
}
old_EnoughUpdate(instance);
}

A64hookfunction((void *)getAbsoluteAddress("libil2cpp.so", 0x7273A2), (void *) EnoughUpdate, (void **) &old_EnoughUpdate);
 
Back
Top Bottom