IopInsertPassiveInterruptBlock

__int64 __fastcall IopInsertPassiveInterruptBlock(__int64 a1, _BYTE *a2){
  __int64 PassiveInterruptBlockLocked; 
  __int64 *v5; 
  UINT8 v7; 
  v7 = 0;
  *a2 = 1;
  IopAcquireGlobalPassiveInterruptListLock(&v7);
  PassiveInterruptBlockLocked = IopFindPassiveInterruptBlockLocked(*(_DWORD *)(a1 + 20));
  if( !PassiveInterruptBlockLocked )
  {
    _InterlockedIncrement((volatile signed __int32 *)(a1 + 192));
    v5 = (__int64 *)qword_140C45268;
    if( *(__int64 **)qword_140C45268 != &PassiveInterruptList )
      __fastfail(3u);
    *(_QWORD *)a1 = &PassiveInterruptList;
    *(_QWORD *)(a1 + 8) = v5;
    *v5 = a1;
    qword_140C45268 = a1;
  }
  KxReleaseSpinLock(&PassiveInterruptListLock);
  __writecr8(v7);
  if( PassiveInterruptBlockLocked )
    *a2 = 0;
  return 0i64;
}

Referenced by:

IopAllocatePassiveInterruptBlock