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 


AoB script is executed in the wrong address

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Sat Jun 29, 2013 4:08 am    Post subject: AoB script is executed in the wrong address Reply with quote

The code works nicely, but the problem is that sometimes there is more than one address that uses the same (89 42 2C) array of bytes which makes the code execute in the wrong address. My question is, how do I make it so it goes to the right address?

Code:
[enable]
label(gold_address)
registersymbol(gold_address)
aobscan(gold,89 42 2C)

gold:
gold_address:
mov [edx+2C],186A0
mov ecx,esi

[disable]
gold_address:
mov [edx+2C],eax
mov ecx,esi
unregistersymbol(gold_address)


Thanks!



ScreenShot175.png
 Description:
 Filesize:  11.56 KB
 Viewed:  4019 Time(s)

ScreenShot175.png


Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Sat Jun 29, 2013 4:27 am    Post subject: Reply with quote

Use a longer AOB scan bytes, try this:

aobscan(gold,F2 0F 10 85 E8 FE FF FF F2 0F 2C D8 8B 15 90 32 8E 03 8B 42 2C 03 C3 89 42 2C 8B CE)


or use this one (if the address 038E3290 may get changed):
aobscan(gold,F2 0F 10 85 E8 FE FF FF F2 0F 2C D8 8B 15 ?? ?? ?? ?? 8B 42 2C 03 C3 89 42 2C 8B CE)



And To hack the mov [edx+2C],eax command, Start from gold+17, see the corrected script below:


Code:
[enable]
label(gold_address)
registersymbol(gold_address)
aobscan(gold,F2 0F 10 85 E8 FE FF FF F2 0F 2C D8 8B 15 90 32 8E 03 8B 42 2C 03 C3 89 42 2C 8B CE)

gold+17:
gold_address:
mov [edx+2C],186A0
mov ecx,esi

[disable]
gold_address:
mov [edx+2C],eax
mov ecx,esi
unregistersymbol(gold_address)
Back to top
View user's profile Send private message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Sat Jun 29, 2013 4:54 am    Post subject: Reply with quote

Thanks! But what does the +17 do? Does not edit the first 17 bytes in the scan?
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 340
Location: Somewhere....

PostPosted: Sat Jun 29, 2013 4:59 am    Post subject: Reply with quote

nope, this AOB scan from the movsd xmm0,[ebp-00000118] command, which is BEFORE the target instruction: mov [edx+2C],eax, the +17 will tell CE to skip the first 23 bytes of the AOB chain (17 is hexadecimal of 23), so that it won't touch the wrong bytes.

0x767BA57 - 0x767BA40 = 0x17 HEX = 23 decimal
Back to top
View user's profile Send private message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Sat Jun 29, 2013 5:31 am    Post subject: Reply with quote

Oh lol it was in hex, thanks a lot for explaining
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 Gamehacking 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