From 42faeb1402555559271790216363a8514a319dd6 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 9 Dec 2022 13:41:09 -0800 Subject: [PATCH] Convert CDSHiELD SE to string finding --- BurnOutSharp/ProtectionType/CDSHiELDSE.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/BurnOutSharp/ProtectionType/CDSHiELDSE.cs b/BurnOutSharp/ProtectionType/CDSHiELDSE.cs index 7300c082..afe0f1bc 100644 --- a/BurnOutSharp/ProtectionType/CDSHiELDSE.cs +++ b/BurnOutSharp/ProtectionType/CDSHiELDSE.cs @@ -25,19 +25,12 @@ namespace BurnOutSharp.ProtectionType // return "CDSHiELD SE"; //} - // Get the code/CODE section, if it exists - var codeSectionRaw = pex.GetFirstSectionData("code") ?? pex.GetFirstSectionData("CODE"); - if (codeSectionRaw != null) + // Get the code/CODE section strings, if they exist + List strs = pex.GetFirstSectionStrings("code") ?? pex.GetFirstSectionStrings("CODE"); + if (strs != null) { - var matchers = new List - { - // ~0017.tmp - new ContentMatchSet(new byte?[] { 0x7E, 0x30, 0x30, 0x31, 0x37, 0x2E, 0x74, 0x6D, 0x70 }, "CDSHiELD SE"), - }; - - string match = MatchUtil.GetFirstMatch(file, codeSectionRaw, matchers, includeDebug); - if (!string.IsNullOrWhiteSpace(match)) - return match; + if (strs.Any(s => s.Contains("~0017.tmp"))) + return "CDSHiELD SE"; } return null;