This code in the 'tools\win32\system.inc' never gets called anywhere else.
Found this out because the 'free' symbol is already defined in my msvcrt api include, so I changed the symbol name to 'dsfree' which should have given me another 'undefined symbol' error, but It compiled without error. Memory is not getting released when the program is finished with it.
display_string:
invoke GetStdHandle,[display_handle]
mov edx,eax
mov edi,esi
or ecx,-1
xor al,al
repne scasb
neg ecx
sub ecx,2
invoke WriteFile,edx,esi,ecx,bytes_count,0
retn
alloc:
invoke VirtualAlloc,0,eax,MEM_COMMIT,PAGE_READWRITE
or eax,eax
jz allocation_error
clc
retn
allocation_error:
stc
retn
;[right here]
free:
invoke VirtualFree,eax,0,MEM_RELEASE
retn
;[end right here]
open:
invoke CreateFile,edx,GENERIC_READ,FILE_SHARE_READ,0,OPEN_EXISTING,0,0
cmp eax,-1
je file_error
mov ebx,eax
clc
retn
file_error:
stc
retn
create: