Jump to content

36 posts in this topic

Recommended Posts

Updated (edited)

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
Posted (edited)
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

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

    • EndZone: Defend and Survive v1.0.1 [+3 Cheats]
      Modded/Hacked App: EndZone: Defend and Survive By Artemis Aura Limited
      Bundle ID: com.jiujiu.zombiedefense
      App Store Link: https://apps.apple.com/us/app/endzone-defend-and-survive/id6742880291?uo=4



      🤩 Hack Features

      - Never Die
      - Always Can Upgrade
      - No Resource Cost
       
      • 0 replies
    • EndZone: Defend and Survive v1.0.1 [+3 Jailed Cheats]
      Modded/Hacked App: EndZone: Defend and Survive By Artemis Aura Limited
      Bundle ID: com.jiujiu.zombiedefense
      App Store Link: https://apps.apple.com/us/app/endzone-defend-and-survive/id6742880291?uo=4



      🤩 Hack Features

      - Never Die
      - Always Can Upgrade
      - No Resource Cost
      • 0 replies
    • Island War Raid V5.8.2 [ +2 Cheats ] Win Fight
      Modded/Hacked App: Island War: Raid By SamShui Corporation
      Bundle ID: com.addictive.strategy.island.clash
      iTunes Store Link: https://apps.apple.com/us/app/island-war-raid/id1542454536?uo=4

      Hack Features:
      - Die Anyone [ Red & Blue ] Win Fight
      - Destroy Building [ Win Fight ] 



      Note:- Works Only [ Arena ]
      • 29 replies
    • Island War Raid V5.8.2 [ +2 Jailed ] Win Fight
      Modded/Hacked App: Island War: Raid By SamShui Corporation
      Bundle ID: com.addictive.strategy.island.clash
      iTunes Store Link: https://apps.apple.com/us/app/island-war-raid/id1542454536?uo=4


      Hack Features:

      - Die Anyone [ Red & Blue ] Win Fight
      - Destroy Building [ Win Fight ] 



      Note:- Works Only [ Arena ]
      • 9 replies
    • Capy Gears v1.00.001 [ +7 Cheats ] Battle Coin
      Modded/Hacked App: Capy Gears By HARVEST STAR INTERACTIVE LIMITED
      Bundle ID: com.qxgame.gear
      App Store Link: https://apps.apple.com/us/app/capy-gears/id6744058532?uo=4
       

      🤩 Hack Features

      - Battle Coin

      - Enemy ATK No

      - Enemy Delay [ Sometime Issue ]

      - Base HP

      - Moving Speed

      - Capy Hero ATK

      - Capy Hero HP
      • 0 replies
    • Capy Gears v1.00.001 [ +7 Jailed ] Battle Coin
      Modded/Hacked App: Capy Gears By HARVEST STAR INTERACTIVE LIMITED
      Bundle ID: com.qxgame.gear
      App Store Link: https://apps.apple.com/us/app/capy-gears/id6744058532?uo=4
       

      🤩 Hack Features

      - Battle Coin

      - Enemy ATK No

      - Enemy Delay [ Sometime Issue ]

      - Base HP

      - Moving Speed

      - Capy Hero ATK

      - Capy Hero HP
      • 0 replies
    • Cooking Diary Restaurant Game v2.39.1 Jailed Cheats +3
      Modded/Hacked App: Cooking Diary® Restaurant Game by MyTona Pte Ltd
      Bundle ID: com.mytonallc.cookingdiary
      iTunes Store Link: https://apps.apple.com/us/app/cooking-diary-restaurant-game/id1214763610?uo=4&at=1010lce4


      Hack Features:
      - Infinite Currencies (Get some)
      - Freeze Boosters


      iOS Hack Download Link: https://iosgods.com/topic/110310-arm64-cooking-diary-restaurant-game-v1160-3/
      • 672 replies
    • Bunker: Zombie Survival Games v5.1.15 [+4 Cheats]
      Modded/Hacked App: Bunker: Zombie Survival Games By APPWILL COMPANY LTD
      Bundle ID: bunker.zombie.survival.games
      App Store Link: https://apps.apple.com/us/app/bunker-zombie-survival-games/id1642910762?uo=4



      🤩 Hack Features

      - Remove Ads (Not Rewarded)
      - Never Die
      - Unlimited Ammo
      - Add Money (Enable Inside Game)
      • 2 replies
    • Bunker: Zombie Survival Games v5.1.15 [+4 Jailed Cheats]
      Modded/Hacked App: Bunker: Zombie Survival Games By APPWILL COMPANY LTD
      Bundle ID: bunker.zombie.survival.games
      App Store Link: https://apps.apple.com/us/app/bunker-zombie-survival-games/id1642910762?uo=4



      🤩 Hack Features

      - Remove Ads (Not Rewarded)
      - Never Die
      - Unlimited Ammo
      - Add Money (Enable Inside Game)
      • 4 replies
    • Plants vs. Zombies™ 2 v12.2.1 +4 Cheats [Unlimited Currencies]
      Modded/Hacked App: Plants vs. Zombies™ 2 By PopCap
      Bundle ID: com.popcap.ios.PvZ2
      iTunes Store Link: https://itunes.apple.com/us/app/plants-vs-zombies-2/id597986893
       

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


      Hack Features:
      - Unlimited Coins
      - Unlimited Gems
      - Unlimited Mints
      • 3,681 replies
    • Five Hearts Under One Roof v1.0.6 +3 Jailed Cheats [ All Chapters Unlocked ]
      Modded/Hacked App: Five Hearts Under One Roof By Storytaco.inc
      Bundle ID: com.storytaco.pc01mclient
      iTunes Store Link: https://apps.apple.com/us/app/five-hearts-under-one-roof/id6742767401?uo=4

       


      🤩 Hack Features

      - Unlimited Love Letters & All Scenes Unlocked
      - All Chapters Unlocked
      - All Ranking Characters Unlocked
      • 26 replies
    • Five Hearts Under One Roof v1.0.6 +3 Cheats [ All Chapters Unlocked ]
      Modded/Hacked App: Five Hearts Under One Roof By Storytaco.inc
      Bundle ID: com.storytaco.pc01mclient
      iTunes Store Link: https://apps.apple.com/us/app/five-hearts-under-one-roof/id6742767401?uo=4

       


      🤩 Hack Features

      - Unlimited Love Letters & All Scenes Unlocked
      - All Chapters Unlocked
      - All Ranking Characters Unlocked
      • 10 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