RtlpHpVaMgrCtxAlloc

NTSTATUS __fastcall RtlpHpVaMgrCtxAlloc(INT64 a1, INT64 a2, INT64 a3, UINT64 *a4){
  __int64 v4; 
  void *v7; 
  volatile LONG *v9; 
  unsigned __int64 v10; 
  v4 = *(unsigned int *)a4;
  if( (_DWORD)v4 == -1 )
  {
    v9 = (volatile LONG *)(a1 + 2144);
    v10 = ExAcquireSpinLockShared((PEX_SPIN_LOCK)(a1 + 2144));
    v7 = (void *)RtlpHpVaMgrCtxAllocatorFind(a1, (INT64)a4, 0i64, 0i64);
    ExReleaseSpinLockSharedFromDpcLevel(v9);
    __writecr8(v10);
  }
  else
  {
    v7 = (void *)(a1 + 48 * (v4 + 45));
  }
  return RtlpHpVaMgrAlloc(v7);
}

Referenced by:

RtlpHpAllocVA