Jump to content

(Solved) Hooking in LGL Mod Menu


Go to solution Solved by Parxdy,

10 posts in this topic

Recommended Posts

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

Updated by Parxdy
Link to comment
https://iosgods.com/topic/160391-solved-hooking-in-lgl-mod-menu/
Share on other sites

  • Solution

the way i was able to solve this to call a method is to make sure you change your targetLibName the il2cpp lib under the includes in main.cpp

#define targetLibName OBFUSCATE("libil2cpp.so")

Have these under the includes:

bool WinToggle;
void (*WinMatch)(void *instance);
void (*old_Update)(void *instance, float delta);
void Update(void *instance, float delta) {
    if(instance != NULL && WinToggle) {
        WinMatch(instance);
    }
    old_Update(instance, delta);
}

then in your "void *hack_thread(void *)" make sure your lib is loaded first and call your MSHook then add your method you want to call

do {
    sleep(1);
} while (!isLibraryLoaded(targetLibName));
MSHookFunction((void*)getAbsoluteAddress(targetLibName, OFFSET), (void*)Update, (void **)&old_Update);
WinMatch= (void (*)(void *))getAbsoluteAddress(targetLibName, OFFSET);

under your features put a toggle

OBFUSCATE("101_Toggle_Auto Win Game"),

then make a case for that toggle under "switch (featNum)"

case 101:
    WinToggle = boolean;
    break;

you have to set = boolean; at the end or it wont work

if you have any questions PM me

Updated by Parxdy

@Parxdy how can I hook a void offset through hooking in an lgl mod menu for android? (private void) I have an iphone but I'm attempting for an android. the offset is 0xD45BC0. I was using a mod menu by nepmods that originally that had me just type in the offset and an update offset under a hook void offset setting. I was using an update that updated a class for stats. That update offset was 0x95F740C. is there a way to still update the void offset with that class update offset? And possibly place it into the menu itself.. I'd be grateful for a solution,
This is how I put it into the menu, but it didn't work.
I've also tried 1 and 0 instead of true and false, but that didn't work either.
I've looked all over google and YouTube but I cannot find anything.
thanks!
---

void (*old_changeHeart)(void *instance);
void changeHeart1(void *instance) {
    if (instance != NULL) {
        if (isHeart) {
            *(bool *)((uint64_t)instance + 0xD45BC0) = true;
        }
    }
    old_changeHeart(instance);
}

---

A64HookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x95F740C), (void *)changeHeart1, (void **)&old_changeHeart);
  • Like 1
On 7/20/2022 at 1:26 AM, Parxdy said:
case 101:
    WinToggle = boolean;
    break;

you have to set = boolean; at the end or it wont work

Sir what did you mean by you have set = boolean; at the end or it won't work. Did you are trying to say we should not set boolean at end in case..........

On 3/27/2023 at 3:28 PM, confusion99 said:

@Parxdy how can I hook a void offset through hooking in an lgl mod menu for android? (private void) I have an iphone but I'm attempting for an android. the offset is 0xD45BC0. I was using a mod menu by nepmods that originally that had me just type in the offset and an update offset under a hook void offset setting. I was using an update that updated a class for stats. That update offset was 0x95F740C. is there a way to still update the void offset with that class update offset? And possibly place it into the menu itself.. I'd be grateful for a solution,
This is how I put it into the menu, but it didn't work.
I've also tried 1 and 0 instead of true and false, but that didn't work either.
I've looked all over google and YouTube but I cannot find anything.
thanks!
---

void (*old_changeHeart)(void *instance);
void changeHeart1(void *instance) {
    if (instance != NULL) {
        if (isHeart) {
            *(bool *)((uint64_t)instance + 0xD45BC0) = true;
        }
    }
    old_changeHeart(instance);
}

---

A64HookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x95F740C), (void *)changeHeart1, (void **)&old_changeHeart);

@Parxdy please help us, I've been this for 3 days, the off switch is not working, if i turn on once and it's turned on forever

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Our picks

    • Sneaky Sasquatch Cheats v2.0.5 +3
      Modded/Hacked App: Sneaky Sasquatch By RAC7 Games
      Bundle ID: com.rac7.SneakySasquatch
      iTunes Store Link: https://apps.apple.com/us/app/sneaky-sasquatch/id1098342019?uo=4


      Hack Features:
      - Infinite Gold
      - Unlock All
      - No Hunger


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/148262-sneaky-sasquatch-v172-jailed-cheats-3/


      iOS Hack Download Link: https://iosgods.com/topic/148261-sneaky-sasquatch-cheats-v172-3/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 171 replies
    • Jetpack Joyride 2 v3.4.10 Jailed Cheats +1
      Modded/Hacked App: Jetpack Joyride 2 By Halfbrick
      Bundle ID: com.halfbrick.jetpackjoyride2
      iTunes Store Link: https://apps.apple.com/us/app/jetpack-joyride-2/id1598096399?uo=4


      Hack Features:
      - Infinite Currencies


      iOS Hack Download Link: https://iosgods.com/topic/141408-jetpack-joyride-2-v3410-jailed-cheats-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 201 replies
    • Asphalt 8: Airborne+ Cheats v2.3.0 +4 [ Apple Arcade ]
      Modded/Hacked App: Asphalt 8: Airborne+ By Gameloft
      Bundle ID: com.gameloft.asphalt8arcade
      iTunes Store Link: https://apps.apple.com/us/app/asphalt-8-airborne/id1563005359?uo=4


      Hack Features:
      - No Car Crash
      - Infinite Nitro
      - Unlock All Cars
      - No Speed Limit


      iOS Hack Download Link: https://iosgods.com/topic/148777-asphalt-8-airborne-cheats-v101-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 391 replies
    • My Cafe — Restaurant game Cheats v2024130.3.633 +3
      Modded/Hacked App: My Cafe — Restaurant game by Melsoft
      Bundle ID: com.Melesta.MyCafe
      iTunes Store Link: https://apps.apple.com/us/app/my-cafe-restaurant-game/id1068204657?uo=4&at=1010lce4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate or Substitute.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - Unlimited Gems
      - VIP Level 7 (probably visual)


      Notes:
      - To get unlimited gems, just get some gems from the customers.
      - If you purchase using gems from certain places like the VIP Store, it will cause you to restart the game
      - If you have "a lot" gems, you can turn off cheats to see if it works without the hax.
      - "a lot" means a lot of gems 

      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using iFile or Filza, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will then need to press on 'Installer' or 'Install' from the options on your screen.
      STEP 5: Let iFile / Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: Now open your iDevice settings and scroll down until you see the settings for this cheat and tap on it. If the hack is a Mod Menu, the cheat features can be toggled in-game.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - @Zahir


      Cheat Video/Screenshots:
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 632 replies
    • Township: Farm & City Building v24.0.0 Jailed Cheats +2
      Modded/Hacked App: Township by PLR Worldwide Sales Limited
      Bundle ID: com.playrix.township-ios
      iTunes Store Link: https://apps.apple.com/us/app/township/id638689075?uo=4&at=1010lce4


      Hack Features:
      - Freeze Currencies

      EDIT: Please be aware that this maybe cause your account banned, please use with caution and don’t abuse


      iOS Hack Download Link: https://iosgods.com/topic/116584-arm64-township-farm-city-building-v852-jailed-cheats-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,615 replies
    • (Resonance Solstice China) 雷索纳斯 v1.4.0 +2 Jailed Cheats
      Modded/Hacked App: 雷索纳斯 By Shanghai Leiyu Network Technology Co.,Ltd.
      Bundle ID: com.shanghaileiyu.lsns
      iTunes Store Link: https://apps.apple.com/cn/app/%E9%9B%B7%E7%B4%A2%E7%BA%B3%E6%96%AF/id6466783172?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier


      Jailbreak required hack(s): 


      iOS Hack Download IPA Link:

      Hidden Content

      Download via the iOSGods App








      PC Installation Instructions:
      STEP 1: If necessary, uninstall the app if you have it installed on your iDevice. Some hacked IPAs will install as a duplicate app. Make sure to back it up so you don't lose your progress.
      STEP 2: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see this tutorial topic.
      STEP 3: Download Sideloadly and install it on your PC.
      STEP 4: Open/Run Sideloadly on your computer, connect your iOS Device, and wait until your device name shows up.
      STEP 5: Once your iDevice appears, drag the modded .IPA file you downloaded and drop it inside the Sideloadly application.
      STEP 6: You will now have to enter your iTunes/Apple ID email login, press "Start" & then you will be asked to enter your password. Go ahead and enter the required information.
      STEP 7: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 8: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles/VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 9: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. Jailbroken iDevices can also use Sideloadly/Filza/IPA Installer to normally install the IPA with AppSync. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Thanks
      • 3 replies
    • (Resonance Solstice China) 雷索纳斯 v1.4.0 +2 Cheats
      Modded/Hacked App: 雷索纳斯 By Shanghai Leiyu Network Technology Co.,Ltd.
      Bundle ID: com.shanghaileiyu.lsns
      iTunes Store Link: https://apps.apple.com/cn/app/%E9%9B%B7%E7%B4%A2%E7%BA%B3%E6%96%AF/id6466783172?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): 


      iOS Hack Download Link:

      Hidden Content

      Download Hack








      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 3 replies
    • Cat Snack Bar Cheats v1.0.153 +1
      Modded/Hacked App: Cat Snack Bar By treeplla Inc.
      Bundle ID: com.tree.idle.catsnackbar
      iTunes Store Link: https://apps.apple.com/us/app/cat-snack-bar/id6443895159?uo=4


      Hack Features:
      - Freeze Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/170232-cat-snack-bar-v1036-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/170233-cat-snack-bar-cheats-v1036-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 66 replies
    • Cats & Soup Cheats v2.59.1 +2
      Modded/Hacked App: Cats & Soup By HIDEA Co.,Ltd
      Bundle ID: com.hidea.cat
      iTunes Store Link: https://apps.apple.com/us/app/cats-soup/id1581431235?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/157486-cats-soup-v196-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/157484-cats-soup-cheats-v196-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 277 replies
    • Toca Boca World Modded v1.100.1 +1
      Modded/Hacked App: Toca Boca World By Toca Boca AB
      Bundle ID: com.tocaboca.tocalifeworld
      iTunes Store Link: https://apps.apple.com/us/app/toca-boca-world/id1208138685?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - Everything Purchased


      Non-Jailbroken & No Jailbreak required hack(s): 


      Hack Download Link:

      Hidden Content

      Download Hack








      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using iFile or Filza, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will then need to press on 'Installer' or 'Install' from the options on your screen.
      STEP 5: Let iFile / Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: Now open your iDevice settings and scroll down until you see the settings for this cheat and tap on it. If the hack is a Mod Menu, the cheat features can be toggled in-game.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - @Laxus


      Cheat Video/Screenshots:

      N/A

       
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,325 replies
    • Alien Invasion: RPG Idle Space Cheats v4.01.00 +2
      Modded/Hacked App: Alien Invasion: RPG Idle Space By MULTICAST GAMES LIMITED
      Bundle ID: com.multicastgames.venomSurvive
      iTunes Store Link: https://apps.apple.com/us/app/alien-invasion-rpg-idle-space/id6443697602?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/167591-alien-invasion-rpg-idle-space-v204-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/167589-alien-invasion-rpg-idle-space-cheats-v204-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 384 replies
    • Idle MoonRabbit: AFK RPG Cheats v1.109.2 +4
      Modded/Hacked App: Idle MoonRabbit: AFK RPG By Able Games Co. ,Ltd.
      Bundle ID: com.TheAbleGames.DalToKi
      iTunes Store Link: https://apps.apple.com/us/app/idle-moonrabbit-afk-rpg/id1599684924?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Multiply Stats
      - Instant Kill


      iOS Hack Download Link: https://iosgods.com/topic/167497-idle-moonrabbit-afk-rpg-cheats-v1629-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 214 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines