Help! hooking function

power2020202020

Solid & Active Platinian
Original poster
Nov 3, 2022
58
15
8
34
brazil
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?
 

libModz

Awesome Active Platinian
Jun 2, 2022
167
29
28
UK
You can still use uint64_t
Can you show full hook, how you're using that function?
 

power2020202020

Solid & Active Platinian
Original poster
Nov 3, 2022
58
15
8
34
brazil
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);
 

power2020202020

Solid & Active Platinian
Original poster
Nov 3, 2022
58
15
8
34
brazil
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);