KiVmbusInterrupt1
INT64 __fastcall KiVmbusInterrupt1(UINT64 SecurityDomain, UINT64 BpbState, UINT64 a3, UINT64 a4){
unsigned __int64 v4;
unsigned __int64 v5;
unsigned __int64 v6;
_M128A v7;
_M128A v8;
_M128A v9;
_M128A v10;
_M128A v11;
_M128A v12;
_KTRAP_FRAME *__shifted(_KTRAP_FRAME,0x80) TrapFrame;
_ETHREAD *CurrentThread;
unsigned __int8 v15;
bool v16;
TrapFrame = KeGetTrapFrame();
ADJ(TrapFrame)->ExceptionActive = 0;
ADJ(TrapFrame)->Rax = v4;
ADJ(TrapFrame)->Rcx = SecurityDomain;
ADJ(TrapFrame)->Rdx = BpbState;
ADJ(TrapFrame)->R8 = a3;
ADJ(TrapFrame)->R9 = a4;
ADJ(TrapFrame)->R10 = v5;
ADJ(TrapFrame)->R11 = v6;
if( (ADJ(TrapFrame)->SegCs & 1) != 0 )
{
if( (KiKvaShadow & 1) == 0 )
__swapgs();
_mm_lfence();
CurrentThread = (_ETHREAD *)KeGetCurrentThread();
SecurityDomain = *(_QWORD *)(*((_QWORD *)CurrentThread + 68) + 2528i64);
__writegsqword(0x270u, SecurityDomain);
__writegsbyte(0x851u, *((_BYTE *)KeGetPcr() + 2128));
LOBYTE(SecurityDomain) = *((_BYTE *)KeGetPcr() + 632);
__writegsbyte(0x852u, SecurityDomain);
v15 = *((_BYTE *)KeGetPcr() + 635);
if( *((_BYTE *)KeGetPcr() + 634) != v15 )
{
__writegsbyte(0x27Au, v15);
SecurityDomain = 72i64;
HIDWORD(BpbState) = 0;
__writemsr(0x48u, v15);
}
LODWORD(BpbState) = *((unsigned __int8 *)KeGetPcr() + 632);
if( (BpbState & 8) != 0 )
{
SecurityDomain = 73i64;
__writemsr(0x49u, 1ui64);
BpbState = *((unsigned __int8 *)KeGetPcr() + 632);
LODWORD(BpbState) = (unsigned __int8)BpbState;
}
if( (BpbState & 2) != 0 )
__flush_rsb();
_mm_lfence();
__writegsbyte(0x853u, 0);
v16 = (*((_BYTE *)CurrentThread + 3) & 3) == 0;
LOWORD(ADJ(TrapFrame)->Dr7) = 0;
if( !v16 )
KiSaveDebugRegisterState();
}
else
{
_mm_lfence();
if( (*((_BYTE *)KeGetPcr() + 632) & 1) != 0 )
{
SecurityDomain = 72i64;
BpbState = 0i64;
__writemsr(0x48u, *((unsigned __int8 *)KeGetPcr() + 634));
}
else
{
_mm_lfence();
}
}
ADJ(TrapFrame)->MxCsr = _mm_getcsr();
_mm_setcsr(*((_DWORD *)KeGetPcr() + 96));
ADJ(TrapFrame)->Xmm0 = v7;
ADJ(TrapFrame)->Xmm1 = v8;
ADJ(TrapFrame)->Xmm2 = v9;
ADJ(TrapFrame)->Xmm3 = v10;
ADJ(TrapFrame)->Xmm4 = v11;
ADJ(TrapFrame)->Xmm5 = v12;
if( *((_BYTE *)KeGetPcr() + 32794) )
KeWakeProcessor();
if( (unsigned __int64)&ExpInterlockedPopEntrySListResume < ADJ(TrapFrame)->Rip
&& (unsigned __int64)&ExpInterlockedPopEntrySListEnd >= ADJ(TrapFrame)->Rip )
{
KiCheckForSListAddress(ADJ(TrapFrame));
}
__incgsdword(0x8000u);
return KiVmbusInterruptDispatch(SecurityDomain, BpbState);
}Referenced by:
KiVmbusInterrupt1Shadow