From 7b73cc9d9b573c8a02eae720ce472f84f4f144b3 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 10 Feb 2022 11:06:35 -0800 Subject: [PATCH] Add alternate checks for StarForce (fixes #79) --- BurnOutSharp/ProtectionType/StarForce.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/BurnOutSharp/ProtectionType/StarForce.cs b/BurnOutSharp/ProtectionType/StarForce.cs index c88788df..555b3ff3 100644 --- a/BurnOutSharp/ProtectionType/StarForce.cs +++ b/BurnOutSharp/ProtectionType/StarForce.cs @@ -1,4 +1,5 @@ -using System.Collections.Concurrent; +using System; +using System.Collections.Concurrent; using System.Collections.Generic; using BurnOutSharp.ExecutableType.Microsoft; using BurnOutSharp.Matching; @@ -17,7 +18,13 @@ namespace BurnOutSharp.ProtectionType return null; string name = Utilities.GetLegalCopyright(pex); - if (!string.IsNullOrWhiteSpace(name) && name.Contains("Protection Technology")) + if (!string.IsNullOrWhiteSpace(name) && name.Contains("Protection Technology")) // Protection Technology (StarForce)? + return $"StarForce {Utilities.GetFileVersion(pex)}"; + + name = Utilities.GetInternalName(pex); + if (!string.IsNullOrWhiteSpace(name) && name.Equals("CORE.EXE", StringComparison.Ordinal)) + return $"StarForce {Utilities.GetFileVersion(pex)}"; + else if (!string.IsNullOrWhiteSpace(name) && name.Equals("protect.exe", StringComparison.Ordinal)) return $"StarForce {Utilities.GetFileVersion(pex)}"; // TODO: Find what fvinfo field actually maps to this