Tutorial Editing Offsets,Floats and Hex codes in Il2cpp games.

DVAツ

Solid & Active Platinian
Original poster
Dec 8, 2020
87
8,789
183
APK
Editing Offsets,Floats and Hex codes in Il2cpp games.


Hello, guys so today I thought to give you a tutorial about IL2CPP modding.
So I have seen many tutorials about this topic but today I will teach you how con you apply this modding to every game.
So I have uploaded a video about this so you can watch this to get a big experience.


Modding

Good tutorial (Credits to @DVΛ and @Yaskashije)

Video
So there are 2 types of libraries,
i) Libs use IDA
ii) Libs that don't need IDA //This tutorial


Editing Offsets

***So if you are trying to mod another game it's easy to mod using dummy dlls.***

1)So when you dump a lib you can see a folder called "dummy dll" so after dumping you can open this folder and simply drag and drop these dll files to dnSpy to find offsets more easily.
1.png



2.png

So after you find the offsets from the dummydlls then open the same library using HxD and start editing the hex codes.

Use
"Ctrl+G" to go/find the respective hex value of the offset.

3.png


These are some offsets that I use (credits to @LEIIKUN )

Code:
00 00 A0 E3 1E FF 2F E1  = False or number 0
01 00 A0 E3 1E FF 2F E1  = True or number 1
02 00 A0 E3 1E FF 2F E1  = Number 2
07 00 A0 E3 1E FF 2F E1  = Number 7
0A 00 A0 E3 1E FF 2F E1  = Number 10
0F 00 A0 E3 1E FF 2F E1  = Number 15
10 00 A0 E3 1E FF 2F E1  = Number 16
11 00 A0 E3 1E FF 2F E1  = Number 17
12 07 80 E3 1E FF 2F E1  = VALUE OF 12 Million or It can be used for health/ammo/armour/damage
DC 0F 00 E3 1E FF 2F E1  = VALUE 4060
DC OF OF E3 1E FF 2F E1  = VALUE 120000
01 00 A0 E3 1E FF 2F E1  = VALUE 1 Also = True used for bool
00 00 A0 E3 1E FF 2F E1  = Value 0 Also = False used for bool
01 0A A0 E3 1E FF 2F E1  = 1000
01 08 A0 E3 1E FF 2F E1  = 10000
01 02 A0 E3 1E FF 2F E1  = 10000000
C2 0A 64 60 00 00 00 02  = Speed Hack
01 04 A0 E3 1E FF 2F E1  = 1000000
0E 00 A0 E3 1E FF 2F E1  = Fire Rate
02 01 E0 E3 1E FF 2F E1  = 2,147,483,648
7F 04 E0 E3 1E FF 2F E1  = 2,130,706,432
7F 06 A0 E3 1E FF 2F E1  = 133,169,152
0F 07 02 E3 1E FF 2F E1  = 9,999
FA 04 44 E3 1E FF 2F E1  = 2,000
FF 09 0C E3 00 10 A0 E3 9A 0B 43 E3 1E FF 2F E1 = 999,999,999
So you can use these hex codes for your modding.

So after you have pressed Ctrl+G and paste the offset and found the value
4.png


Then copy the hex code from here (for ex:- think 0xf9215 is the offset, then press "ctrl+G" and paste the offset without "0x" and you can see your cursor has gone to the beginning of the following offset and copy the hex code and press "Ctrl+B" to apply the new hex code).

Then you can see new hex code has applied and it has highlighted in red.

5.png


Editing Floats

So if you find an offset and if there is a word called "(float)" you can use above mentioned hex codes. But the editing is the same but the codes are different.

Some codes for editing floats(credits to @AndnixSH )

Code:
1 = 0000803F
2 = 00000040
4 = 00008040
8 = 00000041
16 = 00008041
32 = 00000042
64 = 00008042
128 = 00000043
256 = 00008043
512 = 00000044
1024 = 00008044
2048 = 00000045
4096 = 00008045
8192 = 00000046
16384 = 00008046
32768 = 00000047
65536 = 00008047
131072 = 00000048
262144 = 00008048
524288 = 00000049
1048576 = 00008049
2097152 = 0000004A
4194304 = 0000804A
8388608 = 0000004B
16777216 = 0000804B
33554432 = 0000004C
67108864 = 0000804C
134217728 = 0000004D
268435456 = 0000804D
536870912 = 0000004E
1073741824 = 0000804E
-2147483648 = 000000CF
So after you have edited the offsets you can save the library and copy the library to the APK and sign it. So you can see the game has modded now!

Join my Discord for more information and help and you can leave a comment here about your thoughts.
Discord:- Join the DVΛ Modding Discord Server!
 

Attachments

Last edited:

Lilelf

Platinian
Jul 18, 2020
16
4
3
38
Singa
ok so the tutorial is very clear and easy to follow. I tried this out with cookie run kingdom apk. recompiled without errors and i installed the app. but when i launched it , the app couldn't work.

So then what i did was use APK Easy to just decompile and recompile without even changing a single thing. Installed the APK aain and it still didn't work!
How is that possible when nothing was modified?
 

LEIIKUN

Retired Staff
Retired but loved <3
Oct 13, 2019
500
10,985
1,193
20
Davao
ok so the tutorial is very clear and easy to follow. I tried this out with cookie run kingdom apk. recompiled without errors and i installed the app. but when i launched it , the app couldn't work.

So then what i did was use APK Easy to just decompile and recompile without even changing a single thing. Installed the APK aain and it still didn't work!
How is that possible when nothing was modified?
Sign the apk or most common issue is you're having a problem with the lib.
 
  • Like
Reactions: Marian66

Suprabha

Platinian
Jan 27, 2018
20
3
3
24
I tried this out and easy to follow but the next time I'm decompiling the same game after deleting the previous decompiled folder but this time the lib folder is missing no matter how many times I try to decompile and check although the first time it was there!
 

DokoRoxor

Just Crazy
Jun 9, 2018
313
18,250
1,193
35
Somewhere in The Sky
@SchatzyHack Cuz you have to sign the apk after modify the lib. also , you cant install mod apk over orignal apk without root.
Try this way , Uninstall original > mod your lib > replace lib into apk > sign apk > install > Test.
If you still cant install it , its certainly cuz you try to install it on android 11 , and you need to patch the targetSDK to get it working.
 
Last edited: