Saturday, 3 June 2023

How to call the function? (iOS jailbreak)

Hi I'm trying to call a function in the game Hide N Seek : Mini Games. Here is my code, (I just need to call any function): function dump: //RVA: 0x11FE288 Offset: 0x11FE288 VA: 0x11FE288 private void Update() { } #include <unistd.h> #include <dispatch/dispatch.h> #include <mach-o/dyld.h> uintptr_t getExecAddr(uintptr_t addr) { const struct mach_header* header = _dyld_get_image_header(341); // this is the library index, it's so big because I'm using a debugger so far. if (header == NULL){return 0;} uintptr_t libLoadAddr = (uintptr_t)header; uintptr_t exec_addr = libLoadAddr + addr; return exec_addr; } void (*Update)(); %ctor { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ sleep(15); // wait for all libraries to load Update = (void(*)())getExecAddr(0x11FE288); Update(); }); } The game crashes when the moment comes to call the function. What am I doing wrong?

from iOSGods RSS Feed https://ift.tt/nA9rO0p

No comments:

Post a Comment