PopDiagTraceThermalCoolingMode
VOID __stdcall PopDiagTraceThermalCoolingMode(_DEVICE_OBJECT *DeviceObject, UINT16 CoolingMode){
EVENT_DESCRIPTOR *v2;
DEVICE_OBJECT *DeviceAttachmentBaseRefWithTag;
WCHAR v6;
DEVICE_OBJECT *v7;
__int64 v8;
__int64 v9;
const WCHAR *v10;
unsigned __int16 v11;
__int16 v12;
struct _UNICODE_STRING DestinationString;
EVENT_DATA_DESCRIPTOR UserData;
__int64 v15;
int v16;
int v17;
__int16 *v18;
__int64 v19;
wchar_t *Buffer;
int v21;
int v22;
v12 = 0;
DestinationString = 0i64;
v11 = 0;
if( PopDiagHandleRegistered && EtwEventEnabled(PopDiagHandle, (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_COOLING_MODE, v2) )
{
DeviceAttachmentBaseRefWithTag = IoGetDeviceAttachmentBaseRefWithTag(DeviceObject, 0x67446F50ui64);
v7 = DeviceAttachmentBaseRefWithTag;
if( DeviceAttachmentBaseRefWithTag )
v8 = *(_QWORD *)(*((_QWORD *)DeviceAttachmentBaseRefWithTag + 39) + 40i64);
else
v8 = 0i64;
if( v8 )
{
v11 = *(_WORD *)(v8 + 128) >> 1;
UserData.Ptr = (unsigned __int64)&v11;
*(_QWORD *)&UserData.Size = 2i64;
v9 = *(_QWORD *)(v8 + 136);
v10 = L"active";
v16 = 2 * v11;
v15 = v9;
v17 = 0;
if( CoolingMode )
v10 = L"passive";
RtlInitUnicodeString(&DestinationString, v10, v6);
v12 = DestinationString.Length >> 1;
v18 = &v12;
Buffer = DestinationString.Buffer;
v21 = 2 * (DestinationString.Length >> 1);
v19 = 2i64;
v22 = 0;
EtwWrite(PopDiagHandle, (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_COOLING_MODE, 0i64, 4ui64, &UserData);
}
if( v7 )
ObfDereferenceObjectWithTag(v7, 0x67446F50ui64);
}
}Referenced by:
PopThermalWorker