HalpUnmaskInterrupt

INT64 __fastcall HalpUnmaskInterrupt(UINT64 InputGsiv, UINT64 Flags){
  unsigned int v2; 
  unsigned int v3; 
  _DWORD *LinesForGsiRange; 
  _DWORD *v5; 
  ULONG_PTR *v6; 
  unsigned __int64 v7; 
  __int64 v8; 
  int v9; 
  unsigned int v10; 
  unsigned int v11; 
  __int64 v13; 
  v13 = 0i64;
  v2 = Flags;
  v3 = InputGsiv;
  LinesForGsiRange = HalpInterruptFindLinesForGsiRange(InputGsiv, (int)InputGsiv + 1);
  v5 = LinesForGsiRange;
  if( !LinesForGsiRange )
  {
    if( ((unsigned __int8(__fastcall *)(_QWORD, _QWORD))off_140C00780[0])(0i64, v3) )
      return(unsigned int)HalpHandleMaskUnmaskSecondaryInterrupt(v3, v2, 0i64);
    HalpInterruptLastProblem = 19;
    return(unsigned int)-1073741811;
  }
  LODWORD(v13) = LinesForGsiRange[4];
  HIDWORD(v13) = v3 + LinesForGsiRange[5] - LinesForGsiRange[7];
  v6 = HalpInterruptLookupController(v13);
  if( !v6 )
  {
    HalpInterruptLastProblem = 17;
    return(unsigned int)-1073741811;
  }
  v7 = (unsigned __int8)HalpAcquireHighLevelLock(&HalpInterruptLock);
  v8 = *((_QWORD *)v5 + 5) + 56i64 * (v3 - v5[7]);
  v9 = *(_DWORD *)(v8 + 12);
  if( (v2 & 2) != 0 )
    v10 = v9 & 0xFFFFFFDF;
  else
    v10 = v9 | 0x10;
  *(_DWORD *)(v8 + 12) = v10;
  v11 = HalpInterruptSetLineStateInternal((__int64)v6, (__int64)&v13, v8);
  KxReleaseSpinLock(&HalpInterruptLock);
  __writecr8(v7);
  return v11;
}

Referenced by:

No references.