PoCreateThermalRequest

NTSTATUS __stdcall PoCreateThermalRequest(
        VOID **ThermalRequest,
        _DEVICE_OBJECT *TargetDeviceObject,
        _DEVICE_OBJECT *PolicyDeviceObject,
        _COUNTED_REASON_CONTEXT *Context,
        UINT64 Flags,
        INT64 a6,
        INT64 a7,
        INT64 a8){
  VOID **v8; 
  int v11; 
  VOID **PoolWithTag; 
  int v13; 
  VOID *v14; 
  _DIAGNOSTIC_CONTEXT *Contexta; 

  Contexta = 0i64;
  v8 = 0i64;
  *ThermalRequest = 0i64;
  if( !TargetDeviceObject || !PolicyDeviceObject || !Context )
  {
    v11 = -1073741811;
LABEL_8:
    if( v11 >= 0 )
      return v11;
    goto LABEL_11;
  }
  v11 = PoCaptureReasonContext(Context, 0, PolicyDeviceObject, 1u, 0i64, &Contexta);
  if( v11 >= 0 )
  {
    PoolWithTag = ExAllocatePoolWithTag(1ui64, 0x240ui64, 1819231056i64);
    v8 = PoolWithTag;
    if( PoolWithTag )
    {
      memset(PoolWithTag, 0i64, 0x240u);
      v13 = Flags;
      v8[3] = Contexta;
      *((_BYTE *)v8 + 16) = 100;
      v14 = *(VOID **)&KUSER_SHARED_DATA.InterruptTime.LowPart;
      v8[6] = *(VOID **)&KUSER_SHARED_DATA.InterruptTime.LowPart;
      v8[7] = v14;
      v11 = PopAssociateThermalRequest((POP_COOLING_REQUEST *)v8, TargetDeviceObject, v13 >= 0);
      if( v11 >= 0 )
      {
        *ThermalRequest = v8;
        goto LABEL_8;
      }
    }
    else
    {
      v11 = -1073741670;
    }
  }
LABEL_11:
  if( Contexta )
    PoDestroyReasonContext(Contexta);
  if( v8 )
    ExFreePoolWithTag(v8, 0x6C6F4350u);
  return v11;
}

Referenced by:

No references.