Jump to content

LF help with hooking function calls with latest mod menu template (Unity)


2 posts in this topic

Recommended Posts

Posted

Hi there guys,

 

It's been a while since I did mod something for iOS, please, let me know what I'm doing wrong here.

Below is the top of my Tweak.xm

#import "Macros.h"

/***********************************************************
  INSIDE THE FUNCTION BELOW YOU'LL HAVE TO ADD YOUR SWITCHES!
***********************************************************/


void(*Load)(void *this_) = (void(*) (void *))getRealOffset("0x101D46508");
void(*ctor0)(void *this_) = (void(*) (void *))getRealOffset("0x101DFA0B4");
void(*ctor1)(void *this_) = (void(*) (void *))getRealOffset("0x101D4752C");
void(*ctor2)(void *this_) = (void(*) (void *))getRealOffset("0x101D475C0");
void(*ctor3)(void *this_) = (void(*) (void *))getRealOffset("0x10247B024");
void(*ctor4)(void *this_) = (void(*) (void *))getRealOffset("0x10247B610");
void(*ctor5)(void *this_) = (void(*) (void *))getRealOffset("0x101B75B94");
void(*ctor6)(void *this_) = (void(*) (void *))getRealOffset("0x101E26324");
void(*OnGui)(void *this_) = (void(*) (void *))getRealOffset("0x101D46B6C");

void (*oldBattle)(void *e);
void onBattle(void *e){
  if (e != NULL) {
  if ([switches isSwitchOn:NSSENCRYPT("onBattle")]) {
      ctor0(e);
      ctor1(e);
      ctor2(e);
      ctor3(e);
      ctor4(e);
      ctor5(e);
      ctor6(e);
      Load(e);
      OnGui(e);
      return oldBattle(e);
  }
  else
    return oldBattle(e);
  } 
}


void setup()
{


  [switches addSwitch:NSSENCRYPT("onBattle")
    description:NSSENCRYPT("onBattle")
  ];


HOOK(ENCRYPTOFFSET("0x101C6B714"), onBattle, oldBattle);
}

 

I'm not C guy, so I don't completely understand the 'void(*ctor5)(void *this_) = (void(*) (void *))getRealOffset("0x101B75B94");' structure, but it used to work pretty much like that in the old days.

The mod menu I'm using is this one: https://github.com/joeyjurjens/iOS-Mod-Menu-Template-for-Theos

It is mentioned in the repo's readme that

A quick note before showing all the switch examples; You can and should encrypt offsets, hexes, c-strings and NSStrings. Below you can find the proper syntax per string-type.

ENCRYPTOFFSET("0x10047FD90")

However, the template tweak.xm doesn't have any "HOOK's" or getting void from an existing pointer into a variable (?not sure if that makes sense)

Basically, what I'm trying to do is:

There is a function, e.g. killAll with the address 0x1337FFFF and a Battle Update function on another address.

First I need to get the killAll function from an address.

 

Earlier, I would do something like that (void(*killAll)(void *instance)  = (void (*)(void*))getRealOffset(0x1337FFFF);

Nowadays, I'm not sure about these things and would love you to help me figure:

1.Whether that is going to work  or not

2. Should I do getRealOffset(0x1337FFFF) or getRealOffset(ENCRYPTOFFSET("0x1337FFFF"));

3. Should I add the ENCRYPTOFFSET part in the HOOK at the very end of my code

4. Anything else I'm missing or doing wrong.

 

Also, according to my logic - these two codes below should result in the same

if ([switches isSwitchOn:NSSENCRYPT("onBattle")]) {
      ctor0(e);
      ctor1(e);
      ctor2(e);
      ctor3(e);
      ctor4(e);
      ctor5(e);
      ctor6(e);
      Load(e);
      OnGui(e);
      return oldBattle(e);
  }
  else
    return oldBattle(e);
  } 

or 


if ([switches isSwitchOn:NSSENCRYPT("onBattle")]) {
      ctor0(e);
      ctor1(e);
      ctor2(e);
      ctor3(e);
      ctor4(e);
      ctor5(e);
      ctor6(e);
      Load(e);
      OnGui(e);
  }
     return oldBattle(e);
  } 

Just wanted to make sure about the last one too.

 

Thanks in advance

 
Posted
On 12/20/2021 at 12:36 AM, n1ce0n3 said:

1.Whether that is going to work  or not

2. Should I do getRealOffset(0x1337FFFF) or getRealOffset(ENCRYPTOFFSET("0x1337FFFF"));

3. Should I add the ENCRYPTOFFSET part in the HOOK at the very end of my code

4. Anything else I'm missing or doing wrong.

1- it depends on the game
2- doesn't matter
3- no need for that " i recommend use it for strings & bytes"
4- 👇

 

if ([switches isSwitchOn:NSSENCRYPT("onBattle")]) {
      ctor0(e);
      ctor1(e);
      ctor2(e);
      ctor3(e);
      ctor4(e);
      ctor5(e);
      ctor6(e);
      Load(e);
      OnGui(e);
  }
     oldBattle(e);
  } 

 

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

    • DRAGON BALL Z DOKKAN BATTLE Japan (ドラゴンボールZ ドッカンバトル) v5.33.0 +7 Cheats!
      Modded/Hacked App: ドラゴンボールZ ドッカンバトル By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcogames.BNGI0211
      iTunes Link: https://itunes.apple.com/jp/app/ドラゴンボールz-ドッカンバトル/id951627670


      Hack Features
      - Unlimited HP  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Damage  -  (Put .0 at the back of your value: 1000.0)
      - Unlimited Defense  -  (Put .0 at the back of your value: 1000.0)
      - Dice Hack -  [ONLY RANGE BETWEEN 1 - 6 or it will crash]  -  (Put .0 at the back of your value: 4.0)
      - Dice Hack 1, 2, 3
      - Dice Hack 4, 5, 6
      - Auto Win Battles -> Disable if you get errors.
      PUT .0 at the back of all values!
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 8,023 replies
    • Hunt Royale: Action RPG Battle v3.22.3 +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Hunt Royale: Action RPG Battle By BoomBit, Inc.
      Bundle ID: com.hunt.royale
      iTunes Store Link: https://apps.apple.com/us/app/hunt-royale-action-rpg-battle/id1537379121?uo=4

       
       

      🚀 Hack Features

      - Dumb Enemies

      VIP
      - Damage Multiplier
      - Defence Multiplier
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 229 replies
    • Animal Mafia v1.0.3 [ +20 Jailed ] Currency Max
      Modded/Hacked App: Animal Mafia By IGNITION M CO., LTD.
      Bundle ID: com.ignm.animalmafia
      App Store Link: https://apps.apple.com/us/app/animal-mafia/id6741849079?uo=4

      🤩 Hack Features

      - Premium Active
      - Premium Claim Unlimited
      - Premium Unlimited Rewards
      - Normal Unlimited Rewards
      - Unlimited Gems
      - Unlimited Gold
      - Unlimited Energy
      - Unlimited Soul Can
      - Unlimited Sprout Keys + Voucher
      - Unlimited Grilled Fish + Voucher
      - Unlimited Enhancement Crystal + Voucher
      - Unlimited Animal Cookie
      - Unlimited Bloom Key
      - Unlimited Adventure Medal
      - Offline Rewards / Unlimited Gold
      - Offline Rewards / Unlimited Gummy
      - Gacha / Earn Gold
      - Gacha / Earn Gummy
      - ATK / Hero Upgrade
      - HP / Hero Upgrade
        • Winner
        • Like
      • 2 replies
    • Animal Mafia v1.0.3 [ +20 Cheats ] Currency Max
      Modded/Hacked App: Animal Mafia By IGNITION M CO., LTD.
      Bundle ID: com.ignm.animalmafia
      App Store Link: https://apps.apple.com/us/app/animal-mafia/id6741849079?uo=4

      🤩 Hack Features

      - Premium Active
      - Premium Claim Unlimited
      - Premium Unlimited Rewards
      - Normal Unlimited Rewards
      - Unlimited Gems
      - Unlimited Gold
      - Unlimited Energy
      - Unlimited Soul Can
      - Unlimited Sprout Keys + Voucher
      - Unlimited Grilled Fish + Voucher
      - Unlimited Enhancement Crystal + Voucher
      - Unlimited Animal Cookie
      - Unlimited Bloom Key
      - Unlimited Adventure Medal
      - Offline Rewards / Unlimited Gold
      - Offline Rewards / Unlimited Gummy
      - Gacha / Earn Gold
      - Gacha / Earn Gummy
      - ATK / Hero Upgrade
      - HP / Hero Upgrade
        • Winner
        • Like
      • 2 replies
    • Dead Impact: Survival MMORPG v1.17 +11 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Dead Impact: Survival MMORPG By SYNTHEZ GAMES LIMITED
      Bundle ID: games.synthez.zombie.survival.multiplayer
      App Store Link: https://apps.apple.com/us/app/dead-impact-survival-mmorpg/id6444281832?uo=4

       
       

      🤩 Hack Features

      - Freeze Currencies
      - Freeze Items
      - 1 Stat Point Requirement
      - Level Threshold Modifier -> Amount of XP required to advance to the next level.
      - No Craft Item Requirement
      - Unlimited Durability
      - No Consumable Cooldown

      VIP
      - Unlimited Currencies -> Will increase instead of decrease.
      - Unlimited Items -> Will increase instead of decrease.
      - Unlock All
      - Unlock All Classes
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 263 replies
    • Dead Impact: Survival MMORPG v1.17 +11 Cheats [ Unlimited Everything ]
      Modded/Hacked App: Dead Impact: Survival MMORPG By SYNTHEZ GAMES LIMITED
      Bundle ID: games.synthez.zombie.survival.multiplayer
      App Store Link: https://apps.apple.com/us/app/dead-impact-survival-mmorpg/id6444281832?uo=4

       


      🤩 Hack Features

      - Freeze Currencies
      - Freeze Items
      - 1 Stat Point Requirement
      - Level Threshold Modifier -> Amount of XP required to advance to the next level.
      - No Craft Item Requirement
      - Unlimited Durability
      - No Consumable Cooldown

      VIP
      - Unlimited Currencies -> Will increase instead of decrease.
      - Unlimited Items -> Will increase instead of decrease.
      - Unlock All
      - Unlock All Classes
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 93 replies
    • Matchcreek Motors v10.7.19722 +5 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Matchcreek Motors: Custom Cars By Hutch Games Ltd
      Bundle ID: com.hutchgames.carsm3
      iTunes Store Link: https://apps.apple.com/us/app/matchcreek-motors-custom-cars/id6566187035?uo=4

       
       

      🤩 Hack Features

      - Unlimited Currencies -> Will increase instead of decrease.
      - Freeze Lives
      - Freeze Pre-Game Boosters
      - Freeze Boosters
      - Freeze Moves
        • Haha
        • Thanks
        • Winner
        • Like
      • 11 replies
    • Romantic Blast: Love Stories v2.5.1 +5 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Romantic Blast: Love Stories By Pexix Technology Limited
      Bundle ID: ios.romantic.blast.makeover.game
      iTunes Store Link: https://apps.apple.com/us/app/romantic-blast-love-stories/id6463772070?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Gems -> Earn or spend some.
      - Unlimited Lives -> Earn or spend some.
      - Unlimited Boosters -> Will not decrease.
      - Unlimited Moves -> Will not decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Romantic Blast: Love Stories v2.2.9 +5 Cheats [ Unlimited Currencies ] - 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/
        • Informative
        • Agree
        • Winner
        • Like
      • 5 replies
    • Epic Stickman: RPG Idle Game v1.0.48 +2++ Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Epic Stickman: RPG Idle Game By Fansipan Limited
      Bundle ID: com.fansipan.epic.stickman.survival.rpg.idle.game
      iTunes Store Link: https://apps.apple.com/us/app/epic-stickman-rpg-idle-game/id6503872838?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.
      - Free In-App Purchases -> Toggle via iGMenu.


      Jailbreak required hack(s): [Mod Menu Hack] Epic Stickman: RPG Idle Game v1.0 +2++ Cheats [ Unlimited Currencies ] - 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 45 replies
    • Disney Solitaire v1.11.2 +2++ Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Disney Solitaire By SuperPlay LTD
      Bundle ID: com.superplaystudios.disneysolitairedreams
      iTunes Store Link: https://apps.apple.com/us/app/disney-solitaire/id6475757306?uo=4

       
       

      🤩 Hack Features

      - Unlimited Everything -> Will increase instead of decrease.
      - Free In-App Purchases
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 46 replies
    • Tiny Reaper: Reborn v1.2.13 +4 Jailed Cheats [ God Mode + More ]
      Modded/Hacked App: Tiny Reaper: Reborn By DAERI SOFT
      Bundle ID: com.daerigame.babysasin
      App Store Link: https://apps.apple.com/us/app/tiny-reaper-reborn/id6739761698?uo=4

       


      🤩 Hack Features

      - God Mode
      - One-Hit Kill
      - No Skill Cooldown
      - Dumb Enemies
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 23 replies
    • Brotato v1.3.262 +4 Jailed Cheats [ Damage + More ]
      Modded/Hacked App: Brotato By QI YU SG. PTE. LTD.
      Bundle ID: com.brotato.shooting.survivors.action.games.bullethell.ios
      iTunes Store Link: https://apps.apple.com/us/app/brotato/id6445884925?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      - Move Speed Multiplier
      - Free In-App Purchases
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 46 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