diff --git a/BurnOutSharp/ProtectionType/Macrovision.SafeCast.cs b/BurnOutSharp/ProtectionType/Macrovision.SafeCast.cs index b295ba2e..5c18c87a 100644 --- a/BurnOutSharp/ProtectionType/Macrovision.SafeCast.cs +++ b/BurnOutSharp/ProtectionType/Macrovision.SafeCast.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.Linq; using BurnOutSharp.Matching; using BurnOutSharp.Wrappers; @@ -54,24 +55,13 @@ namespace BurnOutSharp.ProtectionType if (sections == null) return null; - // Get the .data/DATA section, if it exists - var dataSectionRaw = pex.GetFirstSectionData(".data") ?? pex.GetFirstSectionData("DATA"); - if (dataSectionRaw != null) + // Get the .data/DATA section strings, if they exist + List strs = pex.GetFirstSectionStrings(".data") ?? pex.GetFirstSectionStrings("DATA"); + if (strs != null) { - var matchers = new List - { - // SOFTWARE\C-Dilla\SafeCast - // Found in "DJMixStation\DJMixStation.exe" in IA item "ejay_nestle_trial". - new ContentMatchSet(new byte?[] { - 0x53, 0x4F, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, - 0x5C, 0x43, 0x2D, 0x44, 0x69, 0x6C, 0x6C, 0x61, - 0x5C, 0x53, 0x61, 0x66, 0x65, 0x43, 0x61, 0x73, - 0x74 }, "SafeCast"), - }; - - string match = MatchUtil.GetFirstMatch(file, dataSectionRaw, matchers, includeDebug); - if (!string.IsNullOrWhiteSpace(match)) - return match; + // Found in "DJMixStation\DJMixStation.exe" in IA item "ejay_nestle_trial". + if (strs.Any(s => s.Contains("SOFTWARE\\C-Dilla\\SafeCast"))) + return "SafeCast"; } string name = pex.FileDescription;