Guest User

Untitled

a guest
Jun 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. format PE CONSOLE 4.0
  2. entry start
  3.  
  4. include 'win32a.inc'
  5. TEXTSIZE equ 6
  6.  
  7. section '.text' code readable executable
  8.  
  9. start:
  10. stdcall main
  11.  
  12. invoke getchar
  13. invoke ExitProcess, 0
  14.  
  15. proc main
  16.  
  17. stdcall memCopy, source, destination, TEXTSIZE
  18. ret
  19.  
  20. endp
  21.  
  22. proc memCopy source:DWORD, destination:DWORD, size:DWORD
  23.  
  24. mov esi,[source]
  25. mov edi,[destination]
  26. mov ecx,[size]
  27. rep movsb
  28. ret
  29.  
  30. endp
  31.  
  32. section '.data' data readable writeable
  33.  
  34. source db 'hello',0
  35. destination rb TEXTSIZE
  36.  
  37. section '.idata' import data readable writeable
  38.  
  39. library kernel,'KERNEL32.DLL',\
  40. msvcrt,'MSVCRT'
  41.  
  42. import kernel,\
  43. ExitProcess,'ExitProcess'
  44.  
  45. import msvcrt,\
  46. getchar,'_fgetchar'
Add Comment
Please, Sign In to add comment