From ff602c77edc8307f981c85f5901af90b17101859 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 18 Jul 2021 21:50:58 -0700 Subject: [PATCH] Improve GFWL support Adds support for the previously-undetected Games for Windows LIVE - Zero Day Piracy Protection Module as well as adding a generic check for any other modules --- BurnOutSharp/ProtectionType/GFWL.cs | 43 ++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/BurnOutSharp/ProtectionType/GFWL.cs b/BurnOutSharp/ProtectionType/GFWL.cs index 53386738..b7a675a1 100644 --- a/BurnOutSharp/ProtectionType/GFWL.cs +++ b/BurnOutSharp/ProtectionType/GFWL.cs @@ -12,7 +12,36 @@ namespace BurnOutSharp.ProtectionType var matchers = new List { // xlive.dll - new ContentMatchSet(new byte?[] { 0x78, 0x6C, 0x69, 0x76, 0x65, 0x2E, 0x64, 0x6C, 0x6C }, "Games for Windows - Live"), + new ContentMatchSet(new byte?[] { 0x78, 0x6C, 0x69, 0x76, 0x65, 0x2E, 0x64, 0x6C, 0x6C }, "Games for Windows LIVE"), + + // G + (char)0x00 + a + (char)0x00 + m + (char)0x00 + e + (char)0x00 + s + (char)0x00 + + (char)0x00 + f + (char)0x00 + o + (char)0x00 + r + (char)0x00 + + (char)0x00 + W + (char)0x00 + i + (char)0x00 + n + (char)0x00 + d + (char)0x00 + o + (char)0x00 + w + (char)0x00 + s + (char)0x00 + + (char)0x00 + - + (char)0x00 + + (char)0x00 + L + (char)0x00 + I + (char)0x00 + V + (char)0x00 + E + (char)0x00 + + (char)0x00 + Z + (char)0x00 + e + (char)0x00 + r + (char)0x00 + o + (char)0x00 + + (char)0x00 + D + (char)0x00 + a + (char)0x00 + y + (char)0x00 + + (char)0x00 + P + (char)0x00 + i + (char)0x00 + r + (char)0x00 + a + (char)0x00 + c + (char)0x00 + y + (char)0x00 + + (char)0x00 + P + (char)0x00 + r + (char)0x00 + o + (char)0x00 + t + (char)0x00 + e + (char)0x00 + c + (char)0x00 + t + (char)0x00 + i + (char)0x00 + o + (char)0x00 + n + (char)0x00 + new ContentMatchSet(new byte?[] + { + 0x47, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, + 0x73, 0x00, 0x20, 0x00, 0x66, 0x00, 0x6F, 0x00, + 0x72, 0x00, 0x20, 0x00, 0x57, 0x00, 0x69, 0x00, + 0x6E, 0x00, 0x64, 0x00, 0x6F, 0x00, 0x77, 0x00, + 0x73, 0x00, 0x20, 0x00, 0x2D, 0x00, 0x20, 0x00, + 0x4C, 0x00, 0x49, 0x00, 0x56, 0x00, 0x45, 0x00, + 0x20, 0x00, 0x5A, 0x00, 0x65, 0x00, 0x72, 0x00, + 0x6F, 0x00, 0x20, 0x00, 0x44, 0x00, 0x61, 0x00, + 0x79, 0x00, 0x20, 0x00, 0x50, 0x00, 0x69, 0x00, + 0x72, 0x00, 0x61, 0x00, 0x63, 0x00, 0x79, 0x00, + 0x20, 0x00, 0x50, 0x00, 0x72, 0x00, 0x6F, 0x00, + 0x74, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, + 0x69, 0x00, 0x6F, 0x00, 0x6E, 0x00, + }, Utilities.GetFileVersion, "Games for Windows LIVE - Zero Day Piracy Protection Module"), + + // G + (char)0x00 + a + (char)0x00 + m + (char)0x00 + e + (char)0x00 + s + (char)0x00 + + (char)0x00 + f + (char)0x00 + o + (char)0x00 + r + (char)0x00 + + (char)0x00 + W + (char)0x00 + i + (char)0x00 + n + (char)0x00 + d + (char)0x00 + o + (char)0x00 + w + (char)0x00 + s + (char)0x00 + + (char)0x00 + - + (char)0x00 + + (char)0x00 + L + (char)0x00 + I + (char)0x00 + V + (char)0x00 + E + (char)0x00 + new ContentMatchSet(new byte?[] + { + 0x47, 0x00, 0x61, 0x00, 0x6D, 0x00, 0x65, 0x00, + 0x73, 0x00, 0x20, 0x00, 0x66, 0x00, 0x6F, 0x00, + 0x72, 0x00, 0x20, 0x00, 0x57, 0x00, 0x69, 0x00, + 0x6E, 0x00, 0x64, 0x00, 0x6F, 0x00, 0x77, 0x00, + 0x73, 0x00, 0x20, 0x00, 0x2D, 0x00, 0x20, 0x00, + 0x4C, 0x00, 0x49, 0x00, 0x56, 0x00, 0x45, 0x00, + }, Utilities.GetFileVersion, "Games for Windows LIVE"), }; return MatchUtil.GetFirstMatch(file, fileContent, matchers, includePosition); @@ -24,9 +53,9 @@ namespace BurnOutSharp.ProtectionType var matchers = new List { // Might be specifically GFWL/Gfwlivesetup.exe - new PathMatchSet(new PathMatch("Gfwlivesetup.exe", useEndsWith: true), "Games for Windows - Live"), - new PathMatchSet(new PathMatch("xliveinstall.dll", useEndsWith: true), "Games for Windows - Live"), - new PathMatchSet(new PathMatch("XLiveRedist.msi", useEndsWith: true), "Games for Windows - Live"), + new PathMatchSet(new PathMatch("Gfwlivesetup.exe", useEndsWith: true), "Games for Windows LIVE"), + new PathMatchSet(new PathMatch("xliveinstall.dll", useEndsWith: true), "Games for Windows LIVE"), + new PathMatchSet(new PathMatch("XLiveRedist.msi", useEndsWith: true), "Games for Windows LIVE"), }; return MatchUtil.GetAllMatches(files, matchers, any: true); @@ -38,9 +67,9 @@ namespace BurnOutSharp.ProtectionType var matchers = new List { // Might be specifically GFWL/Gfwlivesetup.exe - new PathMatchSet(new PathMatch("Gfwlivesetup.exe", useEndsWith: true), "Games for Windows - Live"), - new PathMatchSet(new PathMatch("xliveinstall.dll", useEndsWith: true), "Games for Windows - Live"), - new PathMatchSet(new PathMatch("XLiveRedist.msi", useEndsWith: true), "Games for Windows - Live"), + new PathMatchSet(new PathMatch("Gfwlivesetup.exe", useEndsWith: true), "Games for Windows LIVE"), + new PathMatchSet(new PathMatch("xliveinstall.dll", useEndsWith: true), "Games for Windows LIVE"), + new PathMatchSet(new PathMatch("XLiveRedist.msi", useEndsWith: true), "Games for Windows LIVE"), }; return MatchUtil.GetFirstMatch(path, matchers, any: true);