Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- format PE64 Console 5.0
- entry Start
- include 'win64a.inc'
- section '.text' code readable executable
- Start:
- invoke SetConsoleTitleA, conTitle
- test eax, eax
- jz Exit
- invoke GetStdHandle, [STD_OUTP_HNDL]
- mov [hStdOut], eax
- invoke GetStdHandle, [STD_INP_HNDL]
- mov [hStdIn], eax
- invoke WriteConsoleA, [hStdOut], mes, mesLen, chrsWritten, 0
- invoke ReadConsoleA, [hStdIn], readBuf, 1, chrsRead, 0
- Exit:
- invoke ExitProcess, 0
- section '.data' data readable writeable
- conTitle db 'Console', 0
- mes db 'Hello World!', 0dh, 0ah, 0
- mesLen = $-mes
- hStdIn dd 0
- hStdOut dd 0
- chrsRead dd 0
- chrsWritten dd 0
- STD_INP_HNDL dd -10
- STD_OUTP_HNDL dd -11
- section '.bss' readable writeable
- readBuf db ?
- section '.idata' import data readable
- library kernel,'KERNEL32.DLL'
- import kernel,\
- SetConsoleTitleA, 'SetConsoleTitleA',\
- GetStdHandle, 'GetStdHandle',\
- WriteConsoleA, 'WriteConsoleA',\
- ReadConsoleA, 'ReadConsoleA',\
- ExitProcess, 'ExitProcess'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement