PopTraceThermalZoneActiveActivity

CHAR __stdcall PopTraceThermalZoneActiveActivity(INT64 a1){
  _DEVICE_OBJECT *v2; 
  _DEVICE_OBJECT *DeviceAttachmentBaseRefWithTag; 
  _DEVICE_OBJECT *v4; 
  _QWORD *DeviceNode; 
  const WCHAR *v6; 
  int v7; 
  int v8; 
  __int16 v10[2]; 
  int v11; 
  __int64 v12; 
  _EVENT_DATA_DESCRIPTOR v13; 
  int *v14; 
  int v15; 
  int v16; 
  __int64 v17; 
  int v18[2]; 
  char v19[16]; 
  int *v20; 
  int v21; 
  int v22; 
  __int16 *v23; 
  int v24; 
  int v25; 
  char *v26; 
  int v27; 
  int v28; 
  __int64 *v29; 
  int v30; 
  int v31; 
  char v32[40]; 

  v11 = 0;
  v2 = *(_DEVICE_OBJECT **)(a1 + 48);
  LOBYTE(v10[0]) = 0;
  DeviceAttachmentBaseRefWithTag = IoGetDeviceAttachmentBaseRefWithTag(v2, 0x67446F50ui64);
  v4 = DeviceAttachmentBaseRefWithTag;
  if( DeviceAttachmentBaseRefWithTag )
    DeviceNode = DeviceAttachmentBaseRefWithTag->DeviceObjectExtension->DeviceNode;
  else
    DeviceNode = 0i64;
  if( DeviceNode )
  {
    LOBYTE(DeviceAttachmentBaseRefWithTag) = PopDiagSnapActiveActivity(a1 + 504, &v11, v10, (__int64)v32);
    if( v11 )
    {
      if( (_BYTE)DeviceAttachmentBaseRefWithTag || PopThermalTelemetryVerbosity )
      {
        DeviceAttachmentBaseRefWithTag = *(_DEVICE_OBJECT **)(a1 + 1048);
        if( *(&stru_140C00F40 + 1194) > 5u )
        {
          LOBYTE(DeviceAttachmentBaseRefWithTag) = tlgKeywordOn((__int64)&stru_140C00F40 + 4776, 0x400000000000i64);
          if( (_BYTE)DeviceAttachmentBaseRefWithTag )
          {
            v16 = 0;
            v18[1] = 0;
            v14 = v18;
            v17 = DeviceNode[17];
            v18[0] = *((unsigned __int16 *)DeviceNode + 64);
            v15 = 2;
            tlgCreate1Sz_wchar_t((__int64)v19, v6);
            v22 = 0;
            v25 = 0;
            v28 = 0;
            v31 = 0;
            v20 = &v11;
            v10[0] = LOBYTE(v10[0]);
            v27 = 4 * LOBYTE(v10[0]);
            v23 = v10;
            v29 = &v12;
            v26 = v32;
            v11 = v7;
            v21 = 4;
            v24 = v8;
            v12 = 0x1000000i64;
            v30 = 8;
            LOBYTE(DeviceAttachmentBaseRefWithTag) = tlgWriteTransfer_EtwWriteTransfer(
                                                       (__int64)&stru_140C00F40 + 4776,
                                                       (unsigned __int8 *)&byte_140027077,
                                                       0i64,
                                                       0i64,
                                                       9u,
                                                       &v13);
          }
        }
      }
    }
  }
  if( v4 )
    LOBYTE(DeviceAttachmentBaseRefWithTag) = ObfDereferenceObjectWithTag(v4, 0x67446F50ui64);
  return(char)DeviceAttachmentBaseRefWithTag;
}

Referenced by:

PopThermalSxEntry
PopThermalTelemetryWorker
PopThermalZoneRemove