Guest User

Untitled

a guest
Jun 22nd, 2018
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. bits 32
  2. org 0x100000
  3. align 4
  4. dd 0x1BADB002
  5. dd 0x10003
  6. dd -(0x1BADB002 + 0x10003)
  7. dd 0x100000
  8. dd 0x100000
  9. dd end+4
  10. dd end+4
  11. dd start
  12. start:
  13. mov esp, 0x00400000
  14. call Main
  15. .forever:
  16. jmp .forever
  17. SetChar:
  18. push ebp
  19. push esi
  20. mov esi, esp
  21. add esi,8+ 12
  22. mov ebp, esp
  23. sub esp, 4
  24. push 0
  25. jmp .block_0
  26. .block_0:
  27. push 753664
  28. pop eax
  29. mov [ebp + 0], eax
  30. mov eax, [ebp + 0]
  31. push eax
  32. mov eax, [esi + 0]
  33. push eax
  34. mov eax, [esi + -4]
  35. push eax
  36. push 320
  37. pop ebx
  38. pop eax
  39. mul ebx
  40. push eax
  41. pop ebx
  42. pop eax
  43. add eax, ebx
  44. push eax
  45. push 2
  46. pop ebx
  47. pop eax
  48. mul ebx
  49. push eax
  50. push 3840
  51. mov eax, [esi + -8]
  52. push eax
  53. pop ebx
  54. pop eax
  55. or eax, ebx
  56. push eax
  57. pop ecx
  58. pop ebx
  59. pop eax
  60. mov [eax + ebx], cx
  61. pop eax
  62. mov esp, ebp
  63. pop esi
  64. pop ebp
  65. ret
  66. Main:
  67. push ebp
  68. push esi
  69. mov esi, esp
  70. mov ebp, esp
  71. sub esp, 12
  72. push 0
  73. jmp .block_0
  74. .block_44:
  75. pop eax
  76. mov esp, ebp
  77. pop esi
  78. pop ebp
  79. ret
  80. .block_33:
  81. mov eax, [ebp + -8]
  82. push eax
  83. push 12
  84. pop ebx
  85. pop eax
  86. cmp eax, ebx
  87. jl .block_13
  88. jmp .block_44
  89. .block_13:
  90. mov eax, [ebp + -8]
  91. push eax
  92. pop eax
  93. mov [ebp + -4], eax
  94. mov eax, [ebp + -8]
  95. push eax
  96. push 1
  97. pop ebx
  98. pop eax
  99. add eax, ebx
  100. push eax
  101. pop eax
  102. mov [ebp + -8], eax
  103. mov eax, [ebp + -4]
  104. push eax
  105. push 0
  106. mov eax, [ebp + 0]
  107. push eax
  108. mov eax, [ebp + -4]
  109. push eax
  110. pop ebx
  111. pop eax
  112. mov al, [eax + ebx]
  113. push eax
  114. call SetChar
  115. sub esp, 12
  116. jmp .block_33
  117. .block_0:
  118. mov eax, str_0
  119. push eax
  120. pop eax
  121. mov [ebp + 0], eax
  122. push 0
  123. pop eax
  124. mov [ebp + -8], eax
  125. jmp .block_33
  126. str_0: db "Hello world!",0
  127. end: dd 0
Add Comment
Please, Sign In to add comment