Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Auto Assemble code doesn't compile

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
jamesrussel
How do I cheat?
Reputation: 0

Joined: 30 May 2013
Posts: 4

PostPosted: Thu Jun 06, 2013 4:13 am    Post subject: Auto Assemble code doesn't compile Reply with quote

I'm trying to inject this code into memory:

Code:
alloc(GetXCoordAddress,64)
alloc(XCoordAddress,8)
label(returnOriginal)

0C8D3D2F:
jmp GetXCoordAddress //jump to the function
returnOriginal: //label to return to the injection point

GetXCoordAddress:
movq [XCoordAddress],[ecx+10] //move the address into XCoordAddress
movq xmm0,[ecx+10] //execute the overwritten code
jmp returnOriginal //return to normal execution


But it tells me "Error in line 10 (movq [00000000],[ecx+10]) :This instruction can't be compiled"

Whenever I comment out movq [XCoordAddress],[ecx+10], it works fine. Any idea why?
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Thu Jun 06, 2013 7:42 am    Post subject: Reply with quote

You can't do it like this..
But you can do this:
Code:
alloc(GetXCoordAddress,64)
alloc(XCoordAddress,8)
label(returnOriginal)

0C8D3D2F:
jmp GetXCoordAddress
returnOriginal:

GetXCoordAddress:]
movq xmm0,[ecx+10]
movq [XCoordAddress],xmm0
movq xmm0,[ecx+10]
jmp returnOriginal

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25855
Location: The netherlands

PostPosted: Thu Jun 06, 2013 8:47 am    Post subject: Reply with quote

I think he wants the address of ecx+10
So something like this: (without using an extra register)
Code:

Mov [XCoordAddress], ecx
Add [XCoordAddress], 10

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
jamesrussel
How do I cheat?
Reputation: 0

Joined: 30 May 2013
Posts: 4

PostPosted: Sat Jun 08, 2013 2:41 am    Post subject: Reply with quote

Thanks, Dark Byte's code did what I needed.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites