PopPowerAggregatorAllocateLogEntry

NTSTATUS __stdcall PopPowerAggregatorAllocateLogEntry(INT64 a1, INT64 a2){
  __int64 v2; 
  int v4; 
  __int64 v5; 
  __int64 v6; 
  NTSTATUS result; 
  UINT64 QpcTimeStamp; 

  v2 = *(unsigned int *)(a1 + 312);
  v4 = a2;
  *(_DWORD *)(a1 + 312) = ((_BYTE)v2 + 1) & 0x1F;
  v5 = 144 * v2 + a1;
  memset((VOID *)(144 * v2 + a1 + 324), 0i64, 0x8Cu);
  *(_DWORD *)(v5 + 320) = v4;
  LODWORD(v6) = KeQueryInterruptTimePrecise(&QpcTimeStamp);
  *(_QWORD *)(v5 + 328) = v6;
  result = v5 + 320;
  *(_QWORD *)(v5 + 336) = *(_QWORD *)a1;
  return result;
}

Referenced by:

PopPowerAggregatorInvokeStateMachine
PopPowerAggregatorRecordIntent
PopPowerAggregatorSetCurrentState