Guest User

Untitled

a guest
Jan 16th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. global main
  2.  
  3. section .data
  4. message db "Hello World!", 0x00
  5.  
  6. section .text
  7.  
  8. main:
  9. call hello
  10. ret
  11.  
  12. hello:
  13. lea rdi, [rel message]
  14. call puts
  15. ret
  16. .end:
  17.  
  18. global main
  19.  
  20. section .data
  21. message db "Hello World!", 0x00
  22.  
  23. section .text
  24.  
  25. main:
  26. call decrypt <---------------Addition
  27. call hello
  28. ret
  29.  
  30. decrypt: <---------------Addition
  31. DECRYPTOR_SECTION hello, hello.end-hello <---------------Addition
  32. ret <---------------Addition
  33.  
  34. hello:
  35. lea rdi, [rel message]
  36. call puts
  37. ret
  38. .end:
  39.  
  40. .386
  41. .model flat, stdcall
  42. option casemap:none
  43. include masm32includewindows.inc
  44. include masm32includekernel32.inc
  45. includelib kernel32.lib
  46. include masm32includeuser32.inc
  47. includelib user32.lib
  48.  
  49. .data
  50. Encrypted db 217,243,234,245,252,249,255,254,183,227,176,228,229
  51. db 228,255,226,249,241,252,176,254,255,190,162,144
  52.  
  53. .code
  54. start:
  55. ;call decrypt
  56. call hello
  57. invoke ExitProcess,NULL
  58.  
  59. ; decrypt proc
  60. ; xor ecx,ecx
  61. ; complete:
  62. ; lea esi , Encrypted
  63. ; add esi,ecx
  64. ; movzx eax , byte ptr ds:[esi]
  65. ; xor eax ,090h
  66. ; mov byte ptr ds:[Encrypted + ecx], al
  67. ; add ecx,1
  68. ; cmp byte ptr ds:[Encrypted + ecx - 1 ],0
  69. ; jne complete
  70. ; ret
  71. ; decrypt endp
  72.  
  73.  
  74. hello proc
  75. invoke MessageBox, NULL,addr Encrypted, addr Encrypted, MB_OK
  76. ret
  77. hello endp
  78.  
  79. end start
Add Comment
Please, Sign In to add comment