Monday, 11 July 2022

Hooking in LGL Mod Menu

So im trying to make my OP mod menu for BTD6 over to android but its not letting me call a function. ive tried many ways with no luck using LGL Mod Menu. im trying to call this void as i did in iOS version (this code is from android version) // RVA: 0xC74969 Offset: 0xC74969 VA: 0xC74969 Slot: 57 public virtual void WinMatch() { } and for the mshook i use simulation on ios version but there is also a update function aswell // RVA: 0xC6A167 Offset: 0xC6A167 VA: 0xC6A167 Slot: 19 public virtual void Simulate() { } // RVA: 0xC74246 Offset: 0xC74246 VA: 0xC74246 Slot: 53 public virtual void Update(float delta) { } this is how i had my setup auto WinMatch = reinterpret_cast<void(*) (void *)>(getAbsoluteAddress(targetLibName, 0xC74969)); void (*old_DT1)(void *instance); void DT1(void *instance) { if (instance != NULL && WinToggle) { WinMatch(instance); } return old_DT1(instance); } MSHookFunction((void *)getAbsoluteAddress(targetLibName, 0xC6A167), (void *) DT1, (void **) &old_DT1); also tried this WinMatch = (void (*)(void *)) getAbsoluteAddress("libil2cpp.so", 0xC74969); and this is the button case case 11: WinToggle = !WinToggle; break; hope someone can help me with this as ive been trying many tutorials and many ways with no luck for 2 days now but cant find a way to make this work. i found some that say this but where would i hook into the update or simulation function void (*old_WinMatch)(void *instance); void WinMatch(void *instance) { if(instance != NULL && WinToggle) { old_WinMatch(instance); } old_WinMatch(instance); } MsHookFunction((void*)getAbsoluteAddress(targetLibName, 0xC74969), (void*) WinMatch, (void**) &old_WinMatch); thank you in advanced if you can help me with this

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

No comments:

Post a Comment