KiFloatingErrorFault
VOID __stdcall __noreturn KiFloatingErrorFault(){
char v0;
_ETHREAD *CurrentThread;
unsigned __int8 BpbKernelSpecCtrl;
unsigned __int8 BpbState;
ULONG64 v4;
_QWORD *Object;
char v9;
INT64 v10;
void *v11;
void *v12;
CHAR v13;
char v14;
VOID *retaddr;
char v16;
__int16 v17;
if( (v16 & 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);
if( (char)CurrentThread->Tcb.gap0[3] < 0 )
{
v4 = __readmsr(0xC0000102);
if( v4 >= MmUserProbeAddress )
v4 = MmUserProbeAddress;
if( CurrentThread->Tcb.Teb != (void *)v4 )
{
Object = CurrentThread->Tcb.WaitBlock[3].Object;
CurrentThread->Tcb._bf_0 |= 0x100u;
--CurrentThread->Tcb.SpecialApcDisable;
Object[16] = v4;
}
}
if( (CurrentThread->Tcb.gap0[3] & 3) != 0 )
KiSaveDebugRegisterState();
}
else
{
_mm_lfence();
if( (KeGetPcr()->Prcb.BpbState & 1) != 0 )
__writemsr(0x48u, KeGetPcr()->Prcb.BpbCurrentSpecCtrl);
else
_mm_lfence();
}
_mm_getcsr();
_mm_setcsr(KeGetPcr()->Prcb._MxCsr);
if( (_BYTE)KeSmapEnabled && (v16 & 1) != 0 )
__stac();
if( (v17 & 0x200) != 0 )
_enable();
if( (v16 & 1) != 0 )
{
v9 = ~(v14 & 0x3F) & v0;
v10 = 3221225616i64;
if( (v9 & 1) != 0 )
{
if( (v9 & 0x40) != 0 )
v10 = 3221225618i64;
LABEL_34:
KiExceptionDispatch(v10, 1i64, retaddr, 0i64, v13);
goto LABEL_35;
}
v10 = 3221225614i64;
if( (v9 & 4) != 0 )
goto LABEL_34;
v10 = 3221225616i64;
if( (v9 & 2) != 0 )
goto LABEL_34;
v10 = 3221225617i64;
if( (v9 & 8) != 0 )
goto LABEL_34;
v10 = 3221225619i64;
if( (v9 & 0x10) != 0 )
goto LABEL_34;
v10 = 3221225615i64;
if( (v9 & 0x20) != 0 )
goto LABEL_34;
}
LABEL_35:
v11 = (void *)__readcr4();
v12 = (void *)__readcr0();
KiBugCheckDispatch(0x7Fu, (void *)0x10, v12, v11);
}Referenced by:
KiFloatingErrorFaultShadow