Hello People!
I have a problem, don't know how to make a working script.
I know that EAX is currently holding value. But I found that the instruction for eax is: movd eax,xmm6. Does it mean that xmm6 which stored value is moving to EAX? If yes, how to write a correct script for moving value into XMM6 register?? I want to put a 4-byte value into XMM6 register.
I am waiting for your advices,
Thanks.[Link]
How to move value into XMM register?
-
- What is cheating?
- Posts: 1
- Joined: Mon Sep 14, 2020 8:42 am
- Reputation: 0
How to move value into XMM register?
Last edited by SantiagoJaxson on Tue Sep 15, 2020 5:30 am, edited 1 time in total.
Re: How to move value into XMM register?
Code: Select all
aobscanmodule(INJECT, Game.exe, AOB)
alloc(newmem,$1000, "Game.exe"+offset)
alloc(MyMem, 4)
MyMem:
//float
dd (float)100
MyMem+4:
//double
dq (double)1
label(code)
label(return)
newmem:
code:
// move float
movss xmm6,[MyMem]
// move double
movsd xmm6,[MyMem+4]
jmp return
INJECT:
jmp newmem
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db origBites
unregistersymbol(INJECT)
dealloc(newmem)
Re: How to move value into XMM register?
I know 2 ways to do this. One is already posted above, but I will still post my own version since its slightly different than Chucky's.
1st way:
2nd way:
1st way:
Code: Select all
push eax
mov eax,(float)200 // for moving a 4 byte value just use #200 instead of (float)200
movd xmm0,eax
pop eax
movss [ecx+00000E9C],xmm0
jmp return
Code: Select all
alloc(fullHealth,4)
code:
movss xmm0,[fullHealth]
movss [ecx+00000E9C],xmm0
jmp return
fullHealth: // Let’s say we’re moving a float value
dd (float)200
dealloc(fullHealth)
Who is online
Users browsing this forum: No registered users