引言:_except_handler3是BaseProcessStart的异常处理函数。 7C839AF0 ; int __cdecl _except_handler3(EXCEPTION_RECORD *argExceptionRecord, 7C839AF0 _EXCEPTION_REGISTRATION *argEstablisherFrame, _CONTEXT *argContextRecord) 7C839AF0 7C839AF0 varXPointers = dword ptr -8 7C839AF0 var_4 = dword ptr -4 7C839AF0 argExceptionRecord= dword ptr 8 7C839AF0 argEstablisherFrame= dword ptr 0Ch 7C839AF0 argContextRecord= dword ptr 10h 7C839AF0 ; 7C839AF0 ; 7C839AF0 ; VC++扩展SEH 7C839AF0 ; [ebp-14];PEXCEPTION_POINTERS xpointers; 7C839AF0 ; ;struct _EXCEPTION_REGISTRATION{ 7C839AF0 ; [ebp-10]; struct _EXCEPTION_REGISTRATION *prev; 7C839AF0 ; [ebp-0C]; _except_handler handler; 7C839AF0 ; [ebp-08]; struct scopetable_entry *scopetable; 7C839AF0 ; [ebp-04]; int trylevel; 7C839AF0 ; [ebp-00]; int _ebp; 7C839AF0 ; ;}; 7C839AF0 ; argEstablisherFrame当前指向[ebp-10] 7C839AF0 ; 7C839AF0 ; 7C839AF0 ; _except_handler定义 7C839AF0 ; typedef EXCEPTION_DISPOSITION __cdecl (*_except_handler)( 7C839AF0 ; _In_ struct _EXCEPTION_RECORD *_ExceptionRecord, 7C839AF0 ; _In_ void * _EstablisherFrame, 7C839AF0 ; _Inout_ struct _CONTEXT *_ContextRecord, 7C839AF0 ; _Inout_ void * _DispatcherContext 7C839AF0 ; ); 7C839AF0 ; 7C839AF0 ; 7C839AF0 ; scopetable_entry定义 7C839AF0 ; struct scopetable_entry{ 7C839AF0 ; DWORD prevlevel; 7C839AF0 ; PVOID lpfnFilter; 7C839AF0 ; PVOID lpfnHandler; 7C839AF0 ; } 7C839AF0 7C839AF0 push ebp 7C839AF1 mov ebp, esp 7C839AF3 sub esp, 8 ; EXCEPTION_POINTERS varXPointers; 7C839AF6 push ebx 7C839AF7 push esi 7C839AF8 push edi 7C839AF9 push ebp 7C839AFA cld ; Clear Direction Flag 7C839AFB mov ebx, [ebp+argEstablisherFrame] 7C839AFE mov eax, [ebp+argExceptionRecord] 7C839B01 test dword ptr [eax+4], 6 ;if(argExceptionRecord->ExceptionFlags & 7C839B01 ; EXCEPTION_UNWIND_CONTEXT) 7C839B01 ; goto loc_7C839BB9 7C839B01 ;EXCEPTION_UNWIND_CONTEXT在exsup.inc中定义 7C839B08 jnz loc_7C839BB9 7C839B0E mov [ebp+varXPointers], eax;varXPointers->ExceptionRecord=argExceptionRecord 7C839B11 mov eax, [ebp+argContextRecord] 7C839B14 mov [ebp+var_4], eax ;varXPointers->ContextRecord=argContextRecord 7C839B17 lea eax, [ebp+varXPointers] 7C839B1A mov [ebx-4], eax