Help File:Assembler

From Cheat Engine
Revision as of 19:50, 29 July 2021 by LeFiXER (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Assembler

This function allows you to pass a single assembler instruction along with the address of the location you want the script to execute. It will generate bytes and place it in a buffer that has the size of the amount of generated bytes and return that buffer.

Function Definition

BOOL Assembler(ULONG address, char* instruction, BYTE *output, int maxlength, int *returnedsize);
address:
The address where the instruction is supposed to be written. Useful in cases of jumps and calls etc...
instruction:
A pointer to a 0-terminated string that contains the assembler instruction you want to assemble.
output:
A pointer to the buffer the assembled bytes will be placed in.
maxlength:
Maximum size of the buffer receiving the assembled bytes.
returnedsize:
A pointer to the integer that gets how many bytes were used.


Returns TRUE if the instruction was valid and there was enough space. Doesn't return why it fails, so it is recommended to always give at least 32-bytes of space.