Jump to content

(Solved) Hooking in LGL Mod Menu


Parxdy
Go to solution Solved by Parxdy,

9 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
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
Link to comment
Share on other sites

@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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

    • WAR OF THE VISIONS FFBE Cheats v8.6.0 +3 [ Multiply Damage & Defense ]
      Modded/Hacked App: FINAL FANTASY BE:WOTV By SQUARE ENIX Co., Ltd.
      Bundle ID: com.square-enix.WOTVffbeww
      iTunes Store Link: https://apps.apple.com/us/app/final-fantasy-be-wotv/id1484937345?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Full Map Movement


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/173485-final-fantasy-bewotv-v730-jailed-cheats-3/


      iOS Hack Download Link: https://iosgods.com/topic/173483-war-of-the-visions-ffbe-cheats-v740-3-multiply-damage-defense/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 124 replies
    • Slash & Girl - Endless Run By Shenzhen Qingtian IE Technology Co., Ltd v7.9.981 Cheats +4
      Modded/Hacked App: Slash & Girl - Endless Run By Shenzhen Qingtian IE Technology Co., Ltd
      Bundle ID: com.slash.girl.redfish
      iTunes Store Link: https://apps.apple.com/vn/app/slash-girl-endless-run/id1484766098?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:
      - No die
      - One hit
      - Freeze combo
      - Freeze lighting
        • Informative
        • Thanks
        • Like
      • 3 replies
    • Slash & Girl - Endless Run By Shenzhen Qingtian IE Technology Co., Ltd v7.9.981 Cheats +7
      Modded/Hacked App: Slash & Girl - Endless Run By Shenzhen Qingtian IE Technology Co., Ltd
      Bundle ID: com.slash.girl.redfish
      iTunes Store Link: https://apps.apple.com/vn/app/slash-girl-endless-run/id1484766098?uo=4

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

      Hack Features:
      - No die
      - One hit
      - Earn more currencies
      - Custom score
      - Freeze combo
      - Freeze lighting
      - Jump height
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 32 replies
    • Blood Knight : 3D Idle RPG v2.98 Cheats +1
      Modded/Hacked App: Blood Knight : 3D Idle RPG By SUPERBOX. Inc
      Bundle ID: com.superbox.ios.blood
      iTunes Store Link: https://apps.apple.com/us/app/blood-knight-3d-idle-rpg/id6443827240?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:
      - High damage
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 78 replies
    • Blood Knight : 3D Idle RPG v2.98 Cheats +1
      Modded/Hacked App: Blood Knight : 3D Idle RPG By SUPERBOX. Inc
      Bundle ID: com.superbox.ios.blood
      iTunes Store Link: https://apps.apple.com/us/app/blood-knight-3d-idle-rpg/id6443827240?uo=4

       


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


      Hack Features:
      - High damage
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 37 replies
    • [ Dead by Daylight TW ] 黎明死線M - Envoy v1.0.32 +27 Cheats
      Modded/Hacked App: 黎明死線M - Envoy [ Dead by Daylight Mobile TW ] By Envoy Interactive Entertainment Co., Ltd.
      Bundle ID: com.netease.dbdtw
      iTunes Store Link: https://apps.apple.com/tw/app/%E9%BB%8E%E6%98%8E%E6%AD%BB%E7%B7%9Am-envoy/id1504610184?uo=4


      Hack Features:
      - No Skill Check
      - No Killer Attack/Miss Cooldown
      - Custom Speed
      - Killer Location Cham
      - Survivor Location Cham
      - Generator Cham
      - Totems Cham
      - Chest Cham
      - Portal Cham
      - Hatch Cham
      - Hooks Cham
      - Trap Cham
      - Escape Switch Cham
      - Normal Pallet Cham
      - Dream Pallet Cham
      - Lockers Cham
      - Survivor Trap Immunity
      - Instant Window Vault*
      - Instant Destroy Pallets*
      - Instant Pickup Downed Players*
      - Custom FOV
      - Disable Footsteps - use as a survivor.
      - No Nurse Fatigue
      - Instant Nurse Teleport
      - Nurse Teleport Through Anything
      - Better Aim Assist
      - No Heartbeat

      * Under one switch


      iOS Hack Download Link: https://iosgods.com/topic/164639-dead-by-daylight-tw-%E9%BB%8E%E6%98%8E%E6%AD%BB%E7%B7%9Am-envoy-v1024-27-cheats/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 95 replies
    • OUTERPLANE - Strategy Anime v1.1.92 Cheats +4
      Modded/Hacked App: OUTERPLANE - Strategy Anime By Smilegate Holdings, Inc.
      Bundle ID: com.smilegate.outerplane.stove.ios
      iTunes Store Link: https://apps.apple.com/us/app/outerplane-strategy-anime/id1630880836?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:
      - God mode
      - OHK
      - Unlimited AP
      - No CD skill
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 70 replies
    • Boomerang RPG v1.0.18 Cheats +3
      Modded/Hacked App: Boomerang RPG By SuperPlanet corp.
      Bundle ID: com.superplanet.boomerang
      iTunes Store Link: https://apps.apple.com/us/app/boomerang-rpg/id6472151756?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:
      - God mode
      - High damage
      - Fast attack
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 18 replies
    • Boomerang RPG v1.0.18 Cheats +3
      Modded/Hacked App: Boomerang RPG By SuperPlanet corp.
      Bundle ID: com.superplanet.boomerang
      iTunes Store Link: https://apps.apple.com/us/app/boomerang-rpg/id6472151756?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:
      - God mode
      - Fast attack
      - High damage
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 59 replies
    • 菇勇者傳說-送3000抽 v2.0.13 Cheats +2
      Modded/Hacked App: 菇勇者傳說-送3000抽 By JOY MOBILE NETWORK PTE. LTD.
      Bundle ID: com.mxdzz.tw.ios
      iTunes Store Link: https://apps.apple.com/tw/app/%E8%8F%87%E5%8B%87%E8%80%85%E5%82%B3%E8%AA%AA-%E9%80%813000%E6%8A%BD/id6466405648?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:
      - God mode
      - OHK
        • Informative
        • Haha
        • Winner
        • Like
      • 55 replies
    • BiliBili - HD Anime, Videos v2.81.0 Cheats +4
      Modded/Hacked App: BiliBili - HD Anime, Videos By BALABOOM PTE LTD
      Bundle ID: com.bstar.intl
      iTunes Store Link: https://apps.apple.com/vn/app/bilibili-hd-anime-videos/id1548857482?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:
      - No ads
      - Minimize watermark
      - Watch 4k
      - Can download 4k
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 101 replies
    • BiliBili - HD Anime, Videos v2.81.0 Cheats +4
      Modded/Hacked App: BiliBili - HD Anime, Videos By BALABOOM PTE LTD
      Bundle ID: com.bstar.intl
      iTunes Store Link: https://apps.apple.com/vn/app/bilibili-hd-anime-videos/id1548857482?uo=4

       

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


      Hack Features:
      - No ads
      - Minimize watermark
      - Watch 4k
      - Can download 4k
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 51 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