_C_specific_handler
EXCEPTION_DISPOSITION __cdecl _C_specific_handler(
struct _EXCEPTION_RECORD *ExceptionRecord,
void *EstablisherFrame,
struct _CONTEXT *ContextRecord,
struct _DISPATCHER_CONTEXT *DispatcherContext){
char *ImageBase;
unsigned __int64 v9;
ULONG *HandlerData;
ULONG ScopeIndex;
__int64 v12;
int v13;
ULONG v15;
unsigned __int64 v16;
ULONG v17;
__int64 v18;
ULONG i;
__int64 v20;
__int64 v21[2];
KeCheckStackAndTargetAddress((PVOID)ContextRecord->Rip);
ImageBase = (char *)DispatcherContext->ImageBase;
v9 = DispatcherContext->ControlPc - (_QWORD)ImageBase;
HandlerData = (ULONG *)DispatcherContext->HandlerData;
ScopeIndex = DispatcherContext->ScopeIndex;
if( (ExceptionRecord->ExceptionFlags & 0x66) != 0 )
{
v15 = *HandlerData;
v16 = DispatcherContext->TargetIp - (_QWORD)ImageBase;
if( ScopeIndex < *HandlerData )
{
v17 = *HandlerData;
do
{
v18 = v17;
if( v9 >= HandlerData[4 * ScopeIndex + 1] && v9 < HandlerData[4 * ScopeIndex + 2] )
{
if( (ExceptionRecord->ExceptionFlags & 0x20) != 0 )
{
for( i = 0; i < v17; ++i )
{
if( v16 >= HandlerData[4 * i + 1]
&& v16 < HandlerData[4 * i + 2]
&& HandlerData[4 * i + 4] == HandlerData[4 * ScopeIndex + 4]
&& HandlerData[4 * i + 3] == HandlerData[4 * ScopeIndex + 3] )
{
break;
}
}
v18 = v15;
if( i != v15 )
return 1;
}
v20 = HandlerData[4 * ScopeIndex + 4];
if( (_DWORD)v20 )
{
if( v16 == v20 )
return 1;
}
else
{
DispatcherContext->ScopeIndex = ScopeIndex + 1;
LOBYTE(v18) = 1;
((void(__fastcall *)(__int64, void *))&ImageBase[HandlerData[4 * ScopeIndex + 3]])(v18, EstablisherFrame);
v15 = *HandlerData;
LODWORD(v18) = *HandlerData;
}
}
++ScopeIndex;
v17 = v18;
}
while( ScopeIndex < (unsigned int)v18 );
}
}
else
{
v21[0] = (__int64)ExceptionRecord;
v21[1] = (__int64)ContextRecord;
while( ScopeIndex < *HandlerData )
{
if( v9 >= HandlerData[4 * ScopeIndex + 1]
&& v9 < HandlerData[4 * ScopeIndex + 2]
&& HandlerData[4 * ScopeIndex + 4] )
{
v12 = HandlerData[4 * ScopeIndex + 3];
if( (_DWORD)v12 == 1 )
goto LABEL_10;
v13 = ((__int64(__fastcall *)(__int64 *, void *))&ImageBase[v12])(v21, EstablisherFrame);
if( v13 < 0 )
return 0;
if( v13 > 0 )
{
LABEL_10:
NLG_Notify(&ImageBase[HandlerData[4 * ScopeIndex + 4]], EstablisherFrame, 1i64);
RtlUnwindEx(
EstablisherFrame,
&ImageBase[HandlerData[4 * ScopeIndex + 4]],
ExceptionRecord,
(PVOID)ExceptionRecord->ExceptionCode,
(CONTEXT *)DispatcherContext->ContextRecord,
DispatcherContext->HistoryTable);
_NLG_Return2();
}
}
++ScopeIndex;
}
}
return 1;
}Referenced by:
No references.