so here's my hook
void (*old_isPremium)(void *instance);
void isPremium(void *instance) {
instanceBtn = instance;
if (instance != NULL) {
if (Premium) {
*(bool *) ((uint32_t) instance + 0x320) = true;
}
}
return old_isPremium(instance);
}
HOOK_LIB("libil2cpp.so", "0x156C100", isPremium, old_isPremium);
and then my switch case
case 5:
Premium = boolean;
break;
would this be the correct way to make it modify the value when the switch is on and then return when off?
void (*old_isPremium)(void *instance);
void isPremium(void *instance) {
instanceBtn = instance;
if (instance != NULL) {
if (Premium) {
*(bool *) ((uint32_t) instance + 0x320) = true;
}
}
return old_isPremium(instance);
}
HOOK_LIB("libil2cpp.so", "0x156C100", isPremium, old_isPremium);
and then my switch case
case 5:
Premium = boolean;
break;
would this be the correct way to make it modify the value when the switch is on and then return when off?