PopPowerAggregatorRecordIntent

UINT64 __fastcall PopPowerAggregatorRecordIntent(
        INT64 a1,
        UINT64 a2,
        UINT64 a3,
        UINT64 a4,
        INT64 a5,
        _OWORD *a6,
        INT64 a7){
  _OWORD *v7; 
  int v8; 
  int v9; 
  int v10; 
  _OWORD *v11; 
  int v12; 
  __int64 *v13; 
  UINT64 result; 
  __int128 v15; 
  UINT64 QpcTimeStamp; 
  v7 = (_OWORD *)a5;
  v8 = a4;
  v9 = a7;
  v10 = a3;
  v11 = a6;
  v12 = a2;
  PopPowerAggregatorDiagTraceHandleIntent((unsigned int)a2, (unsigned int)a3, (unsigned int)a4, a5, (INT64)a6, a7);
  v13 = &qword_140C216E0[18 * (((unsigned __int8)dword_140C216D8 - 1) & 0x1F)];
  if( *(_DWORD *)v13 != 1
    || *((_DWORD *)v13 + 6) != v12
    || *((_DWORD *)v13 + 8) != v8
    || *((_DWORD *)v13 + 34) != v9
    || !PopPowerAggregatorAreTargetStatesEqual(v13 + 5, (INT64)v7)
    || !PopPowerAggregatorAreTargetStatesEqual(v13 + 11, (INT64)v11)
    || (result = KeQueryInterruptTimePrecise(&QpcTimeStamp) - v13[1], result >= 0x2FAF080) )
  {
    result = PopPowerAggregatorAllocateLogEntry((INT64)&PopPowerAggregatorContext, 1i64);
    *(_DWORD *)(result + 24) = v12;
    *(_DWORD *)(result + 28) = v10;
    *(_DWORD *)(result + 32) = v8;
    *(_OWORD *)(result + 40) = *v7;
    *(_OWORD *)(result + 56) = v7[1];
    *(_OWORD *)(result + 72) = v7[2];
    *(_OWORD *)(result + 88) = *v11;
    *(_OWORD *)(result + 104) = v11[1];
    v15 = v11[2];
    *(_DWORD *)(result + 136) = v9;
    *(_OWORD *)(result + 120) = v15;
  }
  return result;
}

Referenced by:

PopPowerAggregatorHandleIntentUnsafe