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)

 

 

  Reveal hidden contents

 

 

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
  On 12/5/2015 at 8:14 AM, RockCreeper said:

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)
  On 12/5/2015 at 8:22 AM, ITz_kser said:

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
  On 12/5/2015 at 8:22 AM, ITz_kser said:

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
  On 12/5/2015 at 8:28 AM, RockCreeper said:

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
  On 12/5/2015 at 8:27 AM, Dwayne Johnson said:

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)
  On 12/5/2015 at 8:28 AM, RockCreeper said:

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
  On 12/5/2015 at 8:32 AM, ITz_kser said:

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
  On 12/5/2015 at 8:32 AM, RockCreeper said:

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
  On 12/5/2015 at 8:32 AM, RockCreeper said:

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

    • Pal Go: Tower Defense TD v0.3.64 [+7 Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      🚀 Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 39 replies
    • Pal Go: Tower Defense TD v0.3.64 [+7 Jailed Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       

      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 64 replies
    • NETHER MONSTERS v1.03 [+4 Cheats]
      Modded/Hacked App: NETHER MONSTERS By ARAKUMA STUDIO S.A.
      Bundle ID: com.ArakumaStudio.NetherMonsters
      iTunes Store Link: https://apps.apple.com/us/app/nether-monsters/id6742568029?uo=4

       

      🤩 Hack Features

      - Never Die
      - Get IAP Products  
      - Add Currency
      - Auto Win (Enable inside battle)
        • Winner
        • Like
      • 4 replies
    • NETHER MONSTERS v1.03 [+4 Jailed Cheats]
      Modded/Hacked App: NETHER MONSTERS By ARAKUMA STUDIO S.A.
      Bundle ID: com.ArakumaStudio.NetherMonsters
      iTunes Store Link: https://apps.apple.com/us/app/nether-monsters/id6742568029?uo=4



      🤩 Hack Features

      - Never Die
      - Get IAP Products  
      - Add Currency
      - Auto Win (Enable inside battle)
        • Thanks
        • Like
      • 3 replies
    • [ FFBE WoTV Japan ] FFBE幻影戦争 WAR OF THE VISIONS Cheats v12.0.2 +3
      Modded/Hacked App: FFBE幻影戦争 戦略RPG/シミュレーションゲーム By SQUARE ENIX Co., Ltd.
      Bundle ID: com.square-enix.WOTVffbejp
      iTunes Store Link: https://apps.apple.com/jp/app/ffbe%E5%B9%BB%E5%BD%B1%E6%88%A6%E4%BA%89-%E6%88%A6%E7%95%A5rpg-%E3%82%B7%E3%83%9F%E3%83%A5%E3%83%AC%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%82%B2%E3%83%BC%E3%83%A0/id1443703517?uo=4


      Hack Features:
      - Multiply Attack
      - Multiply Defense
      - Full Map Movement


      iOS Hack Download Link: https://iosgods.com/topic/173484-ffbe-wotv-japan-ffbe%E5%B9%BB%E5%BD%B1%E6%88%A6%E4%BA%89-war-of-the-visions-cheats-v916-3/
        • Agree
        • Thanks
        • Like
      • 89 replies
    • Treasure Party: Puzzle Fun! v2.34.3 [ +3 Jailed ] Coins Max
      Modded/Hacked App: Treasure Party: Puzzle Fun! By PlayQ Inc.
      Bundle ID: net.playq.treasureparty4
      iTunes Store Link: https://apps.apple.com/us/app/treasure-party-puzzle-fun/id1668898401?uo=4

       
      Hack Features

      - Coins
      - Lives
      - Moves



      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Haha
        • Thanks
        • Like
      • 14 replies
    • Treasure Party: Puzzle Fun! v2.34.3 [ +3 Cheats ] Coins Max
      Modded/Hacked App: Treasure Party: Puzzle Fun! By PlayQ Inc.
      Bundle ID: net.playq.treasureparty4
      iTunes Store Link: https://apps.apple.com/us/app/treasure-party-puzzle-fun/id1668898401?uo=4

       

      Hack Features

      - Coins
      - Lives
      - Moves



      For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/

       

      iOS Hack Download Link


      Hidden Content

      Download Hack
      • 10 replies
    • Dream Resort - Match 3 Games v1.3.2 [ +7 Jailed ] Auto Win
      Modded/Hacked App: Dream Resort - Match 3 Games By F.O.G LIMITED
      Bundle ID: com.dream.resort.candy.match.mania.ios
      iTunes Store Link: https://apps.apple.com/us/app/dream-resort-match-3-games/id6737011572?uo=4
       

      🚀 Hack Features

      - Auto ADS Disable

      - Coins

      - Diamonds

      - Lives Cost

      - Moves Freeze

      - Booster [ Buy Get Unlimited After use Then work ]

      - Auto win 


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Winner
        • Like
      • 9 replies
    • Dream Resort - Match 3 Games v1.3.2 [ +7 Cheats ] Auto Win
      Modded/Hacked App: Dream Resort - Match 3 Games By F.O.G LIMITED
      Bundle ID: com.dream.resort.candy.match.mania.ios
      iTunes Store Link: https://apps.apple.com/us/app/dream-resort-match-3-games/id6737011572?uo=4

       

      🔧 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Cydia, Sileo or Zebra).

       

      🚀 Hack Features

      - Auto ADS Disable

      - Coins

      - Diamonds

      - Lives Cost

      - Moves Freeze

      - Booster [ Buy Get Unlimited After use Then work ]

      - Auto win 


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Like
      • 10 replies
    • Plant Power - Fruit Showdown! v7.5 [ +20++ Cheats ] Currency Max
      Modded/Hacked App: Plant Power - Fruit Showdown! By Ka Chun CHEUNG
      Bundle ID: com.CHEUNG.plant
      iTunes Store Link: https://apps.apple.com/us/app/plant-power-fruit-showdown/id6657962632?uo=4

       

      🤩 Hack Features

      - ADS NO [ Rewards Free ]

      - Speed UP Card Active

      - Gems

      - Gold

      - Energy

      - Golden Keys

      - Silver Keys

      - Hero Basic [ Unlocked ]

      - Hero Legendary [ Unlocked Just Tap Card ]

      - Weapons Unlocked

      - Walls Unlocked

      - GamePlay Unlocked [ Play Free Any ]

      - Weapon LvL UP Cards

      - Basic Hero LvL UP Cards

      - Wave Faster Skip [ Kill 1 Monster ]

      - Weapon LvL & Status [ ATK SKILL CD CRITI HP ETC ]

      - Basic Hero LvL & Status [ ATK CD CRITI ETC ]

      - Legendary Hero LvL & Status [ ATK CD CRITI ETC ]
        • Winner
        • Like
      • 6 replies
    • Plant Power - Fruit Showdown! v7.5 [ +20++ Jailed ] Currency Max
      Modded/Hacked App: Plant Power - Fruit Showdown! By Ka Chun CHEUNG
      Bundle ID: com.CHEUNG.plant
      iTunes Store Link: https://apps.apple.com/us/app/plant-power-fruit-showdown/id6657962632?uo=4
       

      🤩 Hack Features

      - ADS NO [ Rewards Free ]

      - Speed UP Card Active

      - Gems

      - Gold

      - Energy

      - Golden Keys

      - Silver Keys

      - Hero Basic [ Unlocked ]

      - Hero Legendary [ Unlocked Just Tap Card ]

      - Weapons Unlocked

      - Walls Unlocked

      - GamePlay Unlocked [ Play Free Any ]

      - Weapon LvL UP Cards

      - Basic Hero LvL UP Cards

      - Wave Faster Skip [ Kill 1 Monster ]

      - Weapon LvL & Status [ ATK SKILL CD CRITI HP ETC ]

      - Basic Hero LvL & Status [ ATK CD CRITI ETC ]

      - Legendary Hero LvL & Status [ ATK CD CRITI ETC ]
        • Like
      • 2 replies
    • BASEBALL 9 v3.7.0 +9 Cheats for Jailed iDevices!
      Modded/Hacked App: BASEBALL 9 By playus soft
      Bundle ID: us.kr.baseballnine
      iTunes Store Link: https://apps.apple.com/us/app/baseball-9/id1340866223?uo=4


      Hack Features:
      - Unlimited Coins
      - Unlimited Stamina
      - Unlimited Gems
      - Unlimited Recruit Tickets
      - Unlimited Gold Badges
      - Unlimited Silver Badges
      - Unlimited Platinum Badges
      - Unlimited XP Drinks
      - Unlimited Condition Drinks


      Jailbreak required hack(s): https://iosgods.com/topic/136094-baseball-9-cheats-all-versions-1/


      Hack Download Link: https://iosgods.com/topic/82460-baseball-9-v333-9-cheats-for-jailed-idevices/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,451 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