Guest User

Untitled

a guest
Jul 21st, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.56 KB | None | 0 0
  1. namespace Mosa.QuickTest
  2. {
  3. /// <summary>
  4. ///
  5. /// </summary>
  6. public struct Struct
  7. {
  8. public int x;
  9. public int y;
  10. public int z;
  11.  
  12. public void Bar(int val)
  13. {
  14. x = y = z = val;
  15. }
  16. }
  17.  
  18. /// <summary>
  19. ///
  20. /// </summary>
  21. public static class App
  22. {
  23. /// <summary>
  24. /// Main
  25. /// </summary>
  26. public static void Main()
  27. {
  28. Struct foo;
  29. foo.x = 1;
  30. foo.y = 2;
  31. foo.z = 3;
  32. int bar = foo.x;
  33. foo.Bar(42);
  34. }
  35. }
  36. }
  37.  
  38.  
  39. .text:00401000 sub_401000 proc near ; CODE XREF: start+C5p
  40. .text:00401000
  41. .text:00401000 var_C = dword ptr -0Ch
  42. .text:00401000 var_4 = dword ptr -4
  43. .text:00401000
  44. .text:00401000 push ebp
  45. .text:00401002 mov ebp, esp
  46. .text:00401004 sub esp, 0Ch
  47. .text:0040100A push edi
  48. .text:0040100C mov edi, esp
  49. .text:0040100E push ecx
  50. .text:00401010 add edi, 4
  51. .text:00401016 mov ecx, 3
  52. .text:0040101C xor eax, eax
  53. .text:0040101E rep stosd
  54. .text:00401020 pop ecx
  55. .text:00401021 pop edi
  56. .text:00401022 mov [ebp+var_4], 1
  57. .text:0040102C push edx
  58. .text:0040102E nop
  59. .text:0040102F jmp $+5
  60. .text:00401034 nop
  61. .text:00401035 mov ecx, [ebp+4]
  62. .text:0040103B mov [ebp+var_C], ecx
  63. .text:00401041 mov ecx, [ebp+4]
  64. .text:00401047 mov [eax+8], ecx
  65. .text:0040104D mov ecx, [ebp+var_C]
  66. .text:00401053 mov [ebp+var_C], ecx
  67. .text:00401059 mov ecx, [ebp+var_C]
  68. .text:0040105F mov [eax+4], ecx
  69. .text:00401065 mov ecx, [ebp+var_C]
  70. .text:0040106B mov [eax+0], ecx
  71. .text:00401071 nop
  72. .text:00401072 jmp $+5
  73. .text:00401077 pop edx
  74. .text:00401078 add esp, 0Ch
  75. .text:0040107E pop ebp
  76. .text:0040107F retn
  77. .text:0040107F sub_401000 endp
  78. .text:0040107F
  79. .text:00401080 assume ds:_text
  80. .text:00401080
  81. .text:00401080 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
  82. .text:00401080
  83. .text:00401080 ; Attributes: bp-based frame
  84. .text:00401080
  85. .text:00401080 public start
  86. .text:00401080 start proc near ; CODE XREF: .text:00401193p
  87. .text:00401080
  88. .text:00401080 var_20 = dword ptr -20h
  89. .text:00401080 var_1C = dword ptr -1Ch
  90. .text:00401080 var_18 = dword ptr -18h
  91. .text:00401080 var_14 = dword ptr -14h
  92. .text:00401080 var_10 = dword ptr -10h
  93. .text:00401080 var_C = dword ptr -0Ch
  94. .text:00401080 var_4 = dword ptr -4
  95. .text:00401080
  96. .text:00401080 push ebp
  97. .text:00401082 mov ebp, esp
  98. .text:00401084 sub esp, 20h
  99. .text:0040108A push edi
  100. .text:0040108C mov edi, esp
  101. .text:0040108E push ecx
  102. .text:00401090 add edi, 4
  103. .text:00401096 mov ecx, 8
  104. .text:0040109C xor eax, eax
  105. .text:0040109E rep stosd
  106. .text:004010A0 pop ecx
  107. .text:004010A1 pop edi
  108. .text:004010A2 mov [ebp+var_4], 2
  109. .text:004010AC push edx
  110. .text:004010AE nop
  111. .text:004010AF jmp $+5
  112. .text:004010B4 nop
  113. .text:004010B5 lea eax, [ebp+0]
  114. .text:004010BC mov [ebp+var_18], eax
  115. .text:004010C2 mov dword ptr [eax+0], 1
  116. .text:004010CC lea eax, [ebp+0]
  117. .text:004010D3 mov [ebp+var_1C], eax
  118. .text:004010D9 mov dword ptr [eax+4], 2
  119. .text:004010E3 lea eax, [ebp+0]
  120. .text:004010EA mov [ebp+var_20], eax
  121. .text:004010F0 mov dword ptr [eax+8], 3
  122. .text:004010FA lea eax, [ebp+0]
  123. .text:00401101 mov [ebp+var_C], eax
  124. .text:00401107 mov ecx, [eax+0]
  125. .text:0040110D mov large ds:0, ecx
  126. .text:00401113 mov ecx, large ds:0
  127. .text:00401119 mov [ebp+var_10], ecx
  128. .text:0040111F lea eax, [ebp+0]
  129. .text:00401126 mov [ebp+var_14], eax
  130. .text:0040112C nop
  131. .text:0040112D sub esp, 4
  132. .text:00401133 mov edx, esp
  133. .text:00401135 mov dword ptr [edx+0], 2Ah
  134. .text:0040113F mov ecx, [ebp+var_14]
  135. .text:00401145 call sub_401000
  136. .text:0040114A add esp, 4
  137. .text:00401150 nop
  138. .text:00401151 nop
  139. .text:00401152 jmp $+5
  140. .text:00401157 pop edx
  141. .text:00401158 add esp, 20h
  142. .text:0040115E pop ebp
  143. .text:0040115F retn
  144. .text:0040115F start endp
  145. .text:0040115F
  146. .text:00401160 ; ---------------------------------------------------------------------------
  147. .text:00401160 jmp $+5
  148. .text:00401165 push ebp
  149. .text:00401167 mov ebp, esp
  150. .text:00401169 sub esp, 0
  151. .text:0040116F push edi
  152. .text:00401171 mov edi, esp
  153. .text:00401173 push ecx
  154. .text:00401175 add edi, 4
  155. .text:0040117B mov ecx, 0
  156. .text:00401181 xor eax, eax
  157. .text:00401183 rep stosd
  158. .text:00401185 pop ecx
  159. .text:00401186 pop edi
  160. .text:00401187 mov dword ptr [ebp-4], 0
  161. .text:00401191 push edx
  162. .text:00401193 call start
  163. .text:00401198 pop edx
  164. .text:00401199 add esp, 0
  165. .text:0040119F pop ebp
  166. .text:004011A0 retn
Add Comment
Please, Sign In to add comment