Jump to content

(Solved) Hooking in LGL Mod Menu


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

    • Toram Online v4.0.51 - [ Custom Move Speed & More ]
      Modded/Hacked App: Toram Online By ASOBIMO,Inc.
      Bundle ID: com.asobimo.toramonline
      iTunes Store Link: https://itunes.apple.com/us/app/toram-online/id988683886?mt=8&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:
      - Custom Move Speed
      - God Mode 
      - Fast Attack Speed
      - Fast Cast Speed
      - Always Critical Chance
      - Never Miss Hit 
      - Mobs/Bosses Can't Avoid & Guard 
      - Quick Draw
      - Armor Break
      - Magic Wall - Stun + Full Map Hack 
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,511 replies
    • Operate Now: Hospital Cheats v1.58.5 +1
      Modded/Hacked App: Operate Now: Hospital by SPIL Games
      Bundle ID: com.spilgames.OperateNow2
      iTunes Store Link: https://itunes.apple.com/us/app/operate-now-hospital/id1136678102?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Heart Reward Instead of Cash


      Hack Download Link: https://iosgods.com/topic/97086-arm64-operate-now-hospital-cheats-v1312-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 279 replies
    • Slayer Legend Cheats v600.0.0 +3
      Modded/Hacked App: Slayer Legend By GEAR2
      Bundle ID: com.gear2.growslayer
      iTunes Store Link: https://apps.apple.com/us/app/slayer-legend/id1635712706?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Freeze Currencies


      iOS Hack Download Link: https://iosgods.com/topic/186299-slayer-legend-cheats-v50084-3/
        • Informative
        • Agree
        • Haha
        • Winner
        • Like
      • 55 replies
    • Immortal Rising Cheats v2.4.7 +4
      Modded/Hacked App: Immortal Rising By MOBIRIX
      Bundle ID: com.badbeans.DarkIdle
      iTunes Store Link: https://apps.apple.com/us/app/immortal-rising/id1588863558?uo=4


      Hack Features:
      - God Mode
      - One Hit Kill
      - PREMIUM
      - Freeze Currencies*

      *Abuse = Ban


      iOS Hack Download Link: https://iosgods.com/topic/178921-immortal-rising-cheats-v222-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 159 replies
    • Demon Squad: Idle RPG Cheats v1.60 +2
      Modded/Hacked App: Demon Squad: Idle RPG By SuperPlanet corp.
      Bundle ID: com.superplanet.demonsquad
      iTunes Store Link: https://apps.apple.com/us/app/demon-squad-idle-rpg/id6504470907?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense


      iOS Hack Download Link: https://iosgods.com/topic/185576-demon-squad-idle-rpg-cheats-v139-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 67 replies
    • Delusion: Tactical Idle RPG Cheats v2.0.4 +3
      Modded/Hacked App: Delusion: Tactical Idle RPG By SuperPlanet corp.
      Bundle ID: com.superplanet.delusion
      iTunes Store Link: https://apps.apple.com/us/app/delusion-tactical-idle-rpg/id6496342351?uo=4


      Hack Features:
      - Multiply Attack
      - God Mode
      - Freeze Currencies

      NOTE: Do not abuse or buy ViP just for this cheats


      iOS Hack Download Link: https://iosgods.com/topic/183614-delusion-tactical-idle-rpg-cheats-v1027-3/
        • Thanks
        • Winner
        • Like
      • 52 replies
    • Candy Crush Saga Cheats v1.291.0 +2
      Modded/Hacked App: Candy Crush Saga By King
      Bundle ID: com.midasplayer.apps.candycrushsaga
      iTunes Store Link: https://itunes.apple.com/us/app/candy-crush-saga/id553834731?mt=8&uo=4&at=1010lce4




      Hack Features:
      - Infinite Life (Turn on when you running out of life)
      - Infinite Booster (Won't subtract when use)
       

      Hack Download Link: https://iosgods.com/topic/72296-arm64-candy-crush-saga-cheats-v11330-2-iosgods-exclusive/


      Credits:
      - @Laxus
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 4,749 replies
    • [ Re:Dive KR ] 프린세스 커넥트! Re:Dive Cheats v10.1.7 +3
      Modded/Hacked App: 프린세스 커넥트! Re:Dive By Kakao Games Corp.
      Bundle ID: com.kakaogames.pcr
      iTunes Store Link: https://apps.apple.com/kr/app/%ED%94%84%EB%A6%B0%EC%84%B8%EC%8A%A4-%EC%BB%A4%EB%84%A5%ED%8A%B8-re-dive/id1452123050?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Instant Skill


      iOS Hack Download Link: https://iosgods.com/topic/148422-%ED%94%84%EB%A6%B0%EC%84%B8%EC%8A%A4-%EC%BB%A4%EB%84%A5%ED%8A%B8-redive-cheats-v403-3/
        • Informative
        • Haha
        • Thanks
        • Winner
        • Like
      • 95 replies
    • Travel Town - Merge Adventure v2.12.800 Jailed Cheats +1
      Modded/Hacked App: Travel Town - Merge Adventure By Magmatic Games Ltd
      Bundle ID: io.randomco.travel
      iTunes Store Link: https://apps.apple.com/us/app/travel-town-merge-adventure/id1521236603?uo=4


      Hack Features:
      - Infinite Currencies


      iOS Hack Download Link: https://iosgods.com/topic/148953-travel-town-merge-adventure-v212287-jailed-cheats-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 531 replies
    • Tower of God: NEW WORLD Cheats v2.04.00 +4
      Modded/Hacked App: Tower of God: NEW WORLD By Netmarble Corporation
      Bundle ID: com.netmarble.tog
      iTunes Store Link: https://apps.apple.com/us/app/tower-of-god-new-world/id1599435437?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Always Critical
      - Skip Battle Intro


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

      iOS Hack Download Link: https://iosgods.com/topic/186202-tower-of-god-new-world-cheats-v20101-4/
        • Informative
        • Agree
        • Haha
        • Winner
        • Like
      • 59 replies
    • Archero Cheats v6.7.0 +5 [ God Mode & More ]
      Modded/Hacked App: Archero by HABBY PTE. LTD.
      Bundle ID: com.habby.archero
      iTunes Store Link: https://apps.apple.com/us/app/archero/id1453651052?uo=4&at=1010lce4



      Hack Features:
      - Multiply Defense to
      - Multiply Damage to
      - God Mode
      - OHK (Must use with God Mode)
      - Freeze Enemies

      NOTE: If you want to use god mode and ohk turn off multiply damage and defense first. I added multiply damage and defense there to avoid ban


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/100710-archero-v210-enemies-dont-attack-x30-attack/


      Hack Download Link: https://iosgods.com/topic/96783-arm64-archero-cheats-v220-5/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 15,701 replies
    • Screw Jam v3.3.1 +20++ Jailed Cheats [ Debug Menu ]
      Modded/Hacked App: Screw Jam By Rollic Games Oyun Yazilim ve Pazarlama Anonim Sirketi
      Bundle ID: com.quok.screwJam
      iTunes Store Link: https://apps.apple.com/us/app/screw-jam/id6471490579?uo=4


      Hack Features:
      - Debug Menu -> Head into Settings and toggle the Contact Us button. To close out the menu, restart the game.


      Jailbreak required hack(s): [Mod Menu Hack] Screw Jam v2.1.0 +20++ Cheats [ Debug Menu ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Like
      • 11 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