RtlpGetChainHead

_LIST_ENTRY *__stdcall RtlpGetChainHead(_RTL_DYNAMIC_HASH_TABLE *HashTable, UINT64 BucketIndex){
  _QWORD *Directory; 
  unsigned int v4; 

  Directory = HashTable->Directory;
  if( HashTable->TableSize > 0x80 )
  {
    _BitScanReverse(&v4, BucketIndex + 128);
    LODWORD(BucketIndex) = (BucketIndex + 128) ^ (1 << v4);
    Directory = (_QWORD *)Directory[v4 - 7];
  }
  return(_LIST_ENTRY *)&Directory[2 * (unsigned int)BucketIndex];
}

Referenced by:

RtlExpandHashTable
RtlpPopulateContext