PoCreateThermalRequest
INT64 __stdcall PoCreateThermalRequest(
PVOID *ThermalRequest,
DEVICE_OBJECT *TargetDeviceObject,
DEVICE_OBJECT *PolicyDeviceObject,
COUNTED_REASON_CONTEXT *Context,
UINT64 Flags){
INT64 v5;
int v8;
VOID *PoolWithTag;
int v10;
__int64 v11;
PVOID P;
P = 0i64;
v5 = 0i64;
*ThermalRequest = 0i64;
if( !TargetDeviceObject || !PolicyDeviceObject || !Context )
{
v8 = -1073741811;
LABEL_8:
if( v8 >= 0 )
return(unsigned int)v8;
goto LABEL_11;
}
v8 = PoCaptureReasonContext((UINT64)Context, 0, PolicyDeviceObject, 1, 0i64, (INT64 *)&P);
if( v8 >= 0 )
{
PoolWithTag = ExAllocatePoolWithTag(PagedPool, 0x240ui64, 0x6C6F4350ui64);
v5 = (INT64)PoolWithTag;
if( PoolWithTag )
{
memset((INT64)PoolWithTag, 0i64);
v10 = Flags;
*(_QWORD *)(v5 + 24) = P;
*(_BYTE *)(v5 + 16) = 100;
v11 = *(_QWORD *)&KUSER_SHARED_DATA.InterruptTime.LowPart;
*(_QWORD *)(v5 + 48) = *(_QWORD *)&KUSER_SHARED_DATA.InterruptTime.LowPart;
*(_QWORD *)(v5 + 56) = v11;
v8 = PopAssociateThermalRequest(v5, (INT64)TargetDeviceObject, v10 >= 0);
if( v8 >= 0 )
{
*ThermalRequest = (PVOID)v5;
goto LABEL_8;
}
}
else
{
v8 = -1073741670;
}
}
LABEL_11:
if( P )
PoDestroyReasonContext(P);
if( v5 )
ExFreePoolWithTag((PVOID)v5, 0x6C6F4350u);
return(unsigned int)v8;
}Referenced by:
No references.