Z
soo und nochmal die stack order angucke:
test blub(15,16);
004113CE push 10h
004113D0 push 0Fh
004113D2 lea ecx,[blub]
004113D5 call test::test (4111D6h)
und der ctor
test(int a, int b){
00411450 push ebp
00411451 mov ebp,esp
00411453 sub esp,0CCh
00411459 push ebx
0041145A push esi
0041145B push edi
0041145C push ecx
0041145D lea edi,[ebp-0CCh]
00411463 mov ecx,33h
00411468 mov eax,0CCCCCCCCh
0041146D rep stos dword ptr es:[edi]
0041146F pop ecx
00411470 mov dword ptr [ebp-8],ecx
this->i=a;
00411473 mov eax,dword ptr [this]
00411476 mov ecx,dword ptr [a]
00411479 mov dword ptr [eax],ecx
__debugbreak();
0041147B int 3
}
0041147C mov eax,dword ptr [this]
0041147F pop edi
00411480 pop esi
00411481 pop ebx
00411482 mov esp,ebp
00411484 pop ebp
00411485 ret 8
mit __cdecl
test blub(15,16);
004113CE push 10h
004113D0 push 0Fh
004113D2 lea ecx,[blub]
004113D5 call test::test (4111D6h)
der ctor
__cdecl test(int a, int b){
00411450 push ebp
00411451 mov ebp,esp
00411453 sub esp,0CCh
00411459 push ebx
0041145A push esi
0041145B push edi
0041145C push ecx
0041145D lea edi,[ebp-0CCh]
00411463 mov ecx,33h
00411468 mov eax,0CCCCCCCCh
0041146D rep stos dword ptr es:[edi]
0041146F pop ecx
00411470 mov dword ptr [ebp-8],ecx
this->i=a;
00411473 mov eax,dword ptr [this]
00411476 mov ecx,dword ptr [a]
00411479 mov dword ptr [eax],ecx
__debugbreak();
0041147B int 3
}
0041147C mov eax,dword ptr [this]
0041147F pop edi
00411480 pop esi
00411481 pop ebx
00411482 mov esp,ebp
00411484 pop ebp
00411485 ret 8
jetzt nochmal mit __thiscall
test blub(15,16);
004113CE push 10h
004113D0 push 0Fh
004113D2 lea ecx,[blub]
004113D5 call test::test (4111D6h)
__thiscall test(int a, int b){
00411450 push ebp
00411451 mov ebp,esp
00411453 sub esp,0CCh
00411459 push ebx
0041145A push esi
0041145B push edi
0041145C push ecx
0041145D lea edi,[ebp-0CCh]
00411463 mov ecx,33h
00411468 mov eax,0CCCCCCCCh
0041146D rep stos dword ptr es:[edi]
0041146F pop ecx
00411470 mov dword ptr [ebp-8],ecx
this->i=a;
00411473 mov eax,dword ptr [this]
00411476 mov ecx,dword ptr [a]
00411479 mov dword ptr [eax],ecx
__debugbreak();
0041147B int 3
}
0041147C mov eax,dword ptr [this]
0041147F pop edi
00411480 pop esi
00411481 pop ebx
00411482 mov esp,ebp
00411484 pop ebp
00411485 ret 8
obwohl der stack cleanup unterschiedlich sein soll, erkenne ich keinen,..
grüüße