Monday, February 14, 2011

hello worm fasm


format PE
entry start
include 'win32a.inc'

section '.data' data readable writeable
; handlercon HANDLE 0
conhandle dd ?
msg db "All this worms are yours",0dh,0ah
msgsz = ($ - msg)
byteswr dd ?
section '.idata' import data readable writeable

library kernel32,'KERNEL32.DLL',\
user32,'USER32.DLL'

include 'api\kernel32.inc'
include 'api\user32.inc'

section '.text' code readable executable

start:
invoke GetStdHandle, STD_OUTPUT_HANDLE
mov dword [conhandle],eax

invoke WriteConsole,dword [conhandle],msg,msgsz,[byteswr],0

xor eax,eax
invoke ExitProcess, eax

Labels: , ,

0 Comments:

Post a Comment

<< Home