FreeMemory
PROC __lpBuffer:DWord
mov eax,__lpBuffer
test eax,eax
jz @Exit
push MEM_RELEASE
push NULL
push eax
push OFFSET @Exit
jmp
VirtualFree
@Error
: xor
eax,eax
@Exit :
test eax,eax
ret
FreeMemory ENDP
This function returns TRUE if the free operation
returns successfully.
The function return FALSE if an error occured.
At the end of the function the ZERO flag is set if an error occured.
INVOKE Free Memory ,4096
jz @Error