Jump to content

36 posts in this topic

Recommended Posts

Background

I created a unity project on my computer and wrote simple C# to then convert to Arm through Unity's Il2cpp compiler.  I have more complicated conversions but they would be pretty hard to explain.  If you do want those conversions then make sure to comment below :)

Example Conversions

Force True: C#

    private bool True()
    {
        return true;
    }

Force True: IDA Arm

 MOV             R0, #1
 BX              LR
hex -> 01 00 A0 E3 1E FF 2F E1

 

 

Force False: C#

    private bool False()
    {
        return false;
    }

Force False: IDA Arm

 MOV             R0, #0
 BX              LR
hex -> 00 00 A0 E3 1E FF 2F E1

 

 

Force positive int: C#

    private int pInt()
    {
        return 999;
    }

Force positive int: IDA Arm

 MOV             R0, #999
 BX              LR
hex -> E7 03 00 E3 1E FF 2F E1

 

 

Force Float: C#

    private float pFloat()
    {
        return 999f;
    }

Force Float: IDA Arm

 MOV             R0, #0x447A
 BX              LR
hex -> 7A 04 04 E3 1E FF 2F E1
// 447A <= 447A0000 Float Hexadecimal
// Convert Int to Float here - https://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html
// Convert Float to Int here - https://babbage.cs.qc.cuny.edu/IEEE-754.old/32bit.html

You CANNOT use hexadecimals longer than 4 character long

Working example => Movt r0, #447A (1000 int)

Not-Working Example => Movt r0, #4479C (999 int)

There is a way to use longer hexadecimal floating points with MOV and I plan on adding it in the future.

 

 

Force Int or Float into a field: C#

//float
    private void setFieldF()
    {
        fieldF = 1000F;
    }

    public float fieldF;

//int
    private void setFieldI()
    {
        fieldI = 1000;
    }

    public int fieldI;

Force Int or Float into a field: IDA Arm

Get your field offset from your generated dump.cs from Il2CppDumper by Prefare.

//float field
 MOV             R1, #0x447A
 STR             R1, [R0,#0x10] // replace "0x10" with your field offset inside of dump.cs
 BX              LR
hex -> 7A 14 04 E3 10 10 80 E5 1E FF 2F E1
   
//int field
 MOV             R1, #1000
 STR             R1, [R0,#0x14] // replace "0x14" with your field offset inside of dump.cs
 BX              LR
hex -> FA 1F A0 E3 14 10 80 E5 1E FF 2F E1

 

 

Force Return with Parameters:  C#

// 1 Parameter
	private string Param1(string one)
    {
        return one;
    }

//2 Parameters
	private int Param2(int one, int two)
    {
        return two;
    }

//3 Parameters
	private int Param2(float one, float two, float three)
    {
        return three;
    }

Force Return with Parameters:  IDA Arm

It does not matter if the function is string, int, or float, if the function is the same type as the parameter then it will be the same arm code regardless.

//1 Parameter
 MOV             R0, R1
 BX              LR
hex -> 01 00 A0 E1 1E FF 2F E1
//2 Parameters
 MOV             R0, R2
 BX              LR
hex -> 02 00 A0 E1 1E FF 2F E1
//3 Parameters
 MOV             R0, R3
 BX              LR
hex -> 03 00 A0 E1 1E FF 2F E1
//if the function has more than 3 parameters then reolace the second "R" with said parameter number
Example: 7 Parameters
 MOV             R0, R7
 BX              LR
hex -> 07 00 A0 E1 1E FF 2F E1
Example: 5 Parameters
 MOV             R0, R5
 BX              LR
hex -> 05 00 A0 E1 1E FF 2F E1

 

 

Force end an IEnumertor/IEnumerable: C#

    private IEnumerator setYielEnumerator()
    {
        yield break;
    }

    private IEnumerable setYieldEnumerable()
    {
        yield break;
    }

Force end an IEnumertor/IEnumerable: IDA Arm

Using BX LR to end an IEnumertor or IEnumerable is wrong.  Go to dump.cs and find the IEnumertor or IEnumerable function

Say for example dump.cs says this

private IEnumerator setYielEnumerator(); // 0xOFFSET

or

private IEnumerable setYieldEnumerable(); // 0xOFFSET

Find the "sealed class" that has the function name in the class name

Example

// Namespace: 
private sealed class <setYielEnumerator>c__Iterator0 : IEnumerator, IDisposable, IEnumerator`1<object> // TypeDefIndex: 1446
{
	// Fields
	internal object $current; // 0x8
	internal bool $disposing; // 0xC
	internal int $PC; // 0x10

	// Methods
	public void .ctor(); // 0xOFFSET
	public bool MoveNext(); // 0xOFFSET
	private object System.Collections.Generic.IEnumerator<object>.get_Current(); // 0xOFFSET
	private object System.Collections.IEnumerator.get_Current(); // 0xOFFSET
	public void Dispose(); // 0xOFFSET
	public void Reset(); // 0xOFFSET
}

// Namespace: 
private sealed class <setYieldEnumerable>c__Iterator1 : IEnumerable, IEnumerable`1<object>, IEnumerator, IDisposable, IEnumerator`1<object> // TypeDefIndex: 1447
{
	// Fields
	internal object $current; // 0x8
	internal bool $disposing; // 0xC
	internal int $PC; // 0x10

	// Methods
	public void .ctor(); // 0xOFFSET
	public bool MoveNext(); // 0xOFFSET
	private object System.Collections.Generic.IEnumerator<object>.get_Current(); // 0xOFFSET
	private object System.Collections.IEnumerator.get_Current(); // 0xOFFSET
	public void Dispose(); // 0xOFFSET
	public void Reset(); // 0xOFFSET
	private IEnumerator System.Collections.IEnumerable.GetEnumerator(); // 0xOFFSET
	private IEnumerator`1<object> System.Collections.Generic.IEnumerable<object>.GetEnumerator(); // 0xOFFSET
}

Go to the offset of MoveNext()

public bool MoveNext(); // 0xOFFSET

And write this in hex editor

 MOV             R1, #0xFFFFFFFF
 STR             R1, [R0,#0x10]
 MOV             R0, #0
 BX              LR
hex -> 00 10 E0 E3 10 10 80 E5 00 00 A0 E3 1E FF 2F E1
//same hex for both IEnumertor and IEnumerable

Credits

@Jbro129 for the tutorial

Prefare for Il2CppDumper

- Kienn, @Valeschi ,  @Earthiest and @DiDA for Armconverter.com

Updated by Jbro129
  • Like 3
  • Winner 1
  • Thanks 1
  • Agree 1
  • Informative 2
Link to comment
https://iosgods.com/topic/64302-some-c-to-il2cpp-conversions/
Share on other sites

On 2/9/2018 at 5:10 PM, Joka said:

Nice work man. Basic but very helpful! <3

Perhaps we will see an helpful "Advanced" one from you in the near future? <3

 

@Jbro129 I'd appreciate it if you added more conversions.

Updated by CA3LE

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

    • (Dragon Ball Legends Japan)ドラゴンボール レジェンズ  v5.14.0 +13 Jailed Cheats
      Modded/Hacked App: ドラゴンボール レジェンズ By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0333
      iTunes Store Link: https://itunes.apple.com/jp/app/ドラゴンボール-レジェンズ/id1358232022?mt=8


      Mod Requirements:
      - Jailbroken or Non-Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - Enemies Don't Attack
      - No Ki Cost
      - Unlimited Ki
      - No Character Swap CoolDown
      - No Vanish CoolDown
      - Auto Complete All Challenges - Currency/Chrono Crystals Hack! 
      - Always Critical
      - All Cards Give DragonBall 

       This hack only works on x64 or ARM64 iDevices: iPhone 5s, 6, 6 Plus, 6s, 6s Plus, 7, 7 Plus, 8, 8 Plus, X, SE, iPod Touch 6G, iPad Air, Air 2, Pro & iPad Mini 2, 3, 4 and later.
      • 3,087 replies
    • DRAGON BALL LEGENDS v5.14.0 +7 FREE Cheats
      Modded/Hacked App: DRAGON BALL LEGENDS by BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0334
      iTunes Store Link: https://apps.apple.com/us/app/dragon-ball-legends/id1358222641


      Hack Features:
      - No Swap Cooldown
      - No Vanish Cooldown
      - No KI Cost
      -  Auto Complete all Challenges
      - Always Critical
      - Tutorial Bypassed
      - Enemies don't Attack


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/70408-ios-13-support-dragon-ball-legends-v2110-3-jailed-cheats-no-ki-cost-more/
      Japanese Version: https://iosgods.com/topic/75598-dbl-%E3%83%89%E3%83%A9%E3%82%B4%E3%83%B3%E3%83%9C%E3%83%BC%E3%83%AB-%E3%83%AC%E3%82%B8%E3%82%A7%E3%83%B3%E3%82%BA-by-bandai-namco-entertainment-inc-v2100-instant-win-more/?
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 3,372 replies
    • [ DBL ]ドラゴンボール レジェンズ v5.14.0 - [ Instant - Win & More ]
      Modded/Hacked App: ドラゴンボール レジェンズ By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0333
      iTunes Store Link: https://itunes.apple.com/jp/app/ドラゴンボール-レジェンズ/id1358232022


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - x Player Damage - x1 - 20 
      - x Player Defense - x1 - 20 
      - One Hit Kill
      - God Mode 
      - 1 Enemy Per Quest
      - Instant - Win - Enable It When You In Battle
      - No Swap CoolDown
      - No Vanish CoolDown
      - No KI Cost
      - Auto Complete All Challenges-> Currency/Chrono Crystals Hack!
      - Always Critical
      - Tutorial Bypass
      - All Cards Give DragonBalls

      All functions are unlinked and only for player, you!
      • 1,619 replies
    • DRAGON BALL LEGENDS v5.14.0 +14 Jailed Cheats
      Modded/Hacked App: DRAGON BALL LEGENDS By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0334
      iTunes Store Link: https://itunes.apple.com/us/app/dragon-ball-legends/id1358222641


      Mod Requirements:
      - Jailbroken or Non-Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - Enemies Don't Attack
      - No Ki Cost
      - Unlimited Ki
      - Tutorial Bypassed - No Need To Play Tutorial
      - No Character Swap CoolDown
      - No Vanish CoolDown
      - Auto Complete All Challenges - Currency/Chrono Crystals Hack! 
      - Always Critical
      - All Cards Give DragonBall 
      • 2,652 replies
    • DRAGON BALL LEGENDS v5.14.0 +7 Jailed Cheats
      Modded/Hacked App: DRAGON BALL LEGENDS By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0334
      iTunes Store Link: https://itunes.apple.com/us/app/dragon-ball-legends/id1358222641


      Mod Requirements:
      - Jailbroken or Non-Jailbroken iPhone/iPad/iPod Touch.
      - Cydia Impactor.
      - A Computer Running Windows/Mac/Linux.


      Hack Features:
      - No Ki Cost
      - No Character Swap Cooldown
      - No Vanish Cooldown
      - Tutorial Bypassed
      • 5,279 replies
    • DRAGON BALL LEGENDS v5.14.0 +13 Cheats
      Modded/Hacked App: DRAGON BALL LEGENDS By BANDAI NAMCO Entertainment Inc.
      Bundle ID: jp.co.bandainamcoent.BNEI0334
      iTunes Store Link: https://itunes.apple.com/us/app/dragon-ball-legends/id1358222641


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate (from Cydia).
      - PreferenceLoader (from Cydia).


      Hack Features:
      - x Player Damage - x1 - 20 
      - x Player Defense - x1 - 20 
      - One Hit Kill
      - God Mode 
      - 1 Enemy Per Quest
      - Instant - Win - Turn On When You In Battle
      - No Swap CoolDown
      - No Vanish CoolDown
      - No KI Cost
      - Auto Complete All Challenges-> Currency/Chrono Crystals Hack!
      - Always Critical
      - Tutorial Bypass
      - All Cards Give DragonBalls

      All features are unlinked and only for player, you!
      • 4,774 replies
    • OUTERPLANE - Strategy Anime v1.2.78 +2 Jailed Cheats
      Modded/Hacked App: OUTERPLANE - Strategy Anime By Smilegate Holdings, Inc.
      Bundle ID: com.smilegate.outerplane.stove.ios
      iTunes Store Link: https://apps.apple.com/us/app/outerplane-strategy-anime/id1630880836?uo=4

       

      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - God mode
      - OHK
      - Unlimited AP
      - No CD skill
      • 26 replies
    • OUTERPLANE - Strategy Anime v1.2.78 +2 Cheats
      Modded/Hacked App: OUTERPLANE - Strategy Anime By Smilegate Holdings, Inc.
      Bundle ID: com.smilegate.outerplane.stove.ios
      iTunes Store Link: https://apps.apple.com/us/app/outerplane-strategy-anime/id1630880836?uo=4

       

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - God mode
      - OHK
      - Unlimited AP
      - No CD skill
      • 135 replies
    • Tailed Demon Slayer v1.6.14 +16 Jailed Cheats
      Modded/Hacked App: Tailed Demon Slayer By cookapps
      Bundle ID: com.cookapps.taileddemonslayer
      iTunes Store Link: https://apps.apple.com/us/app/tailed-demon-slayer/id1587114188?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - No Skills Cooldown
      - Attack Speed Multiplier
      - Move Speed Multiplier
      - Add VIP*
      - Add Pet*
      - Add Card Point*
      - Add Box*
      - Add All Items*
      - All Items Max Level*
      - Max Level*
      - Unlimited Currencies*
      - Max Skill Level*
      - Relics Max Level*
      - Skip 100 Stages*

      * Go to Settings → Click Save Data


      Jailbreak required hack(s): 


      iOS Hack Download Link:

      Hidden Content
      React or reply to this topic to see the <a href='https://iosgods.com/topic/3762-info-how-to-unlockview-the-hidden-content-on-iosgods/?do=findComment&comment=78119'>hidden content & download link</a>.







      • 229 replies
    • Tailed Demon Slayer v1.6.14 +16 Cheats
      Modded/Hacked App: Tailed Demon Slayer By cookapps
      Bundle ID: com.cookapps.taileddemonslayer
      iTunes Store Link: https://apps.apple.com/us/app/tailed-demon-slayer/id1587114188?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing / or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Never Die
      - Unlimited Currency [ Can Spend ]


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file is downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy to Filza.
      STEP 3: If necessary, tap on the downloaded file and then, you will need to press on 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - Zahir


      Cheat Video/Screenshots:

      N/A
      • 583 replies
    • Mini Legend - 4WD Racing Sim v3.13.0 +1 Jailed Cheat
      Modded/Hacked App: Mini Legend - 4WD Racing Sim By Twitchy Finger Limited
      Bundle ID: com.twitchyfinger.itunes.minilegend
      iTunes Store Link: https://apps.apple.com/us/app/mini-legend-4wd-racing-sim/id1030310599?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Instant Win


      Jailbreak required hack(s): 


      iOS Hack Download IPA Link:

      Hidden Content

      Download via the iOSGods App








      PC Installation Instructions:
      STEP 1: If necessary, uninstall the app if you have it installed on your iDevice. Some hacked IPAs will install as a duplicate app. Make sure to back it up so you don't lose your progress.
      STEP 2: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see this tutorial topic.
      STEP 3: Download Sideloadly and install it on your PC.
      STEP 4: Open/Run Sideloadly on your computer, connect your iOS Device, and wait until your device name shows up.
      STEP 5: Once your iDevice appears, drag the modded .IPA file you downloaded and drop it inside the Sideloadly application.
      STEP 6: You will now have to enter your iTunes/Apple ID email login, press "Start" & then you will be asked to enter your password. Go ahead and enter the required information.
      STEP 7: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 8: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles/VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 9: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. Jailbroken iDevices can also use Sideloadly/Filza/IPA Installer to normally install the IPA with AppSync. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 23 replies
    • (Jujutsu Kaisen: Phantom Parade) 呪術廻戦 ファントムパレード v2.1.0 +5 Jailed Cheats
      Modded/Hacked App: 呪術廻戦 ファントムパレード By Sumzap Inc.
      Bundle ID: jp.co.sumzap.pj0014
      iTunes Store Link: https://apps.apple.com/jp/app/%E5%91%AA%E8%A1%93%E5%BB%BB%E6%88%A6-%E3%83%95%E3%82%A1%E3%83%B3%E3%83%88%E3%83%A0%E3%83%91%E3%83%AC%E3%83%BC%E3%83%89/id1551798277?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier
      - Unlimited BP
      - Unlimited EN
      - Special Skill Always Active


      Jailbreak required hack(s): 


      iOS Hack Download IPA Link:

      Hidden Content

      Download via the iOSGods App








      PC Installation Instructions:
      STEP 1: If necessary, uninstall the app if you have it installed on your iDevice. Some hacked IPAs will install as a duplicate app. Make sure to back it up so you don't lose your progress.
      STEP 2: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see this tutorial topic.
      STEP 3: Download Sideloadly and install it on your PC.
      STEP 4: Open/Run Sideloadly on your computer, connect your iOS Device, and wait until your device name shows up.
      STEP 5: Once your iDevice appears, drag the modded .IPA file you downloaded and drop it inside the Sideloadly application.
      STEP 6: You will now have to enter your iTunes/Apple ID email login, press "Start" & then you will be asked to enter your password. Go ahead and enter the required information.
      STEP 7: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 8: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles/VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 9: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. Jailbroken iDevices can also use Sideloadly/Filza/IPA Installer to normally install the IPA with AppSync. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 161 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