format PE GUI DLL

include 'win32ax.inc'

section 'hax' code readable executable writeable

entities dd 0
nak dd 0
counte dd 0
adre dd 0

start:
mov eax,0
nop
call @f
@@:
mov eax,[esp]
sub eax,6
mov byte [eax],$c3
pop eax
;initialization
push 0
call @f
db 'Hax by Nick',0
@@:
push 0
call [MessageBoxA]
invoke LoadLibraryA,'entitiesmp.dll'
mov [entities],eax
invoke GetProcAddress,[entities],6017
mov [nak],eax
;int 3
;Writing Procedures
dec [counte]
mov [adre],_cstart
sub [adre],4
@@:
inc [counte]
add [adre],4
mov ebx,[adre]
invoke GetProcAddress,[entities],dword [ebx]
invoke WriteProcessMemory,-1,eax,[nak],95,0
cmp [counte],(_cend-_cstart-4)/4
jne @b

xor eax,eax
retn
.end start

;Data
_cstart:
dd 5985
_cend:
db 43h, 61h, 72h, 6Ch, 6Fh, 73h, 20h, 32h, 30h, 31h, 30h
section 'lzdasd' fixups data readable