SabreTools / BinaryObjectScanner

C# protection, packer, and archive scanning library
MIT License
82 stars 13 forks source link

Dark Projet II .mc file cause copy protection scan to hang and fill RAM #302

Open eingrossfilou opened 1 month ago

eingrossfilou commented 1 month ago

When scanning copy protection of a dump of Dark Project II: The Metal Age (or Thief II), MPF 3.18 hangs on the file \BS114002_.mc in archive THIEF2\RES\motions.crf In addition it MPF fills the RAM (It uses tens of GiB)

BS114002_.mc info returns

File format found: BSP

Must be similar to #292

Here the problematic file extracted from THIEF2\RES\motions.crf: BS114002_.zip

Deterous commented 1 month ago

This same behavior was also reported (not via GitHub) to have occured with System Shock II on 3.1.8. Since Thief II is by the same dev / has the same game engine as SS2, it will be the exact same error and file type as #292 but the latest version of SabreTools.Serialization has changed how it reacts to these files.

mnadareski commented 1 month ago

.mc files unfortunately share a first few bytes in common with most BSP files while being nowhere related. This issue did not broadly cause issues, so it was not focused on in the last set of changes that were required to fix much larger problms.

mnadareski commented 1 month ago

Newest BOS rolling release (https://github.com/SabreTools/BinaryObjectScanner/releases/tag/rolling) includes the changes above. Please test when possible.