jededias !BEWARE! Deletes post on answer Reputation: 0
Joined: 15 Apr 2017 Posts: 17
|
Posted: Sun May 07, 2017 6:42 pm Post subject: Someone can explain to me what this code do? |
|
|
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) |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sun May 07, 2017 7:32 pm Post subject: |
|
|
First, this isn't lua it's CE's autoassembly.
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)
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)
Tell the CE assembler this is the start of the section of code that should be run only when the script is disabled
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.
|
|