PopDiagTracePassiveCooling
char __fastcall PopDiagTracePassiveCooling(__int64 a1, __int64 a2, EVENT_DESCRIPTOR *a3, int a4, unsigned int a5){
DEVICE_OBJECT *DeviceAttachmentBaseRefWithTag;
char v6;
bool v9;
DEVICE_OBJECT *v10;
__int64 v11;
unsigned int v12;
unsigned int v13;
EVENT_DESCRIPTOR *v14;
int v16;
int v17;
__int64 v18;
union _LARGE_INTEGER LocalTime;
union _LARGE_INTEGER SystemTime;
EVENT_DATA_DESCRIPTOR UserData;
__int64 v22;
__int64 v23;
union _LARGE_INTEGER *p_LocalTime;
__int64 v25;
int *v26;
__int64 v27;
__int64 *v28;
__int64 v29;
__int64 v30;
__int64 v31;
__int64 v32;
__int64 v33;
__int64 v34;
__int64 v35;
__int64 v36;
__int64 v37;
int *v38;
__int64 v39;
__int64 v40;
__int64 v41;
void *retaddr;
int v43;
DeviceAttachmentBaseRefWithTag = (DEVICE_OBJECT *)&retaddr;
v43 = a4;
v6 = (char)a3;
LOWORD(v16) = 0;
LocalTime.QuadPart = 0i64;
v18 = 0i64;
LOWORD(v17) = 0;
if( PopDiagHandleRegistered )
{
if( a5
|| (LOBYTE(DeviceAttachmentBaseRefWithTag) = EtwEventEnabled(
PopDiagHandle,
(EVENT_DESCRIPTOR *)&POP_ETW_EVENT_PASSIVE_COOLING_DIAGNOSTIC,
a3),
(_BYTE)DeviceAttachmentBaseRefWithTag) )
{
v9 = a5 <= 1;
if( a5 == 1 )
{
LOBYTE(DeviceAttachmentBaseRefWithTag) = EtwEventEnabled(
PopDiagHandle,
(EVENT_DESCRIPTOR *)&POP_ETW_EVENT_PASSIVE_COOLING_OPERATIONAL,
a3);
if( !(_BYTE)DeviceAttachmentBaseRefWithTag )
return(char)DeviceAttachmentBaseRefWithTag;
v9 = a5 <= 1;
}
if( v9 )
{
DeviceAttachmentBaseRefWithTag = IoGetDeviceAttachmentBaseRefWithTag((DEVICE_OBJECT *)a2, 0x67446F50ui64);
v10 = DeviceAttachmentBaseRefWithTag;
if( DeviceAttachmentBaseRefWithTag )
v11 = *(_QWORD *)(*((_QWORD *)DeviceAttachmentBaseRefWithTag + 39) + 40i64);
else
v11 = 0i64;
if( v11 )
{
LOWORD(v16) = *(_WORD *)(v11 + 128) >> 1;
UserData.Ptr = (unsigned __int64)&v16;
*(_QWORD *)&UserData.Size = 2i64;
v22 = *(_QWORD *)(v11 + 136);
v23 = 2 * (unsigned int)(unsigned __int16)v16;
SystemTime = *(union _LARGE_INTEGER *)&KUSER_SHARED_DATA.SystemTime.LowPart;
ExSystemTimeToLocalTime(&SystemTime, &LocalTime);
v25 = 8i64;
p_LocalTime = &LocalTime;
v28 = &v18;
v27 = 2i64;
v29 = 4i64;
v31 = 4i64;
LOWORD(v17) = v6 != 0;
v26 = &v17;
v12 = *(_DWORD *)(a1 + 20);
v33 = 4i64;
LODWORD(v18) = v12 / 0xA;
v13 = *(_DWORD *)(a1 + 16);
v35 = 4i64;
v30 = (__int64)&v18 + 4;
v32 = a1 + 4;
v34 = a1 + 8;
v36 = a1 + 12;
v38 = &v43;
v40 = a1 + 80;
HIDWORD(v18) = v13 / 0xA;
v14 = (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_PASSIVE_COOLING_DIAGNOSTIC;
v37 = 4i64;
v39 = 4i64;
v41 = 4i64;
if( a5 )
v14 = (EVENT_DESCRIPTOR *)&POP_ETW_EVENT_PASSIVE_COOLING_OPERATIONAL;
LOBYTE(DeviceAttachmentBaseRefWithTag) = EtwWrite(PopDiagHandle, v14, 0i64, 0xBui64, &UserData);
}
if( v10 )
LOBYTE(DeviceAttachmentBaseRefWithTag) = ObfDereferenceObjectWithTag(v10, 0x67446F50ui64);
}
}
}
return(char)DeviceAttachmentBaseRefWithTag;
}Referenced by:
PopThermalWorker