From dbf1f6dcca0bc0e6dc2d795203087df90fcd5334 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 19 Dec 2022 23:53:52 -0800 Subject: [PATCH] Integrate changes from TheRogueArchivist --- BurnOutSharp/ProtectionType/ByteShield.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/BurnOutSharp/ProtectionType/ByteShield.cs b/BurnOutSharp/ProtectionType/ByteShield.cs index 5f6b138a..49abf64b 100644 --- a/BurnOutSharp/ProtectionType/ByteShield.cs +++ b/BurnOutSharp/ProtectionType/ByteShield.cs @@ -15,6 +15,7 @@ namespace BurnOutSharp.ProtectionType /// Patent relating to ByteShield: https://patentimages.storage.googleapis.com/ed/76/c7/d98a56aeeca2e9/US7716474.pdf and https://patents.google.com/patent/US20100212028. /// /// Games known to use it: + /// Line Rider 2: Unbound (https://fileforums.com/showthread.php?t=86909). /// Football Manager 2011 (https://community.sigames.com/forums/topic/189163-for-those-of-you-struggling-with-byteshield-activation-issues/). /// /// Publishers known to use it: @@ -119,9 +120,10 @@ namespace BurnOutSharp.ProtectionType strings = pex.GetFirstSectionStrings(".ret"); if (strings != null && strings.Any()) { + // TODO: Figure out if this specifically indicates if the file is encrypted // Found in "LineRider2.bbz" in Redump entry 6236 if (strings.Any(s => s?.Contains("ByteShield") == true)) - return "ByteShield Encrypted Executable"; + return "ByteShield"; } return null; @@ -130,11 +132,12 @@ namespace BurnOutSharp.ProtectionType /// public ConcurrentQueue CheckDirectoryPath(string path, IEnumerable files) { + // TODO: Investigate reference to "bbz650.tmp" in "Byteshield.dll" (Redump entry 6236) + // Files with the ".bbz" extension are associated with ByteShield, but the extenstion is known to be used in other places as well. var matchers = new List { new PathMatchSet(new PathMatch("Byteshield.dll", useEndsWith: true), "ByteShield Component Module"), new PathMatchSet(new PathMatch("Byteshield.ini", useEndsWith: true), "ByteShield"), - new PathMatchSet(new PathMatch(".bbz", useEndsWith: true), "ByteShield Encrypted Executable"), }; return MatchUtil.GetAllMatches(files, matchers, any: true); @@ -143,11 +146,12 @@ namespace BurnOutSharp.ProtectionType /// public string CheckFilePath(string path) { + // TODO: Investigate reference to "bbz650.tmp" in "Byteshield.dll" (Redump entry 6236) + // Files with the ".bbz" extension are associated with ByteShield, but the extenstion is known to be used in other places as well. var matchers = new List { new PathMatchSet(new PathMatch("Byteshield.dll", useEndsWith: true), "ByteShield Component Module"), new PathMatchSet(new PathMatch("Byteshield.ini", useEndsWith: true), "ByteShield"), - new PathMatchSet(new PathMatch(".bbz", useEndsWith: true), "ByteShield Encrypted Executable"), }; return MatchUtil.GetFirstMatch(path, matchers, any: true);