Auto Assembler:alloc

From Cheat Engine

Jump to: navigation, search

Auto Assembler alloc(SymbolName, Size, AllocateNearThisAddress OPTIONAL)

Allocates a certain amount of memory and defines the symbol name in the script. If 'AllocateNearThisAddress' is specified CE will try to allocate the memory near that address. This is useful for 64-bit targets where the jump distance could be bigger than 2GB otherwise.

Note: Use dealloc to free the memory when done.


[edit] Command Parameters

Parameter Type Description
SymbolName string The symbol name to use for allocated memory
Size integer The byte size of the block of memory to allocate
AllocateNearThisAddress string The address to allocate near if given

[edit] Examples

alloc(SomeSymbol, 0x4)
alloc(SomeSymbol, 0x1000)
alloc(SomeSymbol, $1000)
alloc(SomeSymbol, 0x4, Tutorial-x86_64.exe+164C2)
From the SunBeam: CE actually fetches the module and allocates close to the end of the module. Additionally specifying +164C2 does not add to it in any way :D Jus' sayin' Tutorial-x86_64.exe is
alloc(SomeSymbol, 0x4, SomeAOBSymbol)
alloc(SomeSymbol, 0x1000, Tutorial-x86_64.exe)
alloc(SomeSymbol, $1000, Tutorial-x86_64.exe)

jmp 00410000

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

[edit] See also

[edit] Related Commands

Personal tools