Jump to content

(Solved) Hooking in LGL Mod Menu


Go to solution Solved by Parxdy,

10 posts in this topic

Recommended Posts

Posted (edited)

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
  • Solution
Posted (edited)

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
Posted

@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
Posted
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..........

Posted
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

Posted
8 hours ago, ren123567 said:

@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

Add me on discord Parxdy#1780

Posted (edited)
2 hours ago, Parxdy said:

Add me on discord Parxdy#1780

i already sent you friend request, my nickname is RenHax or RenHax#0056

Updated by ren123567
Posted
38 minutes ago, ren123567 said:

i already sent you friend request, my nickname is RenHax or RenHax#0056

Okay I’ll get to you tonight. I’m heading to the beach

Posted

Anyone help me how to find real offsets and how to hook offset like float android void and int

On 5/26/2023 at 3:59 AM, ren123567 said:

Ok bro, takecare😉

Can you help me please 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Train Empire Idle Tycoon v1.4.1 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Train Empire - Idle Tycoon By HYPERCELL SIA
      Bundle ID: com.nova.train.empire
      App Store Link: https://apps.apple.com/us/app/train-empire-idle-tycoon/id6818543669?uo=4

      🤩 Hack Features

      - ADS No
      - Add Currency
      - Add Resources
      • 0 replies
    • Train Empire Idle Tycoon v1.4.1 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Train Empire - Idle Tycoon By HYPERCELL SIA
      Bundle ID: com.nova.train.empire
      App Store Link: https://apps.apple.com/us/app/train-empire-idle-tycoon/id6818543669?uo=4

      🤩 Hack Features

      - ADS No
      - Add Currency
      - Add Resources
      • 0 replies
    • Age of Aterra v1.0.3 [ +3 Cheats ] AI Freeze
      Modded/Hacked App: Age of Aterra By Green Bee Games LLC
      Bundle ID: games.greenbee.aterra
      App Store Link: https://apps.apple.com/us/app/age-of-aterra/id6816096429?uo=4

      🤩 Hack Features

      - Never Die
      - Max Damage
      - AI Freeze
      • 0 replies
    • Age of Aterra v1.0.3 [ +3 Jailed ] AI Freeze
      Modded/Hacked App: Age of Aterra By Green Bee Games LLC
      Bundle ID: games.greenbee.aterra
      App Store Link: https://apps.apple.com/us/app/age-of-aterra/id6816096429?uo=4

      🤩 Hack Features

      - Never Die
      - Max Damage
      - AI Freeze
      • 0 replies
    • Evolution: Battle for Utopia v3.7.5 [ +15 Cheats ] Auto Win
      Modded/Hacked App: Evolution: Battle for Utopia By Keystorm Holdings Limited
      Bundle ID: com.my.evolution
      App Store Link: https://apps.apple.com/us/app/evolution-battle-for-utopia/id774652325?uo=4

      🤩 Hack Features

      - Auto Win
      - VIP Active
      - VIP Level Max
      - Freeze Currency
      - Freeze Resources
      - Unlimited Currency
      - Unlimited Resources
      - Battle EXP Drop
      - Rank Points
      - Skill Points
      - Enemies Can't Attack
      - Enemy HP 1
      - Max Damage
      - Ammo Max
      - No Reload
      • 0 replies
    • Evolution: Battle for Utopia v3.7.5 [ +15 Jailed ] Auto Win
      Modded/Hacked App: Evolution: Battle for Utopia By Keystorm Holdings Limited
      Bundle ID: com.my.evolution

      🤩 Hack Features

      - Auto Win
      - VIP Active
      - VIP Level Max
      - Freeze Currency
      - Freeze Resources
      - Unlimited Currency
      - Unlimited Resources
      - Battle EXP Drop
      - Rank Points
      - Skill Points
      - Enemies Can't Attack
      - Enemy HP 1
      - Max Damage
      - Ammo Max
      - No Reload
      • 0 replies
    • 8 Ball Champions v21.1.1 [ +9 Cheats ] AI Freeze
      Modded/Hacked App: 8 Ball Champions By Kazoo Media, Inc.
      Bundle ID: com.kazoo.pool2
      App Store Link: https://apps.apple.com/us/app/8-ball-champions/id1531510980?uo=4

      🤩 Hack Features

      - 🎯 Cue Guideline
      - 💪 Cue Power
      - 🤖 AI Can't Play
      - 🚫 Opponent Can't Play
      - 🚀 Unlimited Boosters
      - ⏱️ Opponent Time 0
      - 🏙️ Unlock All Cities
      - 🎱 Any Ball Counts
      - ✋ Move Any Ball
      • 0 replies
    • 8 Ball Champions v21.1.1 [ +9 Jailed ] AI Freeze
      Modded/Hacked App: 8 Ball Champions By Kazoo Media, Inc.
      Bundle ID: com.kazoo.pool2
      App Store Link: https://apps.apple.com/us/app/8-ball-champions/id1531510980?uo=4

      🤩 Hack Features

      - 🎯 Cue Guideline
      - 💪 Cue Power
      - 🤖 AI Can't Play
      - 🚫 Opponent Can't Play
      - 🚀 Unlimited Boosters
      - ⏱️ Opponent Time 0
      - 🏙️ Unlock All Cities
      - 🎱 Any Ball Counts
      - ✋ Move Any Ball
      • 2 replies
    • Ninja Scroll Rush v0.3.14 [ +8 Cheats ] Currency Max
      Modded/Hacked App: Ninja Scroll Rush By Yso Corp
      Bundle ID: com.YsoCorp.NinjaScrollRush
      App Store Link: https://apps.apple.com/us/app/ninja-scroll-rush/id6755685134?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Keys +3
      - Unlimited Coins
      - Unlimited EXP / Faster LvL UP
      - HP MAX
      - ATK MAX
      - DEF MAX
      - Skill CD
      • 11 replies
    • Jolly Match 3 - Puzzle Game v1.0.2774 [ +5 Cheats ] Auto Win
      Modded/Hacked App: Jolly Match 3 - Puzzle Game By Jollyco LLC
      Bundle ID: com.jollyco.jollybattlematch3
      App Store Link: https://apps.apple.com/us/app/jolly-match-3-puzzle-game/id1554274735?uo=4


      🤩 Hack Features

      - Auto Win

      - Coins

      - Stars

      - Lives

      - Booster
      • 23 replies
    • Crowd Champs: 3D Runner Game v1.18.2 [ +13 Cheats ] Currency Max
      Modded/Hacked App: Crowd Champs: 3D Runner Game By AI GAMES FZ LLC
      Bundle ID: crowd.champs.game
      App Store Link: https://apps.apple.com/us/app/crowd-champs-3d-runner-game/id6756704370?uo=4

      🤩 Hack Features

      - Auto ADS Off
      - Champs Pass Active
      - Champs Pass / Claim Unlimited
      - Gems Earn
      - Totem +2 Active
      - Spin Free / Note When 0 Then Use Only
      - Upgrade Cost Free / Need 1 Coin
      :::: ViP Spin Rewards ::::
      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Rune Cards
      - Unlimited Rune Upgrade Card
      - Unlimited Spins / Note Don't Use Free Spin When Using This
      • 5 replies
    • Merge Beach : Gossip & Mystery v1.1.3 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Merge Beach : Gossip & Mystery By 1GRAM
      Bundle ID: com.ongram.merge.beach.gossip.mystery
      App Store Link: https://apps.apple.com/us/app/merge-beach-gossip-mystery/id6746242808?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      • 8 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