PopDiagTraceFxDevicePowerRequirement

VOID __stdcall PopDiagTraceFxDevicePowerRequirement(PVOID Token, UINT8 NotificationFromPep, UINT8 PowerRequired){
  int v3; 
  INT64 v4; 
  EVENT_DESCRIPTOR *v5; 
  CHAR v6; 
  EVENT_DESCRIPTOR *v7; 
  UINT64 v8; 
  UINT64 UserDataCount; 
  int v10; 
  PVOID v11; 
  EVENT_DATA_DESCRIPTOR UserData; 
  int *v13; 
  int v14; 
  int v15; 
  v3 = PowerRequired;
  v11 = Token;
  v4 = PowerRequired;
  if( NotificationFromPep == 1 )
  {
    v5 = (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_DEVICE_POWER_REQUIREMENT_FROM_PEP;
    v6 = 4;
  }
  else
  {
    v5 = (EVENT_DESCRIPTOR *)POP_ETW_EVENT_DEVICE_POWER_REQUIREMENT_TO_DEVICE;
    v6 = 5;
  }
  PopFxAddLogEntry((INT64)Token, 0, v6, v4);
  if( PopDiagHandleRegistered )
  {
    v8 = PopDiagHandle;
    if( EtwEventEnabled(PopDiagHandle, v5, v7) )
    {
      UserData.Reserved = 0;
      v15 = 0;
      UserData.Ptr = (unsigned __int64)&v11;
      v10 = v3;
      v13 = &v10;
      UserData.Size = 8;
      LODWORD(UserDataCount) = 2;
      v14 = 4;
      EtwWriteEx(v8, v5, 0i64, 1ui64, 0i64, 0i64, UserDataCount, &UserData);
    }
  }
}

Referenced by:

PopFxDeliverDevicePowerRequired
PopFxIdleTimeoutDpcRoutine
PopFxProcessWork
PopFxUpdateDeviceIdleTimer