From 84a65e998f54451bc7817d2dd26671819ca84d38 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 9 Dec 2022 21:37:33 -0800 Subject: [PATCH] Partially convert ActiveMARK to string finding --- BurnOutSharp/ProtectionType/ActiveMARK.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/BurnOutSharp/ProtectionType/ActiveMARK.cs b/BurnOutSharp/ProtectionType/ActiveMARK.cs index 7b98f505..b9122ac9 100644 --- a/BurnOutSharp/ProtectionType/ActiveMARK.cs +++ b/BurnOutSharp/ProtectionType/ActiveMARK.cs @@ -68,19 +68,12 @@ namespace BurnOutSharp.ProtectionType return match; } - // Get the last .bss section, if it exists - var bssSectionRaw = pex.GetLastSectionData(".bss"); - if (bssSectionRaw != null) + // Get the last .bss section strings, if they exist + List strs = pex.GetLastSectionStrings(".bss"); + if (strs != null) { - var matchers = new List - { - // TMSAMVOF - new ContentMatchSet(new byte?[] { 0x54, 0x4D, 0x53, 0x41, 0x4D, 0x56, 0x4F, 0x46 }, "ActiveMARK"), - }; - - string match = MatchUtil.GetFirstMatch(file, bssSectionRaw, matchers, includeDebug); - if (!string.IsNullOrWhiteSpace(match)) - return match; + if (strs.Any(s => s.Contains("TMSAMVOF"))) + return "ActiveMARK"; } return null;