Jump to content

Help with multiple arguments on MSHooking


Go to solution Solved by AnotherLurker,

33 posts in this topic

Recommended Posts

Posted (edited)

So what should I do if this types appear?

 

- (void)function1:(int) function2:(int) function3:(int)

 

 

image.jpg

 

 

Will post pictures later.

 

Also, what should I do if there are other types of arguments?

 

- (bool) function:(?)

 

Can I even edit the (?)?

Updated by RockCreeper
  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Posted

So what should I do if this types appear?

- (void)function1:(int) function2:(int) function3:(int)

Will post pictures later.

Also, what should I do if there are other types of arguments?

- (bool) function:(?)

Can I even edit the (?)?

about the ? function you can skip it no need to return it

and about the multiple function you can return every function alone but you need to write it like this

-(void)function:(int)arg1 function:(int)arg2 function:(int)arg3
and the return

return whatever;
arg1 = whatever;
arg2 = whatever;
arg3 = whatever;
%orig(arg1, arg2, arg3)
hope this help ^_^
Posted (edited)

about the ? function you can skip it no need to return it

and about the multiple function you can return every function alone but you need to write it like this

-(void)function:(int)arg1 function:(int)arg2 function:(int)arg3
and the return

return whatever;
arg1 = whatever;
arg2 = whatever;
arg3 = whatever;
%orig(arg1, arg2, arg3)
hope this help ^_^

You can't modify values after you've already returned and ended the execution of the method. Here is the proper solution:

%hook ClassName
- (void)function:(int)arg1 function:(int)arg2 function:(int)arg3 {
   %orig(arg1ModifiedValue, arg2ModifiedValue, arg3ModifiedValue);
}
%end

Make sure to replace the "arg#ModifiedValues" with the integer values you want. :)

Updated by Dwayne Johnson
Posted

about the ? function you can skip it no need to return it

and about the multiple function you can return every function alone but you need to write it like this

-(void)function:(int)arg1 function:(int)arg2 function:(int)arg3
and the return
return whatever;
arg1 = whatever;
arg2 = whatever;
arg3 = whatever;
%orig(arg1, arg2, arg3)
hope this help ^_^

Trying to make it into a patcher... So could u give more tips? Ty

Posted

Trying to make it into a patcher... So could u give more tips? Ty

here this from my tweak.xm from Fragger patcher

%hook Score

-(bool)allowedLevel:(int)arg1 World:(int)arg2 {
if(GetPrefBool(@"key2")) {
return TRUE;
arg1 = 0;
arg2 = 0;
%orig(arg1, arg2);
}
return %orig;
}

%end
Posted

You can't modify values after you've already returned and ended the execution of the method. Here is the proper solution:

 

%hook ClassName
- (void)function:(int)arg1 function:(int)arg2 function:(int)arg3 {
   %orig(arg1ModifiedValue, arg2ModifiedValue, arg3ModifiedValue);
}
%end
Make sure to replace the "arg#ModifiedValues" with the integer values you want. :)

So

 

%hook ClassName
- (void)function:(int)arg1 function:(int)arg2 function:(int)arg3 {
   %orig(arg199999999, arg299999999, arg39999999);
}
%end
?
Posted (edited)

Trying to make it into a patcher... So could u give more tips? Ty

Here you go:

#define plistPath @"/var/mobile/Library/Preferences/YourPlist.plist"

BOOL GetPrefBool(NSString *key) { return [[NSDictionary dictionaryWithContentsOfFile:plistPath];

%hook ClassName
- (void)function:(int)arg1 function:(int)arg2 function:(int)arg3 {
   if (GetPrefBool(@"")) {
       %orig(arg1ModifiedValue, arg2ModifiedValue, arg3ModifiedValue);
   } else {
       %orig(); //return original implementation since prefs are not enabled
   }
}
%end
Updated by Dwayne Johnson
Posted

here this from my tweak.xm from Fragger patcher

%hook Score

-(bool)allowedLevel:(int)arg1 World:(int)arg2 {
if(GetPrefBool(@"key2")) {
return TRUE;
arg1 = 0;
arg2 = 0;
%orig(arg1, arg2);
}
return %orig;
}

%end

Going to test that.

Damn, how fast do you guys type...

 

Cant keep up with replies.

Posted

So

 

%hook ClassName
- (void)function:(int)arg1 function:(int)arg2 function:(int)arg3 {
   %orig(arg199999999, arg299999999, arg39999999);
}
%end

It's actually:

 

%orig(99999999, 99999999, 9999999);

 

Make sure the number is not set to above 2,147,483,647 at which point numbers exceeding that value are turned negative, if you want to use that value in Hacking, use this:

 

%orig(INT_MAX, INT_MAX, INT_MAX);

 

Just make sure that the number hacked is permanent, and never exceeds that amount. :)

Posted

So

%hook ClassName
- (void)function:(int)arg1 function:(int)arg2 function:(int)arg3 {
   %orig(arg199999999, arg299999999, arg39999999);
}
%end
?
do what i said it's work for me

also you don't need to return all the functions like the pic you want to return argument 2 so write

arg2 = 9999;
%orig(arg2)
you can change the value :)

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

    • Loot Heroes v1.6.9 +10 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Loot Heroes: Fantasy RPG Games By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes-fantasy-rpg-games/id6642699678?uo=4


      Hack Features:
      - Freeze Currencies
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - All Heroes Unlocked
      - All Skins Unlocked
      - No Skill Cooldown
      - No Ads

      VIP
      - Unlimited Currencies -> Earn some.
      - Auto Win
      - Battle Pass Unlocked
      • 114 replies
    • Loot Heroes v1.6.9 +10 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Loot Heroes By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes/id6642699678?uo=4


      Hack Features:
      - Freeze Currencies
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - All Heroes Unlocked
      - All Skins Unlocked
      - No Skill Cooldown
      - No Ads

      VIP
      - Unlimited Currencies -> Earn some.
      - Auto Win
      - Battle Pass Unlocked
      • 256 replies
    • Nightfall: Kingdom Frontier TD v1.0.404 +8 Jailed Cheats [ Currencies ]
      Modded/Hacked App: Nightfall: Kingdom Frontier TD By Fansipan Limited
      Bundle ID: com.fansipan.nightfall.tower.simulation.strategy.td.game
      iTunes Store Link: https://apps.apple.com/us/app/nightfall-kingdom-frontier-td/id6621272416?uo=4


      Hack Features:
      - God Mode
      - Unlimited In-Game Coins -> Will increase instead of decrease.
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      - Add 1K Currency -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All Features -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All / Everything ->  Head over to Settings and toggle the Discord button. [ VIP ]
      - Complete Tutorial -> Head over to Settings and toggle the Discord button. [ VIP ]


      Jailbreak required hack(s): [Mod Menu Hack] Nightfall: Kingdom Frontier TD v1.0.41 +8 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/
        • Haha
        • Winner
      • 95 replies
    • Dawn of Ages: Medieval Games v2.0.5 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
      • 54 replies
    • Dawn of Ages: Medieval Games v2.0.5 +5 Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
      • 32 replies
    • Goblins Wood: Tycoon Idle Sim v2.49.1 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Goblins Wood: Tycoon Idle Sim By ProGamesLab LTD
      Bundle ID: idle.goblins.wood.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/goblins-wood-tycoon-idle-sim/id6446766326?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Goblins Wood: Tycoon Idle Sim v2.42.0 +1++ Cheat [ 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/
        • Like
      • 26 replies
    • Goblins Wood: Tycoon Idle Sim v2.49.1 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Goblins Wood: Tycoon Idle Sim By ProGamesLab LTD
      Bundle ID: idle.goblins.wood.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/goblins-wood-tycoon-idle-sim/id6446766326?uo=4


      Hack Features:
      - Unlimited Currencies -> Will increase instead of decrease.


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Goblins Wood: Tycoon Idle Sim v2.42.0 +1++ Jailed Cheat [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
      • 33 replies
    • Nightfall: Kingdom Frontier TD v1.0.404 +8 Cheats [ Currencies ]
      Modded/Hacked App: Nightfall: Kingdom Frontier TD By Fansipan Limited
      Bundle ID: com.fansipan.nightfall.tower.simulation.strategy.td.game
      iTunes Store Link: https://apps.apple.com/us/app/nightfall-kingdom-frontier-td/id6621272416?uo=4


      Hack Features:
      - God Mode
      - Unlimited In-Game Coins -> Will increase instead of decrease.
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      - Add 1K Currency -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All Features -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All / Everything ->  Head over to Settings and toggle the Discord button. [ VIP ]
      - Complete Tutorial -> Head over to Settings and toggle the Discord button. [ VIP ]


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Nightfall: Kingdom Frontier TD v1.0.41 +8 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
      • 106 replies
    • Hitman: Blood Money — Reprisal v1.3 +5++ Jailed Cheats [ Cheats Menu ]
      Modded/Hacked App: Hitman: Blood Money — Reprisal By Feral Interactive Ltd
      Bundle ID: com.feralinteractive.hitmanbloodmoney-ios
      App Store Link: https://apps.apple.com/us/app/hitman-blood-money-reprisal/id1631331207?uo=4

       


      🤩 Hack Features

      - Freeze Ammo
      - Freeze Reserve Ammo
      - Insane Fire Rate
      - Unlimited Cash -> Earn or spend some.
      - Cheats Menu -> Pause in-game and scroll to the bottom. See picture below for more!

      Full Game unlock isn't possible. I've tried, trust me. Either pay or not, it's up to you.
      • 0 replies
    • Hitman: Blood Money — Reprisal v1.3 +5++ Cheats [ Cheats Menu ]
      Modded/Hacked App: Hitman: Blood Money — Reprisal By Feral Interactive Ltd
      Bundle ID: com.feralinteractive.hitmanbloodmoney-ios
      App Store Link: https://apps.apple.com/us/app/hitman-blood-money-reprisal/id1631331207?uo=4

       
       

      🤩 Hack Features

      - Freeze Ammo
      - Freeze Reserve Ammo
      - Insane Fire Rate
      - Unlimited Cash -> Earn or spend some.
      - Cheats Menu -> Pause in-game and scroll to the bottom. See picture below for more!

      Full Game unlock isn't possible. I've tried, trust me. Either pay or not, it's up to you.
      • 0 replies
    • Final Outpost v2.3.18 [+3 Jailed Cheats]
      Modded/Hacked App: Final Outpost By Exabyte Games Ltd
      Bundle ID: com.samclothier.DEADfense
      iTunes Store Link: https://apps.apple.com/us/app/final-outpost/id1425444801?uo=4



      🤩 Hack Features

      -  Always Enough Resources
      -  Always Attain Skill
      -  No Food Consume
      • 18 replies
    • Final Outpost v2.3.18 [+3 Cheats]
      Modded/Hacked App: Final Outpost By Exabyte Games Ltd
      Bundle ID: com.samclothier.DEADfense
      iTunes Store Link: https://apps.apple.com/us/app/final-outpost/id1425444801?uo=4

       

      🤩 Hack Features

      -  Always Enough Resources
      -  Always Attain Skill
      -  No Food Consume
      • 14 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