Can someone more experienced show the error?
I'm trying to hook a field that doesn't have an update but something is going wrong, could someone show me the error?
I'm trying to hook a field that doesn't have an update but something is going wrong, could someone show me the error?
C++:
bool Coin;
void (*old_update)(void* _this);
void update(void* _this) {
if(_this != NULL) {
void *MoneyClass = *(void**)((uint64_t)_this + 0x20);
{
if(Coin != NULL) {
*(int *) ((uint64_t) MoneyClass + 0x10) = 999;
}
}
}
old_update(_this);
}
MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x81C0EC), (void *) update, (void **) &old_update);