 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
denizdeni How do I cheat?
Reputation: 0
Joined: 09 Dec 2018 Posts: 2
|
Posted: Sun Dec 09, 2018 12:41 pm Post subject: GetAsyncKeyState x64 crash |
|
|
hi guys.
i wanted to use getasync on my assembly code but it's not work. i used breakpoint, it's crashing after some game static address (it's 100-150 lines after). and it's crashing without pressed key. **and i can't press key because it's crashing xD**
my Assembly Code
| Code: |
[ENABLE]
alloc(newmem,2048,"eurotrucks2.exe"+71D670)
alloc(multiplier,4)
alloc(limit,4)
alloc(limitreverse,4)
label(returnhere)
label(exit)
multiplier:
dd (float)1.014
limit:
dd (float)80
limitreverse:
dd (float)-15
newmem:
comiss xmm0,[limit]
jbe test1
jae returnhere
test1:
comiss xmm0,[limitreverse]
jbe returnhere
push rax
push rcx
push rdx
pushfq
push 'W'
call GetAsyncKeyState
shr ax,#15
cmp ax,1
jne exit
mulss xmm0, dword ptr[multiplier]
movss [rax+rdi*4],xmm0
jmp exit
exit:
popfq
pop rdx
pop rcx
pop rax
jmp returnhere
"eurotrucks2.exe"+71D670:
jmp newmem
returnhere:
[DISABLE]
dealloc(newmem)
"eurotrucks2.exe"+71D670:
movss [rax+rdi*4],xmm0
|
_________________
none |
|
| Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4723
|
Posted: Sun Dec 09, 2018 3:58 pm Post subject: |
|
|
Windows x64 calling conventions are completely different.
https://docs.microsoft.com/en-us/previous-versions/ms235286%28v=vs.140%29
e.g. sleep:
| Code: | push rbp
mov rbp,rsp // establish new stack frame
and spl,F0 // align stack on 16-byte boundary
sub rsp,20 // scratch space
mov ecx,#5000 // 1st parameter
call kernel32.sleep
mov rsp,rbp // tear down stack frame
pop rbp |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
| Back to top |
|
 |
denizdeni How do I cheat?
Reputation: 0
Joined: 09 Dec 2018 Posts: 2
|
Posted: Mon Dec 10, 2018 7:57 am Post subject: |
|
|
| ParkourPenguin wrote: | Windows x64 calling conventions are completely different.
e.g. sleep:
| Code: | push rbp
mov rbp,rsp // establish new stack frame
and spl,F0 // align stack on 16-byte boundary
sub rsp,20 // scratch space
mov ecx,#5000 // 1st parameter
call kernel32.sleep
mov rsp,rbp // tear down stack frame
pop rbp |
|
any code for getasynckeystate x64? i don't figure anything
_________________
none |
|
| 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
|
|