def CalculatePrefetchHashXP(path):
  """Calculates a Windows XP Prefetch hash.

  Args:
    path (str): path to calculate the Prefetch hash of.

  Returns:
    int: Prefetch hash.
  """
  hash_value = 0

  path = path.upper()

  for byte_value in path.encode('utf-16-le'):
    hash_value = ((hash_value * 37) + byte_value) % 0x100000000

  hash_value = (hash_value * 314159269) % 0x100000000

  if hash_value > 0x80000000:
    hash_value = 0x100000000 - hash_value

  return (abs(hash_value) % 1000000007) % 0x100000000