PopTraceThermalZonePassiveHistogram

VOID __stdcall PopTraceThermalZonePassiveHistogram(_POP_THERMAL_ZONE *ThermalZone){
  _DEVICE_OBJECT *DeviceAttachmentBaseRefWithTag; 
  _DEVICE_OBJECT *v3; 
  _QWORD *DeviceNode; 
  char v5; 
  const WCHAR *v6; 
  _EVENT_DATA_DESCRIPTOR v7; 
  _DWORD *v8; 
  __int64 v9; 
  __int64 v10; 
  _DWORD v11[2]; 
  char v12[16]; 
  UINT64 *v13; 
  int v14; 
  int v15; 
  _BYTE *v16; 
  int v17; 
  int v18; 
  UINT64 TimeBuckets[12]; 

  DeviceAttachmentBaseRefWithTag = IoGetDeviceAttachmentBaseRefWithTag(
                                     *((_DEVICE_OBJECT **)ThermalZone + 6),
                                     0x67446F50ui64);
  v3 = DeviceAttachmentBaseRefWithTag;
  if( DeviceAttachmentBaseRefWithTag )
    DeviceNode = DeviceAttachmentBaseRefWithTag->DeviceObjectExtension->DeviceNode;
  else
    DeviceNode = 0i64;
  if( DeviceNode )
  {
    PopDiagSnapPassiveHistogram((_POP_THERMAL_TELEMETRY_TRACKER *)((char *)ThermalZone + 504), TimeBuckets);
    if( (v5 || PopThermalTelemetryVerbosity)
      && *(&stru_140C00F40 + 1194) > 5u
      && tlgKeywordOn((__int64)&stru_140C00F40 + 4776, 0x400000000000i64) )
    {
      v11[1] = 0;
      v8 = v11;
      v10 = DeviceNode[17];
      v11[0] = *((unsigned __int16 *)DeviceNode + 64);
      v9 = 2i64;
      tlgCreate1Sz_wchar_t((__int64)v12, v6);
      v15 = 0;
      v18 = 0;
      v16 = PopThermalTrackingThresholds;
      v13 = TimeBuckets;
      v14 = 84;
      v17 = 21;
      tlgWriteTransfer_EtwWriteTransfer(
        (__int64)&stru_140C00F40 + 4776,
        (unsigned __int8 *)&byte_1400271CF,
        0i64,
        0i64,
        7u,
        &v7);
    }
  }
  if( v3 )
    ObfDereferenceObjectWithTag(v3, 0x67446F50ui64);
}

Referenced by:

PopThermalSxEntry
PopThermalTelemetryWorker
PopThermalZoneRemove