Getting sick of C... moving to asm... dll skeleton src
Code:
format PE DLL
entry DllMain
;Includes
include 'win32a.inc'
include '\API\USER32.inc'
include '\API\KERNEL32.inc'
;End of includes
;.text section
section '.text' code readable executable
proc DllMain hModule, dwAccess, lpPipe
push ebp
mov ebp, esp
sub esp, 0ch
push [hModule]
call [DisableThreadLibraryCalls]
cmp eax, 0
JE .Finished
cmp [dwAccess], DLL_PROCESS_ATTACH
JE .Create
JNE .Finished
.Create:
push NULL
push 0
push dword ptr lpPipe
push dword ptr pThread
push 0
push NULL
call [CreateThread]
cmp eax, 0
JE .Finished
.Finished:
add esp, 0ch
pop ebp
mov eax, TRUE
endp
proc pThread, lpPipe
push ebp
mov ebp, esp
sub esp, 04h
.Top:
;loop here
CMP[ _While ], 1
JE .Top
add esp, 04h
pop ebp
mov eax, TRUE
endp
;section '.data' data readable writeable
_While db 1
section '.idata' import data readable writeable
library kernel32, 'KERNEL32.DLL',\
user32, 'USER32.DLL'
section '.reloc' fixups data readable discardable