CodschildGaming How do I cheat? Reputation: 0
Joined: 11 Apr 2018 Posts: 3
|
Posted: Mon Sep 20, 2021 3:09 am Post subject: [ASM] How to multiply ecx only? |
|
|
I am trying to only edit the ecx value to be ecx*1.5 or (ecx*15)/10. I have tried a method from the forums already but it broke the rest of the function in game.
The function in game adds xp (respect) to the player, ecx is the xp getting added. I believe esi is the max respect the player can have at the time. Using the other method on the forums goes past the max respect limit, while this seems to be okay I'd rather avoid it as the respect caps out when you have enough to finish every main mission in game.
Changing the ecx value alone makes sure the the respect doesn't go past the limit in game.
Code: | cmp ecx,esi
mov [esp+10],eax
jmp return
|
Assembly Stack:
Code: | {
// ORIGINAL CODE - INJECTION POINT: 009DBAFB
009DBADA: DF E0 - fnstsw ax
009DBADC: DD D9 - fstp st(1)
009DBADE: F6 C4 01 - test ah,01
009DBAE1: 75 08 - jne 009DBAEB
009DBAE3: DC 05 70 BF E5 00 - fadd qword ptr [00E5BF70]
009DBAE9: EB 06 - jmp 009DBAF1
009DBAEB: DC 25 70 BF E5 00 - fsub qword ptr [00E5BF70]
009DBAF1: E8 4A 46 3C 00 - call 00DA0140
009DBAF6: 03 C3 - add eax,ebx
009DBAF8: 8D 0C 28 - lea ecx,[eax+ebp]
// ---------- INJECTING HERE ----------
009DBAFB: 3B CE - cmp ecx,esi
// ---------- DONE INJECTING ----------
009DBAFD: 89 44 24 10 - mov [esp+10],eax
009DBB01: 7C 08 - jl 009DBB0B
009DBB03: 2B F5 - sub esi,ebp
009DBB05: 8B C6 - mov eax,esi
009DBB07: 89 44 24 10 - mov [esp+10],eax
009DBB0B: 8B 8F FC 11 00 00 - mov ecx,[edi+000011FC]
009DBB11: 33 D2 - xor edx,edx
009DBB13: 03 C8 - add ecx,eax
009DBB15: 85 C9 - test ecx,ecx
009DBB17: 0F 9E C2 - setle dl
} |
What I tried:
Code: | push edx
push ecx
mov ecx,[multi] //multi is a int value, changeable in cheat table, added via parent script
mul ecx
mov ecx,#10
xor edx,edx
div ecx
pop ecx
pop edx
cmp ecx,esi
mov [esp+10],eax
jmp return |
I don't know much about assembly just kinda jumped in 2 days ago to work on saints row 2 due to a max respect cheat never being made for it, now I am wanting to mess around with it a little to use it in other games. |
|