PopDiagTraceThermalZoneThrottlePerfTrack

VOID __stdcall PopDiagTraceThermalZoneThrottlePerfTrack(
        UINT64 Temperature,
        UINT64 Throttle,
        DEVICE_OBJECT *DeviceObject){
  DEVICE_OBJECT *DeviceAttachmentBaseRefWithTag; 
  DEVICE_OBJECT *v5; 
  __int64 v6; 
  int v7; 
  __int16 v8; 
  EVENT_DATA_DESCRIPTOR UserData; 
  int *v10; 
  __int64 v11; 
  __int16 *v12; 
  __int64 v13; 
  __int64 v14; 
  int v15; 
  int v16; 
  int v17; 
  int v18; 
  v18 = Throttle;
  v17 = Temperature;
  v8 = 0;
  if( PopDiagHandleRegistered
    && EtwEventEnabled(
         PopDiagHandle,
         (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_THERMAL_PERFTRACK,
         (EVENT_DESCRIPTOR *)DeviceObject) )
  {
    DeviceAttachmentBaseRefWithTag = IoGetDeviceAttachmentBaseRefWithTag(DeviceObject, 0x67446F50ui64);
    v5 = DeviceAttachmentBaseRefWithTag;
    if( DeviceAttachmentBaseRefWithTag )
      v6 = *(_QWORD *)(*((_QWORD *)DeviceAttachmentBaseRefWithTag + 39) + 40i64);
    else
      v6 = 0i64;
    if( v6 )
    {
      v7 = *(_WORD *)(v6 + 128) >> 1;
      UserData.Ptr = (unsigned __int64)&v18;
      v10 = &v17;
      v8 = v7;
      v12 = &v8;
      *(_QWORD *)&UserData.Size = 4i64;
      v11 = 4i64;
      v13 = 2i64;
      v14 = *(_QWORD *)(v6 + 136);
      v15 = 2 * v7;
      v16 = 0;
      EtwWrite(PopDiagHandle, (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_THERMAL_PERFTRACK, 0i64, 4ui64, &UserData);
    }
    if( v5 )
      ObfDereferenceObjectWithTag(v5, 0x67446F50ui64);
  }
}

Referenced by:

PopThermalWorker