Difference between revisions of "Auto Assembler:struct"

From Cheat Engine
Jump to navigation Jump to search
(Created page with 'Category:Assembler '''Auto Assembler''' {$STRICT} By default, CE doesn't care if you label() your labels or not. It's perfectly fine to do: 00400500: jmp bla something: …')
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
[[Category:Assembler]]
 
[[Category:Assembler]]
'''Auto Assembler''' {$STRICT}
+
'''Auto Assembler''' struct
 
 
By default, CE doesn't care if you label() your labels or not. It's perfectly fine to do:
 
 
 
00400500:
 
jmp bla
 
something:
 
jmp 00400600
 
bla:
 
jmp something
 
 
 
But, for those that don't like that, they can use the "{$STRICT}" line in their script.
 
When this line is present in your script, Cheat Engine will not assume that an undefined symbol is a label, and will give you an error instead.
 
 
 
Keep in mind that if you do forget to label a symbol you use, and it is already defined, CE will STILL NOT give an error. So use unique symbol names nonetheless. (e.g don't use Exit, as there is an export with that name)
 
 
 
  
 +
With STRUCT you can define an internal structure in your auto assembler script. This can be used to keep your code clear.
  
  
Line 24: Line 10:
  
 
== Examples ==
 
== Examples ==
reassemble(SomeSymbol)
+
<pre>
 +
STRUCT stackview
 +
returnaddress: DD ?
 +
param1:
 +
  DD ?
 +
param2: DB ? ? ? ?
 +
ENDSTRUCT
  
reassemble(00123ABC)
+
mov eax,[EBP+stackview.param1]
 
+
mov ebx,[EBP+param2]
  originalCode:
+
</pre>
  reassemble(injectionPoint)
+
   
  jmp return
 
  
 
== See also ==
 
== See also ==
 
* [[Cheat_Engine:Auto Assembler|Auto Assembler]]
 
* [[Cheat_Engine:Auto Assembler|Auto Assembler]]
 +
* [[Auto_Assembler:Commands|Auto Assembler Commands]]
  
 
=== Related Commands ===
 
=== Related Commands ===
* [[Auto Assembler:aobScan|aobScan]]
+
* [[Auto_Assembler:aobScan|aobScan]]
 
* [[Auto Assembler:aobScanModule|aobScanModule]]
 
* [[Auto Assembler:aobScanModule|aobScanModule]]
 +
* [[Auto Assembler:aobScanRegion|aobScanRegion]]
 
* [[Auto Assembler:alloc|alloc]]
 
* [[Auto Assembler:alloc|alloc]]
 
* [[Auto Assembler:dealloc|dealloc]]
 
* [[Auto Assembler:dealloc|dealloc]]
 +
* [[Auto Assembler:globalAlloc|globalAlloc]]
 
* [[Auto Assembler:createThread|createThread]]
 
* [[Auto Assembler:createThread|createThread]]
 
* [[Auto Assembler:define|define]]
 
* [[Auto Assembler:define|define]]
 +
* [[Auto Assembler:fullAccess|fullAccess]]
 
* [[Auto Assembler:globalAlloc|globalAlloc]]
 
* [[Auto Assembler:globalAlloc|globalAlloc]]
 
* [[Auto Assembler:include|include]]
 
* [[Auto Assembler:include|include]]
Line 51: Line 46:
 
* [[Auto Assembler:unregisterSymbol|unregisterSymbol]]
 
* [[Auto Assembler:unregisterSymbol|unregisterSymbol]]
 
* [[Auto Assembler:LUA ASM|LUA ASM]]
 
* [[Auto Assembler:LUA ASM|LUA ASM]]
* [http://forum.cheatengine.org/viewtopic.php?t=594776 A Post by Dark Bite]
 

Latest revision as of 01:23, 13 January 2018

Auto Assembler struct

With STRUCT you can define an internal structure in your auto assembler script. This can be used to keep your code clear.


Command Parameters[edit]

<none>


Examples[edit]

STRUCT stackview
returnaddress: DD ?
param1: 
  DD ?
param2: DB ? ? ? ?
ENDSTRUCT

mov eax,[EBP+stackview.param1]
mov ebx,[EBP+param2]


See also[edit]

Related Commands[edit]