Viktorovich31
Platinian
Please tell me, am I calling the "LocalStore" class correctly, in which I need to change the field "int _coinCount; // 0x3C"?
Code:
void* LocalStore;
void (*old_update)(void* instance);
void update(void* instance){
if(instance != NULL && LocalStore != NULL){
*(int *)((uint64_t)LocalStore + 0x3C) = 999;
}
old_update(instance);
}
__attribute__((constructor))
void libhook_main() {
do {
sleep(1);
} while (!isLibraryLoaded(OBFUSCATE("libil2cpp.so")));
LOGI(OBFUSCATE("lib loaded"));
HOOK_LIB("libil2cpp.so", "0x9A1F34", update, old_update);
LOGI(OBFUSCATE("lib hooked"));
}