yo @Batch i did this
#include <mach/arm/thread_status.h>
uint64_t canBuyHandle = 0;
uint64_t gemsHandle = 0;
void specter_CanBuy_Handler(void *ctx) {
arm_thread_state64_t *regs = (arm_thread_state64_t *)ctx;
mem_brk_suspend_self();
if (menu && [menu getToggleValue:0 withTitle:@"Always Buy"]) {
regs->__x[0] = 1; // Force return TRUE
}
mem_brk_resume_self();
}
void specter_AddOrRemoveGems_Handler(void *ctx) {
arm_thread_state64_t *regs = (arm_thread_state64_t *)ctx;
mem_brk_suspend_self();
if (menu && [menu getToggleValue:0 withTitle:@"Infinite Gems"]) {
// Always force the gem transaction to be a massive gain
regs->__x[1] = 999999;
}
mem_brk_resume_self();
}
void hooks() {
uintptr_t base = 0;
int32_t initStatus = mem_init("UnityFramework", &base);
if (initStatus == MEM_OK) {
// Install Breakpoints
// Remember to clean your build (make clean) before running this
mem_brk_install(0xDA4D70, (uintptr_t)specter_CanBuy_Handler, &canBuyHandle);
mem_brk_install(0xDA7F50, (uintptr_t)specter_AddOrRemoveGems_Handler, &gemsHandle);
NSLog(@"[SilentPwn] Hardware Breakpoints deployed.");
} else {
NSLog(@"[SilentPwn] Error: mem_init failed with code: %d", initStatus);
}
it kinda work because the game dint crash at startup the menu loaded, but they dont work, one of the hook (canBuy) crashes the game after 10seconds after toggling, and also it disabled me from buying anything, know this is maybe because of my callback code i may be hooked a wrong instructions,
but i wanna ask if i could directly apply a hex value to it as the callback of the breakpoint since i think that is how i made it to work using iGG