RtlpHpVaMgrRangeSplit

NTSTATUS __stdcall RtlpHpVaMgrRangeSplit(INT64 a1, INT64 a2, INT64 a3){
  INT64 v3; 
  unsigned int v4; 
  unsigned __int64 v5; 

  v3 = a2 + 32 * a3;
  *(_WORD *)(v3 + 24) = *(_WORD *)(a2 + 24) - a3;
  *(_WORD *)(v3 + 26) = a3;
  *(_WORD *)(a2 + 24) = a3;
  v4 = *(unsigned __int16 *)(v3 + 24);
  *(_BYTE *)v3 = *(_BYTE *)v3 & 0xFC | 1;
  v5 = v3 + 32i64 * v4;
  *(_OWORD *)(v3 + 8) = *(_OWORD *)(a2 + 8);
  if( v5 < 32i64 * *(unsigned __int16 *)(a1 + 40) + (a2 & ~(32 * (unsigned __int64)*(unsigned __int16 *)(a1 + 40) - 1)) )
    *(_WORD *)(v5 + 26) = v4;
  return v3;
}

Referenced by:

RtlpHpVaMgrAlloc
RtlpHpVaMgrCtxFree