PopTraceSystemIdleUpdate

VOID __stdcall PopTraceSystemIdleUpdate(
        UINT64 AccumulatedIdleTime,
        UINT8 SystemIdle,
        UINT8 SystemRequired,
        UINT8 ExtendSystemRequired,
        UINT8 HibernateEnabled,
        UINT64 DozeS4Timeout,
        UINT8 S0LowPowerIdleAction,
        UINT8 S0LowPowerDozeTimerArmed,
        POWER_ACTION Action,
        _SYSTEM_POWER_STATE MinState){
  int v12; 
  UINT64 v13; 
  bool v14; 
  int v15; 
  int v16; 
  int v17; 
  int v18; 
  int v19; 
  EVENT_DATA_DESCRIPTOR UserData; 
  int *v21; 
  int v22; 
  int v23; 
  int *v24; 
  int v25; 
  int v26; 
  char *v27; 
  int v28; 
  int v29; 
  char *v30; 
  int v31; 
  int v32; 
  UINT8 *p_S0LowPowerDozeTimerArmed; 
  int v34; 
  int v35; 
  __int64 *v36; 
  int v37; 
  int v38; 
  int v39; 
  char v40; 
  char v41; 
  v39 = AccumulatedIdleTime;
  v12 = SystemIdle;
  if( PopDiagHandleRegistered )
  {
    v13 = PopDiagHandle;
    if( EtwEventEnabled(
           PopDiagHandle,
           (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_SYSTEM_IDLE_UPDATE,
           (EVENT_DESCRIPTOR *)SystemRequired) )
    {
      v18 = v12;
      v37 = 8;
      UserData.Size = 4;
      v22 = 4;
      v25 = 4;
      v28 = 4;
      v31 = 4;
      v34 = 4;
      v14 = S0LowPowerIdleAction != 0;
      S0LowPowerIdleAction = -S0LowPowerIdleAction;
      v15 = (ExtendSystemRequired != 0 ? 2 : 0) | (v14 ? 0x40 : 0) | (SystemRequired != 0) | (PopUserShutdownInProgress != 0 ? 4 : 0);
      v14 = (_BYTE)DozeS4Timeout != 0;
      LOBYTE(DozeS4Timeout) = -(char)DozeS4Timeout;
      v16 = (v14 ? 8 : 0) | v15;
      v14 = (_BYTE)MinState != PowerSystemUnspecified;
      LOBYTE(MinState) = -(char)MinState;
      v17 = (v14 ? 0x20 : 0) | v16;
      v14 = (_BYTE)Action != PowerActionNone;
      LOBYTE(Action) = -(char)Action;
      UserData.Reserved = 0;
      v23 = 0;
      v26 = 0;
      v29 = 0;
      v32 = 0;
      v35 = 0;
      v38 = 0;
      UserData.Ptr = (unsigned __int64)&v39;
      v21 = &v18;
      v24 = &v19;
      v27 = &v40;
      v30 = &v41;
      p_S0LowPowerDozeTimerArmed = &S0LowPowerDozeTimerArmed;
      v36 = &qword_140C231C8;
      v19 = (v14 ? 0x10 : 0) | v17;
      EtwWrite(v13, (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_SYSTEM_IDLE_UPDATE, 0i64, 7ui64, &UserData);
    }
  }
}

Referenced by:

PopPolicySystemIdle