Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Mosa.QuickTest
- {
- /// <summary>
- ///
- /// </summary>
- public struct Struct
- {
- public int x;
- public int y;
- public int z;
- public void Bar(int val)
- {
- x = y = z = val;
- }
- }
- /// <summary>
- ///
- /// </summary>
- public static class App
- {
- /// <summary>
- /// Main
- /// </summary>
- public static void Main()
- {
- Struct foo;
- foo.x = 1;
- foo.y = 2;
- foo.z = 3;
- int bar = foo.x;
- foo.Bar(42);
- }
- }
- }
- .text:00401000 sub_401000 proc near ; CODE XREF: start+C5p
- .text:00401000
- .text:00401000 var_C = dword ptr -0Ch
- .text:00401000 var_4 = dword ptr -4
- .text:00401000
- .text:00401000 push ebp
- .text:00401002 mov ebp, esp
- .text:00401004 sub esp, 0Ch
- .text:0040100A push edi
- .text:0040100C mov edi, esp
- .text:0040100E push ecx
- .text:00401010 add edi, 4
- .text:00401016 mov ecx, 3
- .text:0040101C xor eax, eax
- .text:0040101E rep stosd
- .text:00401020 pop ecx
- .text:00401021 pop edi
- .text:00401022 mov [ebp+var_4], 1
- .text:0040102C push edx
- .text:0040102E nop
- .text:0040102F jmp $+5
- .text:00401034 nop
- .text:00401035 mov ecx, [ebp+4]
- .text:0040103B mov [ebp+var_C], ecx
- .text:00401041 mov ecx, [ebp+4]
- .text:00401047 mov [eax+8], ecx
- .text:0040104D mov ecx, [ebp+var_C]
- .text:00401053 mov [ebp+var_C], ecx
- .text:00401059 mov ecx, [ebp+var_C]
- .text:0040105F mov [eax+4], ecx
- .text:00401065 mov ecx, [ebp+var_C]
- .text:0040106B mov [eax+0], ecx
- .text:00401071 nop
- .text:00401072 jmp $+5
- .text:00401077 pop edx
- .text:00401078 add esp, 0Ch
- .text:0040107E pop ebp
- .text:0040107F retn
- .text:0040107F sub_401000 endp
- .text:0040107F
- .text:00401080 assume ds:_text
- .text:00401080
- .text:00401080 ; ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
- .text:00401080
- .text:00401080 ; Attributes: bp-based frame
- .text:00401080
- .text:00401080 public start
- .text:00401080 start proc near ; CODE XREF: .text:00401193p
- .text:00401080
- .text:00401080 var_20 = dword ptr -20h
- .text:00401080 var_1C = dword ptr -1Ch
- .text:00401080 var_18 = dword ptr -18h
- .text:00401080 var_14 = dword ptr -14h
- .text:00401080 var_10 = dword ptr -10h
- .text:00401080 var_C = dword ptr -0Ch
- .text:00401080 var_4 = dword ptr -4
- .text:00401080
- .text:00401080 push ebp
- .text:00401082 mov ebp, esp
- .text:00401084 sub esp, 20h
- .text:0040108A push edi
- .text:0040108C mov edi, esp
- .text:0040108E push ecx
- .text:00401090 add edi, 4
- .text:00401096 mov ecx, 8
- .text:0040109C xor eax, eax
- .text:0040109E rep stosd
- .text:004010A0 pop ecx
- .text:004010A1 pop edi
- .text:004010A2 mov [ebp+var_4], 2
- .text:004010AC push edx
- .text:004010AE nop
- .text:004010AF jmp $+5
- .text:004010B4 nop
- .text:004010B5 lea eax, [ebp+0]
- .text:004010BC mov [ebp+var_18], eax
- .text:004010C2 mov dword ptr [eax+0], 1
- .text:004010CC lea eax, [ebp+0]
- .text:004010D3 mov [ebp+var_1C], eax
- .text:004010D9 mov dword ptr [eax+4], 2
- .text:004010E3 lea eax, [ebp+0]
- .text:004010EA mov [ebp+var_20], eax
- .text:004010F0 mov dword ptr [eax+8], 3
- .text:004010FA lea eax, [ebp+0]
- .text:00401101 mov [ebp+var_C], eax
- .text:00401107 mov ecx, [eax+0]
- .text:0040110D mov large ds:0, ecx
- .text:00401113 mov ecx, large ds:0
- .text:00401119 mov [ebp+var_10], ecx
- .text:0040111F lea eax, [ebp+0]
- .text:00401126 mov [ebp+var_14], eax
- .text:0040112C nop
- .text:0040112D sub esp, 4
- .text:00401133 mov edx, esp
- .text:00401135 mov dword ptr [edx+0], 2Ah
- .text:0040113F mov ecx, [ebp+var_14]
- .text:00401145 call sub_401000
- .text:0040114A add esp, 4
- .text:00401150 nop
- .text:00401151 nop
- .text:00401152 jmp $+5
- .text:00401157 pop edx
- .text:00401158 add esp, 20h
- .text:0040115E pop ebp
- .text:0040115F retn
- .text:0040115F start endp
- .text:0040115F
- .text:00401160 ; ---------------------------------------------------------------------------
- .text:00401160 jmp $+5
- .text:00401165 push ebp
- .text:00401167 mov ebp, esp
- .text:00401169 sub esp, 0
- .text:0040116F push edi
- .text:00401171 mov edi, esp
- .text:00401173 push ecx
- .text:00401175 add edi, 4
- .text:0040117B mov ecx, 0
- .text:00401181 xor eax, eax
- .text:00401183 rep stosd
- .text:00401185 pop ecx
- .text:00401186 pop edi
- .text:00401187 mov dword ptr [ebp-4], 0
- .text:00401191 push edx
- .text:00401193 call start
- .text:00401198 pop edx
- .text:00401199 add esp, 0
- .text:0040119F pop ebp
- .text:004011A0 retn
Add Comment
Please, Sign In to add comment