RtlpHpLfhBucketAllocate

NTSTATUS __stdcall RtlpHpLfhBucketAllocate(UINT64 a1, INT64 a2, UINT64 a3, UINT64 a4){
  unsigned __int64 v5; 
  unsigned __int8 v6; 
  UINT64 v8; 
  __int64 v9; 

  v9 = ((((unsigned int)RtlpHpLfhPerfFlags >> 10) & 1) + 2i64) << 6;
  v5 = *(unsigned __int8 *)(a1 + 56) - (unsigned __int64)((*(_BYTE *)(a1 + 56) - 1) & 7) + v9 + 7;
  if( *(_BYTE *)(a2 + 2) == 1 )
    v6 = 0;
  else
    v6 = *(_BYTE *)(v9 + BYTE5(KeGetCurrentThread()[1].Ucb) + a2);
  LODWORD(v8) = a4;
  return RtlpHpLfhSlotAllocate(a1, a2, *(_QWORD *)(v5 + 8i64 * v6 + a2), (unsigned int)a3, v8);
}

Referenced by:

RtlpHpLfhContextAllocate