def ParseFileObject(self, parser_mediator, file_object):
    """Parses a Windows Registry file-like object.

    Args:
      parser_mediator (ParserMediator): parser mediator.
      file_object (dfvfs.FileIO): a file-like object.
    """
    win_registry_reader = FileObjectWinRegistryFileReader()

    try:
      registry_file = win_registry_reader.Open(file_object)
    except IOError as exception:
      parser_mediator.ProduceExtractionWarning(
          'unable to open Windows Registry file with error: {0!s}'.format(
              exception))
      return

    win_registry = dfwinreg_registry.WinRegistry()

    key_path_prefix = win_registry.GetRegistryFileMapping(registry_file)
    registry_file.SetKeyPathPrefix(key_path_prefix)
    root_key = registry_file.GetRootKey()
    if not root_key:
      return

    registry_find_specs = getattr(
        parser_mediator.artifacts_filter_helper, 'registry_find_specs', None)

    if not registry_find_specs:
      try:
        self._ParseRecurseKeys(parser_mediator, root_key)
      except IOError as exception:
        parser_mediator.ProduceExtractionWarning('{0!s}'.format(exception))

    else:
      artifacts_filter_helper = artifact_filters.ArtifactDefinitionsFilterHelper
      if not artifacts_filter_helper.CheckKeyCompatibility(key_path_prefix):
        logger.warning((
            'Artifacts filters are not supported for Windows Registry file '
            'with key path prefix: "{0:s}".').format(key_path_prefix))

      else:
        try:
          win_registry.MapFile(key_path_prefix, registry_file)
          self._ParseKeysFromFindSpecs(
              parser_mediator, win_registry, registry_find_specs)
        except IOError as exception:
          parser_mediator.ProduceExtractionWarning('{0!s}'.format(exception))
Parses a Windows Registry file-like object.

    Args:
      parser_mediator (ParserMediator): parser mediator.
      file_object (dfvfs.FileIO): a file-like object.