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 


How to debug auto-assembler scripts

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
AJarOfLube
Newbie cheater
Reputation: 0

Joined: 30 Dec 2015
Posts: 12

PostPosted: Sun Jan 03, 2016 7:01 pm    Post subject: How to debug auto-assembler scripts Reply with quote

When I write an auto-assembler script that injects code using eg. "AOB Injection", is there an easy way to debug it? As in, see where the code has been injected so I can set breakpoints, etc?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4300

PostPosted: Sun Jan 03, 2016 7:54 pm    Post subject: Reply with quote

Use registersymbol on the name of your allocated memory.
Code:
alloc(newmem,1024)
registersymbol(newmem)

Then just right click in CE's disassembler, select "Go to address", and paste newmem into that. You might want to start giving unique names to your allocated memory if you do this.

Don't forget to do unregistersymbol(newmem) in the [DISABLE] section.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 03, 2016 8:23 pm    Post subject: Reply with quote

You can also just follow the jump.
Back to top
View user's profile Send private message
AJarOfLube
Newbie cheater
Reputation: 0

Joined: 30 Dec 2015
Posts: 12

PostPosted: Sun Jan 03, 2016 8:45 pm    Post subject: Reply with quote

@Methos Then I have to find the jmp, no? So that will only work the first time I'm working on a script, not subsequent attempts.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 03, 2016 8:52 pm    Post subject: Reply with quote

What? You have the module address+offset that you can use to find the injection point. From there, just follow the jump. If you must use AOB, you can find it that way. Otherwise, just do as ParkourPenguin has suggested and use a custom symbol to find it.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Jan 03, 2016 9:47 pm    Post subject: Reply with quote

When you define the AOB Injection, you provide it with a name.
Right-click in the address space and select Go to address.
Type in that name. The script must first be enabled.
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