PopPowerAggregatorSystemTransitionEnterStateHandler

VOID __fastcall PopPowerAggregatorSystemTransitionEnterStateHandler(VOID *a1, UINT64 a2){
  int v2; 
  int v4; 
  _DWORD v5[6]; 
  __int64 v6; 
  v2 = *((_DWORD *)a1 + 18);
  if( (v2 & 0xFFFFFFFC) != 0 || v2 == 1 )
  {
    v4 = *((_DWORD *)a1 + 22);
    if( v4 >= 0 && (v4 <= 2 || v4 == 4) )
    {
      PopReleaseRwLock((UINT64)&PopPowerAggregatorLock);
      if( qword_140C54120 )
        qword_140C54120(1i64);
      PopAcquireRwLockExclusive((_POP_RW_LOCK *)&PopPowerAggregatorLock);
      KeSetEvent((PRKEVENT)((char *)a1 + 280), 0);
      PopPowerAggregatorStartNextSession(3, *((_DWORD *)a1 + 19));
      *((_DWORD *)a1 + 22) = 3;
    }
  }
  else
  {
    v6 = 0i64;
    v5[0] = 5;
    *(_OWORD *)&v5[1] = 0i64;
    v5[5] = 3;
    PopPowerAggregatorSetCurrentState((INT64)a1, (INT64)v5);
  }
}

Referenced by:

No references.