 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
johnnyjohn How do I cheat?
Reputation: 0
Joined: 13 Aug 2020 Posts: 2
|
Posted: Thu Aug 13, 2020 8:53 pm Post subject: Instruction Can't be Compiled |
|
|
I'm trying to get full "energy" or action points in a game, which drains as I run or jump, if I replace the code with no-op I can run forever but it also breaks other stuff (enemies will show the wrong ammount of health, my health bar will go crazy, even though the "right" values are still there, I'm just not seeing them correctly). So I thought of multiplying the value that the instruction `movss` is using instead, assuring that I'll never let certain values reach 0 ( yes I'm desperate).
This is the specific instruction:
| Code: | | movss [rax+rdx*8],xmm2 |
And this is the function block to which it belongs to:
| Code: | AGame.exe+179F220 - 8B 82 F0010000 - mov eax,[rdx+000001F0]
AGame.exe+179F226 - 85 C0 - test eax,eax
AGame.exe+179F228 - 78 10 - js AGame.exe+179F23A
AGame.exe+179F22A - 8B D0 - mov edx,eax
AGame.exe+179F22C - 48 8B 41 38 - mov rax,[rcx+38]
AGame.exe+179F230 - F3 0F11 14 D0 - movss [rax+rdx*8],xmm2
AGame.exe+179F235 - C6 44 D0 04 00 - mov byte ptr [rax+rdx*8+04],00
AGame.exe+179F23A - C3 - ret
|
I've been looking for a good tutorial on opcodes to no avail, everything seems like it won't fit for what I'm trying to do with CE, I'm open to any suggestions.
Anyway, what am I doing wrong, and how do I do it right?
Thanks[/code]
|
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4722
|
Posted: Thu Aug 13, 2020 10:44 pm Post subject: |
|
|
You could do something like step 9 of the CE tutorial, but in practice that's usually easier said than done. (if you already find that value automatically, e.g. pointer or injection copy, just use that)
https://www.felixcloutier.com/x86/mulss
MULSS — Multiply Scalar Single-Precision Floating-Point Values - in simpler terms, "multiply floats"
MULSS xmm1,xmm2/m32 - destination is an xmm register, source is an xmm register or memory location
(ignore the other AVX stuff)
e.g. this will work:
| Code: | //...
newmem:
mulss xmm2,[multiplyValue]
movss [rax+rdx*8],xmm2
jmp return
align 4 CC
multiplyValue:
dd (float)0.9
//... |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
johnnyjohn How do I cheat?
Reputation: 0
Joined: 13 Aug 2020 Posts: 2
|
Posted: Fri Aug 14, 2020 3:47 pm Post subject: |
|
|
| ParkourPenguin wrote: | You could do something like step 9 of the CE tutorial, but in practice that's usually easier said than done. (if you already find that value automatically, e.g. pointer or injection copy, just use that)
MULSS — Multiply Scalar Single-Precision Floating-Point Values[/b] - in simpler terms, "multiply floats"
MULSS xmm1,xmm2/m32 - destination is an xmm register, source is an xmm register or memory location
(ignore the other AVX stuff)
e.g. this will work:
| Code: | //...
newmem:
mulss xmm2,[multiplyValue]
movss [rax+rdx*8],xmm2
jmp return
align 4 CC
multiplyValue:
dd (float)0.9
//... |
|
I've tried it but it didn't work, all it did was give me some sort of speed hack, I belive speed movement, speed energy and health (server-side) all go through that piece of code, the main difference seems to be that some numbers are 4 bytes and others are float, I'm not skilled enough to separate those into "groups" and do a filter like I've seen in those videos.
This is the code I have so far:
| Code: | [ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem, 2048, AGame.exe+179F230)
label(return)
label(increaseValue)
newmem:
mulss xmm2,[increaseValue]
movss [rax+rdx*8],xmm2
jmp return
align 4 CC
increaseValue:
dd (float)1.5
AGame.exe+179F230:
jmp newmem
return:
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
AGame.exe+179F230:
movss [rax+rdx*8],xmm2 |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|