00401EA8 mov ecx,dword ptr [ebp-20h]
00401EAB call @ILT+170(CMemoryItem::`scalar deleting destructor') (004010af)
00401EB0 mov dword ptr [ebp-2Ch],eax
第一句不变,第二句变化了那相关流程会是什么样呢?进入它的内部去跟踪一下。看下面跟踪的汇编代码:
004021B0 push ebp
004021B1 mov ebp,esp
004021B3 sub esp,44h
004021B6 push ebx
004021B7 push esi
004021B8 push edi
004021B9 push ecx
004021BA lea edi,[ebp-44h]
004021BD mov ecx,11h
004021C2 mov eax,0CCCCCCCCh
004021C7 rep stos dword ptr [edi]
004021C9 pop ecx
004021CA mov dword ptr [ebp-4],ecx
004021CD mov ecx,dword ptr [ebp-4]
004021D0 call @ILT+160(CMemoryItem::~CMemoryItem) (004010a5)
004021D5 mov eax,dword ptr [ebp+8]
004021D8 and eax,1
004021DB test eax,eax
004021DD je CMemoryItem::`scalar deleting destructor'+3Bh (004021eb)
004021DF mov ecx,dword ptr [ebp-4]
004021E2 push ecx
004021E3 call operator delete (00402786)
004021E8 add esp,4
004021EB mov eax,dword ptr [ebp-4]
004021EE pop edi
004021EF pop esi
004021F0 pop ebx
004021F1 add esp,44h
004021F4 cmp ebp,esp
004021F6 call _chkesp (004027d4)
004021FB mov esp,ebp
004021FD pop ebp
004021FE ret 4
|