Advertisement
Guest User

Untitled

a guest
Dec 5th, 2018
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MPASM 0.86 KB | None | 0 0
  1. .386
  2. .model flat, stdcall
  3. option casemap: none
  4.  
  5. includelib kernel32.lib
  6.    
  7. GetStdHandle PROTO :DWORD
  8.  
  9. ReadConsoleA PROTO :DWORD, :PTR BYTE, :DWORD,
  10.                    :PTR DWORD, :DWORD
  11. WriteConsoleA PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
  12. Sleep PROTO: DWORD
  13.  
  14. ExitProcess PROTO :DWORD
  15.  
  16. .data
  17.     buffer BYTE '....'
  18.     hConsole DWORD ?
  19.     ptrRead DWORD ?
  20.  
  21. .code
  22.     main Proc
  23.    
  24.     push -10
  25.     call GetStdHandle
  26.     mov hConsole, eax
  27.  
  28.     push 0
  29.     push offset ptrRead
  30.     push 4d
  31.     push offset buffer
  32.     push hConsole
  33.     call ReadConsoleA
  34.    
  35.     push -11
  36.     call GetStdHandle
  37.     mov hConsole, eax
  38.    
  39.     push 0
  40.     push offset ptrRead
  41.     push 4d
  42.     push offset buffer
  43.     push hConsole
  44.     call WriteConsoleA
  45.  
  46.     push 2000d
  47.     call Sleep
  48.  
  49.     push 0
  50.     call ExitProcess
  51.     main EndP
  52.     end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement