RtlpHpVaMgrRegionAllocate

UINT8 *__fastcall RtlpHpVaMgrRegionAllocate(INT64 a1){
  __int16 v2; 
  UINT8 *v3; 
  UINT64 v4; 
  UINT8 *v5; 
  INT64 v7[2]; 
  __int128 v8; 
  UINT64 v9; 
  INT64 v10; 
  v10 = (unsigned __int64)*(unsigned __int16 *)(a1 + 40) << 20;
  v9 = RtlpHpVaMgrAllocAligned(a1, &v10, v10);
  if( !v9 )
    return 0i64;
  v2 = *(_WORD *)(a1 + 40);
  v8 = 0i64;
  WORD4(v8) = v2;
  *(_OWORD *)v7 = 0i64;
  v3 = RtlpHpVaMgrRangeCreate(a1, v9, (INT64)v7);
  v4 = v9;
  v5 = v3;
  if( v3 )
    v4 = 0i64;
  v9 = v4;
  if( v4 )
    RtlpHpEnvFreeVA(&v9, (UINT64 *)&v10, 0x8000i64);
  return v5;
}

Referenced by:

RtlpHpVaMgrAlloc