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 


[Resolved] [Auto Assembler] Define byte, aobscan Question

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

Joined: 09 May 2009
Posts: 19

PostPosted: Tue Feb 16, 2010 1:03 pm    Post subject: [Resolved] [Auto Assembler] Define byte, aobscan Question Reply with quote

I'm still learning this language Smile

So I have an address where I want to edit the array of bytes:


Code:
[ENABLE]
0B37F068:
DB 96 08 07 CC 00

[DISABLE]
0B37F068:
DB 96 08 07 63 00



Let's say that I have a range of addresses that I want to change. Basically, I want to filter out the array of bytes: 96 08 07 63 00, with the new bytes: 96 08 07 CC 00 every time each address is scanned. Non-matching arrays will be skipped. It's sort of like the following (I know the code is wrong, but just to give an example). How should I tackle this?


Code:
[ENABLE]
0B37F068 to 0B400000:
DB 96 08 07 CC 00

[DISABLE]
0B37F068 to 0B400000:
DB 96 08 07 63 00


Last edited by Configuration on Wed Feb 17, 2010 8:50 pm; edited 2 times in total
Back to top
View user's profile Send private message
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Tue Feb 16, 2010 2:01 pm    Post subject: Reply with quote

I think you have to make an AOB scanner first, I have one somewhere.

Every adress he finds you have to change,

u can change bytes very simple

adress:
DB 90 90

=

*(WORD*)adress = 0x9090;

that's all
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Feb 16, 2010 2:06 pm    Post subject: Reply with quote

CE has an AOB scanner as part of the AA language. Look into :
- aobscan(varname, arrayofbyte)
Back to top
View user's profile Send private message
Configuration
Newbie cheater
Reputation: 0

Joined: 09 May 2009
Posts: 19

PostPosted: Tue Feb 16, 2010 2:47 pm    Post subject: Reply with quote

Yes, aobscan(varname, arrayofbyte) is just the thing I am looking for Smile.

However, I don't understand how to use it yet in AA (learning, still a newbie here). After searching for some examples on the CE Forums, I didn't find much help for aobscan. Does anyone have an example script, using aobscan, for the example in the opening post?
Back to top
View user's profile Send private message
Jesper
Grandmaster Cheater Supreme
Reputation: 9

Joined: 21 Feb 2007
Posts: 1156

PostPosted: Tue Feb 16, 2010 2:52 pm    Post subject: Reply with quote

simple example: aobscan(eax,00 00 00 00 00 00 00 00...)

If it finds the address it stores it in eax.
Back to top
View user's profile Send private message
Anden100
Grandmaster Cheater
Reputation: 0

Joined: 20 Apr 2007
Posts: 668

PostPosted: Tue Feb 16, 2010 4:42 pm    Post subject: Reply with quote

Slugsnack wrote:
CE has an AOB scanner as part of the AA language. Look into :
- aobscan(varname, arrayofbyte)


Can you then find all occurrences of the AOB, or only the first one?
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue Feb 16, 2010 5:00 pm    Post subject: Reply with quote

Quote:
AOBSCAN(name, array of byte) : Will scan the memory for the given array of byte (Wildcards are supported) and replaces all tokens with the specified name with the address the array of byte was found. If it's not found, the auto assemble script will not execute


is how it is documented. i would assume it just does it for the first instance
Back to top
View user's profile Send private message
Configuration
Newbie cheater
Reputation: 0

Joined: 09 May 2009
Posts: 19

PostPosted: Tue Feb 16, 2010 5:30 pm    Post subject: Reply with quote

Here is my failed attempt:

Code:
AOBSCAN(mod,96 0C 00 08 53 07 63)

[enable]
loadbinary(mod,Cheat.CEM)

[disable]



I have a .CEM memory region (no header) which contains an array of bytes I want to replace. What I tried to do was to find the address which contains the bytes: 96 0C 00 08 53 07 63 using aobscan, and then load Cheat.CEM to replace them.

Needless to say, without much familiarity in the language yet, I have no idea how to write the code correctly.
Back to top
View user's profile Send private message
NoMercy
Master Cheater
Reputation: 1

Joined: 09 Feb 2009
Posts: 289

PostPosted: Wed Feb 17, 2010 1:45 pm    Post subject: Reply with quote

i wouldnt code it in AA, i dont know if its even possible, but

c++, there are some aobscan.cpp/.h files out, which u can easiliy use to search for that aob's, then replace them with ur aob's
Back to top
View user's profile Send private message
Configuration
Newbie cheater
Reputation: 0

Joined: 09 May 2009
Posts: 19

PostPosted: Wed Feb 17, 2010 8:50 pm    Post subject: Reply with quote

Turns out the code did work after all:

Code:
AOBSCAN(mod,96 0C 00 08 53 07 63)

[enable]
loadbinary(mod,Cheat.CEM)

[disable]


I kept getting errors about cheat.cem being not found. But after trying again today, the script worked. Aobscan scanned for the address that contains the bytes I need, and loadbinary loads the .cem file which contains the memory region I am interested in modifying.


Thanks for everyone's help! Now I can make a CE trainer for this.

Thread title has been renamed to resolved.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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