From 1860a863b8f5d9a546071887418150901d1ef6bf Mon Sep 17 00:00:00 2001 From: SilasLaspada Date: Thu, 16 Jun 2022 23:13:02 -0600 Subject: [PATCH] Add initial detection of phenoProtect (#120) Add initial detection of phenoProtect, which is currently text file based only. --- BurnOutSharp/FileType/Textfile.cs | 8 ++++++++ BurnOutSharp/ProtectionType/Phenoprotect.cs | 4 +++- README.md | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp/FileType/Textfile.cs b/BurnOutSharp/FileType/Textfile.cs index b0864d7e..74466f56 100644 --- a/BurnOutSharp/FileType/Textfile.cs +++ b/BurnOutSharp/FileType/Textfile.cs @@ -39,6 +39,10 @@ namespace BurnOutSharp.FileType if (magic.StartsWith(new byte?[] { 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1 })) return true; + // InstallShield Compiled Rules + if (magic.StartsWith(new byte?[] { 0x61, 0x4C, 0x75, 0x5A })) + return true; + // Generic textfile (no header) if (string.Equals(extension?.TrimStart('.'), "txt", StringComparison.OrdinalIgnoreCase)) return true; @@ -83,6 +87,10 @@ namespace BurnOutSharp.FileType if (fileContent.Contains("MediaMax technology")) Utilities.AppendToDictionary(protections, file, "MediaMax CD-3"); + // phenoProtect + if (fileContent.Contains("phenoProtect")) + Utilities.AppendToDictionary(protections, file, "phenoProtect"); + // The full line from a sample is as follows: // // The files securom_v7_01.dat and securom_v7_01.bak have been created during the installation of a SecuROM protected application. diff --git a/BurnOutSharp/ProtectionType/Phenoprotect.cs b/BurnOutSharp/ProtectionType/Phenoprotect.cs index 1de32b27..5b5c4fa1 100644 --- a/BurnOutSharp/ProtectionType/Phenoprotect.cs +++ b/BurnOutSharp/ProtectionType/Phenoprotect.cs @@ -2,6 +2,8 @@ { public class Phenoprotect { - // TODO: Implement - https://www.cdmediaworld.com/hardware/cdrom/cd_protections_phenoprotect.shtml + // Currently implemented as a text file check, more checks are likely possible but currently unknown. + // Current checks based off Redump entry 84082 are found in the InstallShield setup.inx file, but the game also checks if the original disc is present in the drive after installation as well, so it seems unlikely for the InstallShield check to be relevant at that stage. + // https://www.cdmediaworld.com/hardware/cdrom/cd_protections_phenoprotect.shtml } } diff --git a/README.md b/README.md index 4007a097..1cf47e45 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Below is a list of protections detected by BurnOutSharp. The two columns explain | MediaCloQ | False | True | Unconfirmed¹ | | MediaMax CD3 | True | True | | | Origin | True | True | | +| phenoProtect | False | False | Text file check only | | ProtectDISC / VOB ProtectCD/DVD | True | False | | | Protect DVD-Video | False | True | Unconfirmed¹ | | PlayStation Anti-modchip | True | False | En/Jp, not "Red Hand"; PSX executables only | @@ -100,7 +101,6 @@ Below is a list of protections that have been identified but have not yet been i - FADE - LockBlocks - MusicGuard -- Phenoprotect - Roxxe - SAFEAUDIO - The Bongle