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 


Someone can explain to me what this code do?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
jededias
!BEWARE! Deletes post on answer
Reputation: 0

Joined: 15 Apr 2017
Posts: 17

PostPosted: Sun May 07, 2017 6:42 pm    Post subject: Someone can explain to me what this code do? Reply with quote

Someone can tell me what this code do?

Code:
[ENABLE]
aobscan(steel,FF 00 FF 01 02 00 00 FF * * * FF)
steel:
  db FF 00 FF 00 00 02 01 // I need this to be constantly written, not just written once
registersymbol(steel)

[Disable]
steel:
  db FF 00 FF 01 02 00 00 FF
unregistersymbol(steel)
Back to top
View user's profile Send private message
FreeER
Expert Cheater
Reputation: 6

Joined: 09 Aug 2013
Posts: 148

PostPosted: Sun May 07, 2017 7:32 pm    Post subject: Reply with quote

First, this isn't lua it's CE's autoassembly.

Code:
[ENABLE]
Tell the CE assembler this is the start of the section of code that should be run only when the script is enabled

Code:
aobscan(steel,FF 00 FF 01 02 00 00 FF * * * FF)
do an Array of Bytes scan for the bytes "FF 00 FF 01 02 00 00 FF * * * FF" where any non-hex digit (* in this case) is a "wildcard" and represents any digit/byte, and define the label "steel" at the address those bytes were found at (cancel enabling the script if it is not found, like assert in older scripts)

Code:
steel:
tell the assembler the following code is at the address associated with the steel label

Code:
  db FF 00 FF 00 00 02 01
use db to Define, aka write, the Bytes "FF 00 FF 00 00 02 01" which is (if code):
Code:
FF 00                 - inc [eax]
FF 00                 - inc [eax]
00 02                 - add [edx],al
01 90 90900000        - add [eax+00009090],edx <--- this depends on the bytes after it (the 90 90900000 in this case)


Code:
registersymbol(steel)
add "steel" and it's value to CE's symbol table so it can be used outside the enable section (so in the disable section as well as other scripts)

Code:
[Disable]
Tell the CE assembler this is the start of the section of code that should be run only when the script is disabled

Code:
steel:
tell the assembler the following code is at the address associated with the steel label
Code:
  db FF 00 FF 01 02 00 00 FF
write the bytes "FF 00 FF 01 02 00 00 FF " aka
Code:
FF 00                 - inc [eax]
FF 01                 - inc [ecx]
02 00                 - add al,[eax]
00 FF                 - add bh,bh


Code:
unregistersymbol(steel)
have CE remove steel and it's associated address/value from the symbol table so it can no longer be used.
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