HalpConnectThermalInterrupt

INT64 __stdcall HalpConnectThermalInterrupt(PVOID BugCheckParameter4){
  PVOID v1; 
  INT64 result; 
  INT64 v3; 
  INT64 v4; 
  KPCR *Pcr; 
  ULONG_PTR v6; 
  ULONG_PTR BugCheckParameter4a; 
  int v8; 
  int v9; 
  int v10; 
  int v11; 
  int v12; 
  int v13; 
  int v14; 
  int v15; 
  int v16; 
  __int64 v17; 
  int v18; 
  int v19; 
  int Priority; 
  int a2; 
  int v22; 
  int v23; 
  v9 = 0;
  v15 = 0;
  v1 = BugCheckParameter4;
  v17 = 0i64;
  v18 = 0;
  LODWORD(BugCheckParameter4) = *((_DWORD *)KeGetPcr() + 105);
  a2 = 0;
  result = HalpInterruptGetIdentifiers((INT64)BugCheckParameter4, &a2, 0i64);
  if( (int)result >= 0 )
  {
    v3 = HalpInterruptController;
    v22 = *(_DWORD *)(HalpInterruptController + 232);
    v23 = -2;
    if( *(_DWORD *)(HalpInterruptController + 216) == 2 && HalpInterruptFindLines(&v22) )
    {
      Pcr = KeGetPcr();
      if( !*((_BYTE *)Pcr + 213) )
      {
        if( HalpInterruptThermalServiceRoutine )
        {
          if( (PVOID)HalpInterruptThermalServiceRoutine != v1 )
          {
            LODWORD(BugCheckParameter4a) = 3391;
            HalpInterruptSetProblemEx(
              0i64,
              InterruptProblemMismatchedThermalLvtIsr,
              0i64,
              "minkernel\\hals\\lib\\interrupts\\common\\intsup.c",
              BugCheckParameter4a);
            KeBugCheckEx(0x5Cu, 0x200ui64, HalpInterruptLastProblem, v6, (ULONG_PTR)v1);
          }
        }
        else
        {
          HalpInterruptThermalServiceRoutine = (__int64)v1;
        }
        HalpInterruptSetIdtEntry(0xCDui64, HalpInterruptThermalService, 12, v4, (UINT64 *)0xFFFFFFFFFFFFFFFFi64);
        *((_BYTE *)Pcr + 213) = 1;
        goto LABEL_8;
      }
      if( (PVOID)HalpInterruptThermalServiceRoutine == v1 )
      {
LABEL_8:
        v9 = 0;
        v15 = 0;
        v17 = 0i64;
        v18 = 0;
        v12 = -1;
        v16 = a2;
        v8 = 1;
        v10 = 1;
        v11 = 16;
        v13 = 1;
        v14 = 4;
        v19 = 205;
        Priority = HalpInterruptGetPriority(v3, 0xCDu);
        return HalpInterruptSetLineStateInternal(v3, (__int64)&v22, (__int64)&v8);
      }
      LODWORD(BugCheckParameter4a) = 3421;
      HalpInterruptSetProblemEx(
        0i64,
        InterruptProblemMismatchedThermalLvtIsr,
        0i64,
        "minkernel\\hals\\lib\\interrupts\\common\\intsup.c",
        BugCheckParameter4a);
      return 3221226021i64;
    }
    else
    {
      return 3221225659i64;
    }
  }
  return result;
}

Referenced by:

No references.