PopTraceThermalRequestActiveActivity

VOID __stdcall PopTraceThermalRequestActiveActivity(INT64 a1){
  __int64 v2; 
  VOID **v3; 
  _DEVICE_OBJECT *DeviceAttachmentBaseRefWithTag; 
  UINT8 v5; 
  _DEVICE_OBJECT *v6; 
  _QWORD *DeviceNode; 
  VOID **PoolWithTag; 
  UINT8 v9; 
  const WCHAR *v10; 
  char active; 
  int v12; 
  int v13; 
  char v14; 
  UINT64 BufferSizePointer; 
  __int64 v16; 
  _EVENT_DATA_DESCRIPTOR v17; 
  int *v18; 
  int v19; 
  int v20; 
  __int64 v21; 
  int v22[2]; 
  char v23[16]; 
  int *v24; 
  int v25; 
  int v26; 
  UINT64 *p_BufferSizePointer; 
  int v28; 
  int v29; 
  __int64 *v30; 
  int v31; 
  int v32; 
  int v33[10]; 

  BufferSizePointer = 0i64;
  v2 = *(_QWORD *)(a1 + 32);
  v13 = 0;
  v3 = 0i64;
  DeviceAttachmentBaseRefWithTag = IoGetDeviceAttachmentBaseRefWithTag(*(_DEVICE_OBJECT **)(v2 + 48), 0x67446F50ui64);
  v6 = DeviceAttachmentBaseRefWithTag;
  if( DeviceAttachmentBaseRefWithTag )
    DeviceNode = DeviceAttachmentBaseRefWithTag->DeviceObjectExtension->DeviceNode;
  else
    DeviceNode = 0i64;
  if( DeviceNode )
  {
    PoStoreDiagnosticContext(*(_DIAGNOSTIC_CONTEXT **)(a1 + 24), 0i64, &BufferSizePointer, v5);
    PoolWithTag = ExAllocatePoolWithTag(1ui64, BufferSizePointer, 1346721364i64);
    v3 = PoolWithTag;
    if( PoolWithTag )
    {
      if( PoStoreDiagnosticContext(
             *(_DIAGNOSTIC_CONTEXT **)(a1 + 24),
             (_DIAGNOSTIC_BUFFER *)PoolWithTag,
             &BufferSizePointer,
             v9) >= 0 )
      {
        v10 = (const WCHAR *)((char *)v3[2] + (_QWORD)v3);
        active = PopDiagSnapActiveActivity(a1 + 40, &v13, &v14, (__int64)v33);
        if( v13 )
        {
          if( (active || PopThermalTelemetryVerbosity)
            && *(&stru_140C00F40 + 1194) > 5u
            && tlgKeywordOn((__int64)&stru_140C00F40 + 4776, 0x400000000000i64) )
          {
            v20 = 0;
            v22[1] = 0;
            v18 = v22;
            v21 = DeviceNode[17];
            v22[0] = *((unsigned __int16 *)DeviceNode + 64);
            v19 = 2;
            tlgCreate1Sz_wchar_t((__int64)v23, v10);
            v26 = 0;
            v29 = 0;
            v32 = 0;
            v24 = &v13;
            LODWORD(BufferSizePointer) = v33[0];
            p_BufferSizePointer = &BufferSizePointer;
            v25 = 4;
            v30 = &v16;
            v28 = 4;
            v31 = 8;
            v13 = v12;
            v16 = 0x1000000i64;
            tlgWriteTransfer_EtwWriteTransfer(
              (__int64)&stru_140C00F40 + 4776,
              (unsigned __int8 *)byte_140026F7D,
              0i64,
              0i64,
              8u,
              &v17);
          }
        }
      }
    }
  }
  if( v6 )
    ObfDereferenceObjectWithTag(v6, 0x67446F50ui64);
  if( v3 )
    ExFreePoolWithTag(v3, 0x50455654u);
}

Referenced by:

PopCoolingSxTransition
PopCoolingTelemetryWorker
PopDeactiveThermalRequest
PopOrphanCoolingExtension