KiDoubleFaultAbort
VOID __stdcall __noreturn KiDoubleFaultAbort(INT64 a1, INT64 a2, INT64 a3, INT64 a4){
__int64 v4;
__int64 v5;
__int64 v6;
__int128 v7;
__int128 v8;
__int128 v9;
__int128 v10;
__int128 v11;
__int128 v12;
_ETHREAD *CurrentThread;
unsigned __int8 BpbKernelSpecCtrl;
unsigned __int8 BpbState;
bool v16;
_BYTE v17[44];
int v18;
__int64 v19;
INT64 v20;
INT64 v21;
INT64 v22;
INT64 v23;
__int64 v24;
__int64 v25;
__int128 v26;
__int128 v27;
__int128 v28;
__int128 v29;
__int128 v30;
__int128 v31;
__int16 v32;
char v33;
void *v34;
v17[43] = 1;
v19 = v4;
v20 = a1;
v21 = a2;
v22 = a3;
v23 = a4;
v24 = v5;
v25 = v6;
if( (v33 & 1) != 0 )
{
if( (KiKvaShadow & 1) == 0 )
__swapgs();
_mm_lfence();
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
__writegsqword(0x270u, CurrentThread->Tcb.Process->SecurityDomain);
__writegsbyte(0x851u, KeGetPcr()->Prcb.BpbRetpolineExitSpecCtrl);
__writegsbyte(0x852u, KeGetPcr()->Prcb.BpbState);
BpbKernelSpecCtrl = KeGetPcr()->Prcb.BpbKernelSpecCtrl;
if( KeGetPcr()->Prcb.BpbCurrentSpecCtrl != BpbKernelSpecCtrl )
{
__writegsbyte(0x27Au, BpbKernelSpecCtrl);
__writemsr(0x48u, BpbKernelSpecCtrl);
}
BpbState = KeGetPcr()->Prcb.BpbState;
if( (BpbState & 8) != 0 )
{
__writemsr(0x49u, 1ui64);
BpbState = KeGetPcr()->Prcb.BpbState;
}
if( (BpbState & 2) != 0 )
__flush_rsb();
_mm_lfence();
__writegsbyte(0x853u, 0);
v16 = (CurrentThread->Tcb.gap0[3] & 3) == 0;
v32 = 0;
if( !v16 )
KiSaveDebugRegisterState();
}
else
{
_mm_lfence();
if( (KeGetPcr()->Prcb.BpbState & 1) != 0 )
__writemsr(0x48u, KeGetPcr()->Prcb.BpbCurrentSpecCtrl);
else
_mm_lfence();
}
v18 = _mm_getcsr();
_mm_setcsr(KeGetPcr()->Prcb._MxCsr);
v26 = v7;
v27 = v8;
v28 = v9;
v29 = v10;
v30 = v11;
v31 = v12;
if( (_BYTE)KeSmapEnabled )
{
if( (v33 & 1) != 0 )
__stac();
}
KiBugCheckDispatch(0x7Fu, (void *)8, v17, v34);
}Referenced by:
KiDoubleFaultAbortShadow