September 2017
Beginner to intermediate
290 pages
6h 58m
English
The GetPointers() procedure is the only one we make public, the only one that would be visible to a dynamic or static linker, depending on the selected output target. The logic behind this procedure is primitive. It creates a structure (in this example, the structure is statically allocated), filled with the addresses of core procedures, and returns the address of this structure:
GetPointers: if (ACTIVE_TARGET = TARGET_W32_OBJ) |\ (ACTIVE_TARGET = TARGET_W32_DLL) |\ (ACTIVE_TARGET = TARGET_L32_O) push dword pointers pop eax mov [eax], dword f_set_data_pointer mov [eax + 4], dword f_set_data_length mov [eax + 8], dword f_encrypt mov [eax + 12], dword f_decrypt ret else if (ACTIVE_TARGET = TARGET_W64_OBJ) |\ (ACTIVE_TARGET = TARGET_W64_DLL) ...
Read now
Unlock full access