HalDisableInterrupt
__int64 __fastcall HalDisableInterrupt(_DWORD *a1){
int v2;
unsigned int v3;
unsigned int v5;
_DWORD *LinesForGsiRange;
_DWORD *v7;
ULONG_PTR *v8;
unsigned __int64 v9;
__int64 v10;
int v11;
unsigned int v12;
if( *a1 != 1 )
{
LABEL_10:
HalpInterruptLastProblem = 19;
return(unsigned int)-1073741811;
}
v2 = a1[2];
if( v2 )
{
if( v2 == 3 )
return 0;
goto LABEL_10;
}
v5 = a1[16];
LinesForGsiRange = HalpInterruptFindLinesForGsiRange(v5, v5 + 1);
v7 = LinesForGsiRange;
if( !LinesForGsiRange )
{
if( ((unsigned __int8(__fastcall *)(_QWORD, _QWORD))off_140C00780[0])(0i64, v5) )
return(unsigned int)HalpDisableSecondaryInterrupt(a1);
HalpInterruptLastProblem = 18;
return(unsigned int)-1073741811;
}
v11 = LinesForGsiRange[4];
v12 = v5 + LinesForGsiRange[5] - LinesForGsiRange[7];
HalpInterruptApplyOverrides(&v11, 0i64, 0i64);
v8 = HalpInterruptLookupController(v11);
if( !v8 )
HalpInterruptLastProblem = 17;
v9 = (unsigned __int8)HalpAcquireHighLevelLock(&HalpInterruptLock);
v10 = *((_QWORD *)v7 + 5) + 56i64 * (int)(v12 - v7[5]);
*(_DWORD *)(v10 + 12) &= ~0x10u;
v3 = HalpInterruptSetLineStateInternal((__int64)v8, (__int64)&v11, v10);
KxReleaseSpinLock(&HalpInterruptLock);
__writecr8(v9);
return v3;
}Referenced by:
KiDisconnectInterruptInternal
KiDisconnectSecondaryInterrupt