Difference between revisions of "Cheat Engine:Auto Assembler"

From Cheat Engine
Jump to navigation Jump to search
(Created page with 'Auto assemble allows you to write assembler code at different locations using a script. It can be found in the memory view part of cheat engine under extra. There are 3 special …')
 
Line 1: Line 1:
 +
{{cleanup}}
 
Auto assemble allows you to write assembler code at different locations using a script. It can be found in the memory view part of cheat engine under extra.
 
Auto assemble allows you to write assembler code at different locations using a script. It can be found in the memory view part of cheat engine under extra.
  
Line 114: Line 115:
 
x:
 
x:
 
readmem(00410000,16) //place the contents of address 00410000 at the address of X
 
readmem(00410000,16) //place the contents of address 00410000 at the address of X
 +
 +
----

Revision as of 00:44, 29 July 2009

Template:cleanup Auto assemble allows you to write assembler code at different locations using a script. It can be found in the memory view part of cheat engine under extra.

There are 3 special commands you can give it, ALLOC , LABEL and FULLACCESS. With LABEL you can give a address a name by declaring it before you use it. ALLOC is basicly the same as LABEL but allocates some memory for you. Usage: LABEL(labelname) //Enables the word labelname to be used as a address ALLOC(allocname,sizeinbytes) //same as label, but allocates the memory it points to itself DEALLOC(allocname) //Deallocates a block of memory allocated with alloc. It always gets executed last, no matter where it is positioned in the code, and only actually frees the memory when all allocations have been freed. only usable in a script designed as cheattable. (e.g used for the disable cheat) FULLACCESS(address,size) //makes a memory region at the specified address and at least "size" bytes readable, writable and executable

REGISTERSYMBOL(symboname) //adds the symbol to the userdefined symbol list so cheattables and the memory browser can use that name instead of a address (The symbol has to be declared in the script when using it) UNREGISTERSYMBOL(symbolname) //removes the symbol from the userdefined symbol list. It won't give a error if it isn't found


DEFINE(name,whatever) :Will replace all tokens with the specified name with the text of whatever INCLUDE(filename) :includes another auto assembler file at that spot LOADBINARY(address,filename) :Will load a binary file at the specified address CREATETHREAD(address) :Will spawn a thread in the process at the specified address LOADLIBRARY(filename) :Will inject the specified dll into the target process READMEM(address,size) :Will write the addresses at address at the location this instruction is placed


GLOBALALLOC(name,size) : Will allocate a certain amount of memory and registers the specified name. Using GlobalAlloc in other scripts will then not allocate the memory again, but reuse the already existing memory. (Or allocate it anyhow if found it wasn't allocated yet)

Basic Example: 00451029: jmp 00410000 nop nop nop

00410000: mov [00580120],esi mov [esi+80],ebx xor eax,eax jmp 00451031

Example using LABEL: label(mylabel)

00451029: jmp 00410000 nop nop nop mylabel:

00410000: mov [00580120],esi mov [esi+80],ebx xor eax,eax jmp mylabel

Example using ALLOC: alloc(memloc1,4)

00451029: jmp 00410000 nop nop nop

00410000: mov [alloc1],esi mov [esi+80],ebx xor eax,eax jmp 00451031

Example using ALLOC and LABEL alloc(alloc1,4) label(mylabel)

00451029: jmp 00410000 nop nop nop mylabel:

00410000: mov [alloc1],esi mov [esi+80],ebx xor eax,eax jmp mylabel


Example using FULLACCESS FULLACCESS(00400800,4) //00400800 is usually read only non executable data, this makes it writeable and executable 00451029: jmp 00410000 nop nop nop

00410000: mov [00400800],esi mov [esi+80],ebx xor eax,eax jmp 00451031

Example using DEFINE DEFINE(clear_eax,xor eax,eax) 00400500: clear_eax

ReadMem example alloc(x,16) alloc(script,2048)

script: mov eax,[x] mov edx,[x+c] ret

x: readmem(00410000,16) //place the contents of address 00410000 at the address of X