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
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

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

    • Mama Rescue: Bang Bang Bang! v1.0 [ +3 Cheats ] Gold Max
      Modded/Hacked App: Mama Rescue: Bang Bang Bang! By JINKYU KWON
      Bundle ID: com.purplejam.umtang
      App Store Link: https://apps.apple.com/us/app/mama-rescue-bang-bang-bang/id6756872944?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - ATK MAX
      - ATK Speed
      • 0 replies
    • Mama Rescue: Bang Bang Bang! v1.0 [ +3 Jailed ] Gold Max
      Modded/Hacked App: Mama Rescue: Bang Bang Bang! By JINKYU KWON
      Bundle ID: com.purplejam.umtang
      App Store Link: https://apps.apple.com/us/app/mama-rescue-bang-bang-bang/id6756872944?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - ATK MAX
      - ATK Speed
      • 0 replies
    • Baseball GOAT v3.0.31 [ +2 Cheats ] Energy Max
      Modded/Hacked App: Baseball GOAT By Red Falcon Games Limited
      Bundle ID: com.redfalcon.baseballgoat.ios
      App Store Link: https://apps.apple.com/us/app/baseball-goat/id6677019784?uo=4

      🤩 Hack Features

      - Unlimited Energy
      - ADS Pack Active / Rewards Free
      • 0 replies
    • Baseball GOAT v3.0.31 [ +2 Jailed ] Energy Max
      Modded/Hacked App: Baseball GOAT By Red Falcon Games Limited
      Bundle ID: com.redfalcon.baseballgoat.ios
      App Store Link: https://apps.apple.com/us/app/baseball-goat/id6677019784?uo=4

      🤩 Hack Features

      - Unlimited Energy
      - ADS Pack Active / Rewards Free
      • 0 replies
    • Baseball Rising Star v2.1.0 [ +15 Cheats ] Currency Max
      Modded/Hacked App: Baseball Rising Star By 军 赵
      Bundle ID: com.baseball.rising.star
      App Store Link: https://apps.apple.com/us/app/baseball-rising-star/id6743102148?uo=4

      🤩 Hack Features

      - Gems Freeze
      - Cash Freeze
      - Shard Freeze
      - Maintenance Oil Freeze
      - Talent Point Freeze
      - Energy Freeze
      - Reputation Freeze
      === VIP ===
      - ADS PACK / Active Rewards Free
      - Gems Unlimited
      - Cash Unlimited
      - Shard Unlimited
      - Maintenance Oil Unlimited
      - Talent Point Unlimited
      - Energy Unlimited
      - Reputation Unlimited
      • 1 reply
    • Baseball Rising Star v2.1.0 [ +15 Jailed ] Currency Max
      Modded/Hacked App: Baseball Rising Star By 军 赵
      Bundle ID: com.baseball.rising.star
      App Store Link: https://apps.apple.com/us/app/baseball-rising-star/id6743102148?uo=4

      🤩 Hack Features

      - Gems Freeze
      - Cash Freeze
      - Shard Freeze
      - Maintenance Oil Freeze
      - Talent Point Freeze
      - Energy Freeze
      - Reputation Freeze
      === VIP ===
      - ADS PACK / Active Rewards Free
      - Gems Unlimited
      - Cash Unlimited
      - Shard Unlimited
      - Maintenance Oil Unlimited
      - Talent Point Unlimited
      - Energy Unlimited
      - Reputation Unlimited
      • 1 reply
    • Truckers of Europe 3 v0.70.64 Jailed Cheats +4
      Modded/Hacked App: Truckers of Europe 3 By Yalcin Senturk
      Bundle ID: com.WandaSoftware.TruckersofEurope3
      App Store Link: https://apps.apple.com/us/app/truckers-of-europe-3/id1630315603?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Infinite Cash
      - Infinite Gold
      - No Ads
      - Trailers Purchased

       

      Jailbroken Hack: https://iosgods.com/topic/208041-truckers-of-europe-3-cheats-auto-update-4/

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/208040-truckers-of-europe-3-v07064-jailed-cheats-4/
      • 0 replies
    • Shiba Wars: Goddess Link TD +3 Mods [ Damage & Defence ]
      Mod APK Game Name: Shiba Wars: Goddess Link TD By Shibamaru
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.shibamaru.shibawars

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 1 reply
    • Shiba Wars: Tower Defense TD +3 Mods [ Damage & Defence ]
      Mod APK Game Name: Shiba Wars: Tower Defense TD By Shibamaru
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.Shibamaru.com.Shibamaru.GoddessDefense

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Shiba Wars: Tower Defense TD +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Shiba Wars: Tower Defense TD By Shibamaru, LLC
      Bundle ID: com.Shibamaru.GoddessDefense
      App Store Link: https://apps.apple.com/us/app/shiba-wars-tower-defense-td/id6474090746?uo=4

       

      🤩 Hack Features

      - Damage Multiplier 
      - Defence Multiplier
      - God Mode
      • 3 replies
    • Shiba Wars: Goddess Link TD +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Shiba Wars: Goddess Link TD By Shibamaru, LLC
      Bundle ID: com.shibamaru.shibawars
      App Store Link: https://apps.apple.com/us/app/shiba-wars-goddess-link-td/id6752238059?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 0 replies
    • Raising Constellation ( 성좌 키우기 ) +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: 성좌 키우기 By CodeDragon Co., LTD.
      Bundle ID: com.codedragon.starhunter
      App Store Link: https://apps.apple.com/kr/app/%EC%84%B1%EC%A2%8C-%ED%82%A4%EC%9A%B0%EA%B8%B0/id6757176669?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      • 7 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