PopThermalZoneAdd
VOID __stdcall PopThermalZoneAdd(_POP_POLICY_DEVICE *PolicyDevice){
wchar_t **p_Buffer;
_IRP *Irp;
_LIST_ENTRY *v4;
INT64 v5;
int v6;
p_Buffer = &PolicyDevice[4].Name.Buffer;
if( *(&stru_140C23628 + 579) )
{
v6 = 262152;
LODWORD(v5) = 2;
KeInitializeIRTimer((INT64)p_Buffer, (INT64)PopThermalZoneTimerCallback, (INT64)PolicyDevice, (UINT8 *)&v6, v5);
}
else
{
KeInitializeTimer2((INT64)p_Buffer, (INT64)PopThermalZoneTimerCallback, (INT64)PolicyDevice, 0i64);
}
Irp = PolicyDevice->Irp;
*(_WORD *)((char *)&PolicyDevice[1].Link.Flink + 5) = -1;
PolicyDevice[1].DeviceType = 100;
*((_DWORD *)&PolicyDevice[1].DeviceType + 1) = 100;
LOBYTE(PolicyDevice[1].Link.Flink) = 6;
BYTE3(PolicyDevice[1].Link.Flink) = 2;
HIDWORD(PolicyDevice[1].Link.Blink) = 1000;
Irp->IoStatus.Status = -1073741667;
LODWORD(Irp) = PopThermalZoneNextId;
LODWORD(PolicyDevice[7].Device) = PopThermalZoneNextId;
LODWORD(PolicyDevice[3].Notification) = 100;
PopThermalZoneNextId = (_DWORD)Irp + 1;
KeInitializeEvent((INT64)&PolicyDevice[7], 0, 0);
KeInitializeEvent((INT64)&PolicyDevice[7].Notification, 0, 0);
PolicyDevice[4].Link.Blink = 0i64;
PolicyDevice[4].Notification = PopThermalWorker;
*(_QWORD *)&PolicyDevice[4].Name.Length = PolicyDevice;
v4 = *(_LIST_ENTRY **)&KUSER_SHARED_DATA.InterruptTime.LowPart;
PolicyDevice[8].Link.Flink = *(_LIST_ENTRY **)&KUSER_SHARED_DATA.InterruptTime.LowPart;
PolicyDevice[8].Link.Blink = v4;
PolicyDevice[6].Irp = 0i64;
LODWORD(v4) = PopThermalZoneCount;
PolicyDevice[6].Device = 0i64;
PopThermalZoneCount = (_DWORD)v4 + 1;
if( !(_DWORD)v4 )
{
PopAcquirePolicyLock();
if( *(&stru_140C23628 + 2085) != 1 )
{
*(&stru_140C23628 + 2085) = 1;
PopResetCurrentPolicies();
}
PopReleasePolicyLock();
}
PopThermalUpdateTelemetryClientCount(1u);
ExQueueWorkItem((PWORK_QUEUE_ITEM)&PolicyDevice[4].Link.Blink, DelayedWorkQueue);
}Referenced by:
No references.