 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Wed Jan 07, 2015 11:54 am Post subject: [SOLVED] Modify XMM registers |
|
|
Hi
I have a game that uses XMM registers to handle Health. The instruction that modify enemy health is 07F54B17
| Code: |
07F54AFB: F3 0F 7E 87 78 01 00 00 - movq xmm0,[edi+00000178]
07F54B03: F3 0F 7E 8D 60 FF FF FF - movq xmm1,[ebp-000000A0]
07F54B0B: 66 0F D6 8D D0 FE FF FF - movq [ebp-00000130],xmm1
07F54B13: F2 0F 5C C1 - subsd xmm0,xmm1
// ---------- INJECTING HERE ----------
07F54B17: 66 0F D6 87 78 01 00 00 - movq [edi+00000178],xmm0
// ---------- DONE INJECTING ----------
07F54B1F: 8B 05 58 02 6E 0E - mov eax,[0E6E0258]
07F54B25: 83 EC 04 - sub esp,04
|
I want to set xmm0 = 0 before 07F54B17 is executed, I tried this:
| Code: |
mov xmm0,(double)0 //can't be compiled
movq xmm0,(double)0 //can't be compiled
movss xmm0,(double)0 //can't be compiled
movq [edi+00000178],xmm0
|
I didn't tried the 3 instructions at the same time, any of this instructions can't be compiled... how can I set values to XMM registers?
Other possible way is set xmm1 = 99999999 so this will be a "1 hit kill", but I have the same problem lol
Thanks!  _________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE
Last edited by aikoncwd on Wed Jan 07, 2015 12:21 pm; edited 1 time in total |
|
| Back to top |
|
 |
DDS Expert Cheater
Reputation: 3
Joined: 10 Feb 2011 Posts: 112 Location: Bill's Planet
|
Posted: Wed Jan 07, 2015 12:12 pm Post subject: |
|
|
Para cambiar el registrador xmm0 a 0 trata lo siguiente.
_________________
elDarkDragonSlayer |
|
| Back to top |
|
 |
aikoncwd Grandmaster Cheater
Reputation: 23
Joined: 21 Dec 2012 Posts: 591 Location: Spain (Barcelona)
|
Posted: Wed Jan 07, 2015 12:15 pm Post subject: |
|
|
| elDDS wrote: | Para cambiar el registrador xmm0 a 0 trata lo siguiente.
|
Thanks! (gracias!)
Anyway, I get the solution:
| Code: | [ENABLE]
aobscan(DoDMG,FF F2 0F 5C C1 66 0F D6 87 78 01 00 00) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
label(enemy)
globalalloc(pEnemy,4)
label(new)
label(nein)
newmem:
code:
cmp edi,[Health]
jne enemy
movq xmm0,[new]
movq [edi+00000178],xmm0
jmp return
enemy:
mov [pEnemy],edi
movq xmm0,[nein]
movq [edi+00000178],xmm0
jmp return
new:
dq (double)500
nein:
dq (double)0
DoDMG+05:
jmp code
nop
nop
nop
return:
registersymbol(DoDMG)
[DISABLE]
DoDMG+05:
db 66 0F D6 87 78 01 00 00
unregistersymbol(DoDMG)
dealloc(newmem) |
So I need o store the value in a label and use movq for double or movss for float. Is this OK?
 _________________
Hey Hitler
Test here your skill with CheatEngine, I coded a challenge for you. Try to beat it!
HERE |
|
| Back to top |
|
 |
DDS Expert Cheater
Reputation: 3
Joined: 10 Feb 2011 Posts: 112 Location: Bill's Planet
|
Posted: Wed Jan 07, 2015 12:33 pm Post subject: |
|
|
Si el script se compila bien sin ningun error. Entonces si esta bien. _________________
elDarkDragonSlayer |
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Jan 07, 2015 6:20 pm Post subject: |
|
|
| AikonCWD wrote: | | So I need o store the value in a label and use movq for double or movss for float. |
For single-precision floating-point use movss, movd
For double-precision floating-point use movsd, movq
Of course, there are other ways:
cvtsi2ss xmm0,eax // will convert signed integer from EAX to single
cvtsi2sd xmm0,eax // will convert signed integer from EAX to double
cvtss2sd xmm0,xmm0 // will convert single to double _________________
|
|
| 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
|
|