PopDiagTraceCoolingExtension

VOID __stdcall PopDiagTraceCoolingExtension(
        _POP_COOLING_EXTENSION *CoolingExtension,
        _EVENT_DESCRIPTOR *EventDescriptor){
  EVENT_DESCRIPTOR *v2; 
  DEVICE_OBJECT *DeviceAttachmentBaseRefWithTag; 
  DEVICE_OBJECT *v6; 
  __int64 v7; 
  bool v8; 
  BOOL v9; 
  BOOL v10; 
  int v11; 
  unsigned __int8 ThrottleLimit; 
  __int16 v13; 
  BOOL v14; 
  BOOL v15; 
  BOOL v16; 
  _POP_COOLING_EXTENSION *v17; 
  EVENT_DATA_DESCRIPTOR UserData; 
  int *v19; 
  __int64 v20; 
  unsigned __int8 *p_ThrottleLimit; 
  __int64 v22; 
  BOOL *v23; 
  __int64 v24; 
  _POP_COOLING_EXTENSION **v25; 
  __int64 v26; 
  __int16 *v27; 
  __int64 v28; 
  __int64 v29; 
  int v30; 
  int v31; 
  v16 = 0;
  v15 = 0;
  v13 = 0;
  v14 = 0;
  ThrottleLimit = 0;
  v17 = 0i64;
  if( PopDiagHandleRegistered && EtwEventEnabled(PopDiagHandle, EventDescriptor, v2) )
  {
    DeviceAttachmentBaseRefWithTag = IoGetDeviceAttachmentBaseRefWithTag(CoolingExtension->DeviceObject, 0x67446F50ui64);
    v6 = DeviceAttachmentBaseRefWithTag;
    if( DeviceAttachmentBaseRefWithTag )
      v7 = *(_QWORD *)(*((_QWORD *)DeviceAttachmentBaseRefWithTag + 39) + 40i64);
    else
      v7 = 0i64;
    if( v7 )
    {
      v8 = CoolingExtension->Interface.ActiveCooling == 0i64;
      v13 = *(_WORD *)(v7 + 128) >> 1;
      v9 = !v8;
      v17 = CoolingExtension;
      v8 = CoolingExtension->Interface.PassiveCooling == 0i64;
      v15 = v9;
      v10 = !v8;
      *(_QWORD *)&UserData.Size = 4i64;
      v8 = CoolingExtension->ActiveEngaged == 0;
      v14 = v10;
      v20 = 4i64;
      v16 = !v8;
      ThrottleLimit = CoolingExtension->ThrottleLimit;
      UserData.Ptr = (unsigned __int64)&v14;
      v19 = &v15;
      p_ThrottleLimit = &ThrottleLimit;
      v23 = &v16;
      v25 = &v17;
      v27 = &v13;
      v22 = 1i64;
      v24 = 4i64;
      v26 = 8i64;
      v28 = 2i64;
      v11 = *(unsigned __int16 *)(v7 + 128);
      v29 = *(_QWORD *)(v7 + 136);
      v30 = v11;
      v31 = 0;
      EtwWrite(PopDiagHandle, EventDescriptor, 0i64, 7ui64, &UserData);
    }
    if( v6 )
      ObfDereferenceObjectWithTag(v6, 0x67446F50ui64);
  }
}

Referenced by:

PopAssociateThermalRequest
PopCoolingExtensionPnpNotification
PopDeactiveThermalRequest
PopDisableCoolingExtension
PopRundownThermalRequests