Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .386
- .MODEL flat,stdcall
- OPTION CASEMAP:NONE
- Include windows.inc
- Include user32.inc
- Include kernel32.inc
- IncludeLib user32.lib
- IncludeLib kernel32.lib
- .DATA?
- hConsoleOut dd ?
- .code
- DllEntry proc hInstance:HINSTANCE, reason:DWORD, reserved1:DWORD
- mov eax,TRUE
- ret
- DllEntry Endp
- ConsoleWrite proc value:DWORD, len:DWORD
- CMP hConsoleOut, 0
- jz SetOutHandle
- jnz write
- SetOutHandle:
- PUSH -11
- CALL GetStdHandle
- MOV hConsoleOut, EAX
- write:
- ;lets check again before calling the API
- CMP hConsoleOut, 0
- jz endfunc
- push 0
- push 0
- push len
- push value
- push hConsoleOut
- CALL WriteConsole
- jmp endfunc
- endfunc:
- ret
- ConsoleWrite endp
- End DllEntry
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement