HalpTimerRestartProfileInterrupt

VOID __fastcall HalpTimerRestartProfileInterrupt(INT64 a1, VOID *a2, VOID *a3, UINT64 *a4){
  KDPC *v4; 
  char v5; 
  unsigned int v6; 
  __int64 v7; 
  int v8; 
  __int64 v9; 
  unsigned __int64 v10; 
  v4 = (KDPC *)HalpProfileTimer;
  v5 = 0;
  if( HalpProfileTimer )
  {
    v6 = *((_DWORD *)KeGetPcr() + 105);
    if( (*((_DWORD *)HalpProfileTimer + 56) & 1) == 0 && v6
      || (v5 = 1,
          HalpTimerGetInternalData((KDPC *)HalpProfileTimer, a2, a3, a4),
          v8 = ((__int64(__fastcall *)(__int64))v4[1].SystemArgument1)(v7),
          v8 >= 0) )
    {
      if( v5 )
      {
        if( HalpProfilingActive )
        {
          HalpSetTimer((__int64)v4, 2u, *(unsigned int *)(32i64 * v6 + HalpProfileData + 24), 1, &v10);
        }
        else
        {
          HalpTimerGetInternalData(v4, a2, a3, a4);
          ((void(__fastcall *)(__int64))v4[2].DpcListEntry.Next)(v9);
        }
      }
    }
    else
    {
      v4[4].TargetInfoAsUlong = v8;
      HalpTimerLastProblem = 15;
      v4[4].DpcListEntry.Next = (_SINGLE_LIST_ENTRY *)"minkernel\\hals\\lib\\timers\\common\\timeprof.c";
      HIDWORD(v4[3].DpcData) = 15;
      LODWORD(v4[4].ProcessorHistory) = 502;
    }
  }
}

Referenced by:

DefaultRestartProfiling
HalpTimerProfilePowerChange