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 - Toggleable script: restore original "??" byt

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Stregum
Advanced Cheater
Reputation: 0

Joined: 17 Jun 2014
Posts: 56
Location: We make baguettes there !

PostPosted: Sat Jun 21, 2014 6:39 pm    Post subject: AOB - Toggleable script: restore original "??" byt Reply with quote

Hi there, i'm making a script that modifies bytes, in my aobscan i have an unknown byte "??" that i want to nop.
The problem is when i want to restore that byte, i can't because i don't know the original byte.

Here's my script: (Credit to Rydian for his amazing tutorial about aobs)

Code:

[ENABLE]

aobscan(spr, ?? 05 0F 57 C0)

label(_spr)
registersymbol(_spr)

spr:
_spr:
db 90 90

// new aob: 90 90 0F 57 C0

[DISABLE]

_spr:
db <what_goes_here> 05

// new aob: <what_goes_here> 05 0F 57 C0

unregistersymbol(_spr)


I thought i would use symbols to store the original array of bytes and restore it later, but i'm still learning, i would like to know if it's possible and how to do it. Thx Smile

_________________
Rhaa Stregum Vitae Smile
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Sun Jun 22, 2014 12:48 am    Post subject: Reply with quote

Code:
[ENABLE]
aobscan(spr, ?? 05 0F 57 C0)
registersymbol(spr)

alloc(original_bytes,5)
registersymbol(original_bytes)

original_bytes:
readmem(spr,5)

spr:
db 90 90

[DISABLE]
spr:
readmem(original_bytes,5);

unregistersymbol(spr)
unregistersymbol(original_bytes)

_________________
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
Stregum
Advanced Cheater
Reputation: 0

Joined: 17 Jun 2014
Posts: 56
Location: We make baguettes there !

PostPosted: Sun Jun 22, 2014 4:50 am    Post subject: Reply with quote

Well, thanks DaSpamer, i guess i'm not enough smart to think about readmem :p

(Actually i learned something, keep up the good help and tips)

_________________
Rhaa Stregum Vitae Smile
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jun 22, 2014 7:56 am    Post subject: Reply with quote

There's other way:

Code:
[ENABLE]
aobscan(spr, ?? 05 0F 57 C0)
registersymbol(spr)

label(original_byte)
registersymbol(original_byte)

[spr]:
original_byte:

spr:
db 90 90

[DISABLE]
spr:
db original_byte
db 05 0F 57 C0

unregistersymbol(spr)
unregistersymbol(original_byte)




This will set usersymbol "original_byte" to 570F05XX:
Code:

[spr]:
original_byte:


And this will take only "XX" from "570F05XX"
Code:
db original_byte




Of course, when you are using 64bit CE, usersymbols will be "8877665544332211" instead of "44332211".
But, it doesn't matter, db will only take "11", dw will take "2211", dd will take "44332211".

_________________
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