EEex_Init

A lua function used to initialize the EEex project framework.

EEex_Init()

Parameters

None

Return

Returns pointer to newly allocated memory for EEex to use in other internal functions

Notes

This function, EEex_ExposeToLua, EEex_WriteByte and EEex_AddressList are implemented by the EEex loader in the process space of the game executable as lua functions.

EEex_Init does several things:

  1. Exposes the hardcoded function EEex_WriteByte

  2. Exposes the hardcoded function EEex_ExposeToLua

  3. Calls VirtualAlloc with the following params: lpAddress = 0, dwSize = 0x1000, flAllocationType = MEM_COMMIT | MEM_RESERVE, flProtect = PAGE_EXECUTE_READWRITE

  4. Passes along the VirtualAlloc return value

For more technical information on how the EEex loader works and how it implements these functions, please visit this wiki page

Example

EEex_InitialMemory = EEex_Init()

See Also

EEex_ExposeToLua, EEex_WriteByte, EEex_AddressList