Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; encrypted with www.stringencrypt.com (v1.0.0) [MASM Assembler (32 bit)]
- ; ml /c /Coff /cl target.asm
- ;link /subsystem:windows target.obj
- .486p
- .model flat, stdcall
- option casemap: none
- ;include \masm32\include\user32.inc
- include \masm32\include\msvcrt.inc
- ;includelib \masm32\lib\user32.lib
- includelib \masm32\lib\msvcrt.lib
- .data
- FileName db "C:\Documents and Settings\Administrator\Desktop\masmmessagebox\enumwindows.asm", 0
- Permissions db "r", 0
- .data?
- .code
- start proc
- local FilePointer:DWORD
- local CharPointer:DWORD
- local AllocSize:DWORD
- local LoopCheck:DWORD
- invoke crt_fopen, addr FileName, addr Permissions
- mov FilePointer, eax
- .if (FilePointer == 0)
- jmp f1n1sh
- .endif
- mov AllocSize, 512
- invoke crt_malloc, AllocSize
- mov CharPointer, eax
- mov LoopCheck, 1
- .while (LoopCheck != 0)
- invoke crt_fgets, CharPointer, AllocSize, FilePointer
- mov LoopCheck, eax
- invoke crt_printf, CharPointer
- .endw
- invoke crt_free, CharPointer
- invoke crt_fclose, FilePointer
- f1n1sh:
- MOV EAX,0
- LEAVE
- RETN
- start endp
- end start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement