VrpAllocateDiffHiveEntry

unsigned __int16 *__fastcall VrpAllocateDiffHiveEntry(unsigned __int16 *a1, const void **a2){
  unsigned __int16 *PoolWithTag; 
  unsigned __int16 *v5; 
  __int64 v6; 
  WCHAR *v7; 
  WCHAR *v8; 
  unsigned int v9; 
  unsigned int v10; 
  WCHAR v12; 
  PoolWithTag = (unsigned __int16 *)ExAllocatePoolWithTag(
                                      PagedPool,
                                      *(unsigned __int16 *)a2 + (unsigned __int64)*a1 + 68,
                                      0x67655256ui64);
  v5 = PoolWithTag;
  if( PoolWithTag )
  {
    memset((INT64)PoolWithTag, 0i64);
    v6 = 314159i64;
    v7 = (WCHAR *)*((_QWORD *)a1 + 1);
    v8 = &v7[(unsigned __int64)*a1 >> 1];
    while( v7 < v8 )
    {
      v12 = RtlUpcaseUnicodeChar(*v7++);
      v6 = HIBYTE(v12) + 37 * ((unsigned __int8)v12 + 37 * v6);
    }
    *((_QWORD *)v5 + 3) = 0i64;
    *((_QWORD *)v5 + 1) = v6;
    *((_QWORD *)v5 + 2) = 1i64;
    KeInitializeWaitChain((_QWORD *)v5 + 6);
    v9 = *a1;
    v5[32] = v9;
    memmove((UINT8 *)v5 + 68, *((UINT8 **)a1 + 1), v9);
    v10 = *(unsigned __int16 *)a2;
    v5[33] = v10;
    memmove((UINT8 *)&v5[((unsigned __int64)v5[32] >> 1) + 34], (UINT8 *)a2[1], v10);
  }
  return v5;
}

Referenced by:

VrpFindOrCreateDiffHiveEntryForMountPoint