From 56d8518ee430ff67853d778e2ed2cf2a5434de70 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 19 Mar 2021 17:31:53 -0700 Subject: [PATCH] Comment out over-matching EA check --- BurnOutSharp/ProtectionType/ElectronicArts.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/BurnOutSharp/ProtectionType/ElectronicArts.cs b/BurnOutSharp/ProtectionType/ElectronicArts.cs index 5268addb..2b3f062f 100644 --- a/BurnOutSharp/ProtectionType/ElectronicArts.cs +++ b/BurnOutSharp/ProtectionType/ElectronicArts.cs @@ -39,10 +39,11 @@ if (fileContent.Contains(check, out position)) return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty); + // TODO: Figure out a better variant of this that doesn't over-match // I + (char)0x00 + n + (char)0x00 + t + (char)0x00 + e + (char)0x00 + r + (char)0x00 + n + (char)0x00 + a + (char)0x00 + l + (char)0x00 + N + (char)0x00 + a + (char)0x00 + m + (char)0x00 + e + (char)0x00 + + (char)0x00 + + (char)0x00 + E + (char)0x00 + R + (char)0x00 + e + (char)0x00 + g + (char)0x00 - check = new byte[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x45, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00 }; - if (fileContent.Contains(check, out position)) - return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty); + // check = new byte[] { 0x49, 0x00, 0x6E, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6E, 0x00, 0x61, 0x00, 0x6C, 0x00, 0x4E, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, 0x00, 0x00, 0x45, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00 }; + // if (fileContent.Contains(check, out position)) + // return $"EA CdKey Registration Module {Utilities.GetFileVersion(file)}" + (includePosition ? $" (Index {position})" : string.Empty); // EReg Config Form check = new byte[] { 0x45, 0x52, 0x65, 0x67, 0x20, 0x43, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x20, 0x46, 0x6F, 0x72, 0x6D };