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 


Help in Auto Assembly

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

Joined: 29 Nov 2013
Posts: 1

PostPosted: Fri Nov 29, 2013 10:31 pm    Post subject: Help in Auto Assembly Reply with quote

Code:
07BD958C - 8B 41 18              - mov eax,[ecx+18]
07BD958F - 8B 4D F0              - mov ecx,[ebp-10]
07BD9592 - 89 0D 40689503        - mov [03956840],ecx
07BD9598 - 8B E5                 - mov esp,ebp
07BD959A - 5D                    - pop ebp


In the first line "mov eax,[ecx+18]" is a pointer accessing a value, I'm trying to set that value to 0 using Auto Assembly, can anyone help me? Thank you.

EDIT:
Also 40689503 in the third line is a wildcard.

EDIT 2:
Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(CodeToHook)
label(exit)
registersymbol(CodeToHook)

aobscan(CodeSignature, 89 4A 18 8B 4D F0 89 0D ******** 8B E5 5D C3 CC CC)
CodeSignature+0:
jmp newmem
newmem: //this is allocated memory, you have read,write,execute access
mov eax,0//place your code here
jmp CodeSignature+3

CodeToHook:
mov eax,[ecx+18]
jmp returnhere

exit:
jmp returnhere

07BD958C:
jmp newmem
nop
returnhere:
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
CodeToHook: //at the address CodeToHook...
mov eax,[ecx+18] //put back the original code

dealloc(newmem)//de-allocate the memory we got through alloc(...)
unregistersymbol(CodeToHook)   //and trash both named addresses


This code is crashing my game, can anyone help?
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Sat Nov 30, 2013 1:04 am    Post subject: Re: Help in Auto Assembly Reply with quote

maramizoz wrote:
Code:
07BD958C - 8B 41 18              - mov eax,[ecx+18]
07BD958F - 8B 4D F0              - mov ecx,[ebp-10]
07BD9592 - 89 0D 40689503        - mov [03956840],ecx
07BD9598 - 8B E5                 - mov esp,ebp
07BD959A - 5D                    - pop ebp


In the first line "mov eax,[ecx+18]" is a pointer accessing a value, I'm trying to set that value to 0 using Auto Assembly, can anyone help me? Thank you.

EDIT:
Also 40689503 in the third line is a wildcard.

EDIT 2:
Code:
[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(CodeToHook)
label(exit)
registersymbol(CodeToHook)

aobscan(CodeSignature, 89 4A 18 8B 4D F0 89 0D ******** 8B E5 5D C3 CC CC)
CodeSignature+0:
jmp newmem
newmem: //this is allocated memory, you have read,write,execute access
mov eax,0//place your code here
jmp CodeSignature+3

CodeToHook:
mov eax,[ecx+18]
jmp returnhere

exit:
jmp returnhere

07BD958C:
jmp newmem
nop
returnhere:
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
CodeToHook: //at the address CodeToHook...
mov eax,[ecx+18] //put back the original code

dealloc(newmem)//de-allocate the memory we got through alloc(...)
unregistersymbol(CodeToHook)   //and trash both named addresses


This code is crashing my game, can anyone help?

Your aobscan doesn't match the code you show above. If eax is a ptr, you may want to mov eax,[eax] before setting it to zero.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sat Nov 30, 2013 4:25 am    Post subject: Reply with quote

A jmp instruction is 5 bytes long, but you jump back 3 bytes after your edit.
Replace that jmp with mov ecx,[ebp-10] followed by jmp returnhere
And replace 07BD958C with CodeSignature

Another thing is that your CodeToHook label has the address of newmem+something so disable won't do anything
Register CodeSignature, and use that to disable

(Use the code injection template as a start, it does most of the byte counting for you, and then just replace the address with an aobscan result)

_________________
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
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