From 18d34ede4d375f7f4cde37e084cde6761bae7c71 Mon Sep 17 00:00:00 2001 From: atom0s Date: Thu, 9 Nov 2017 21:50:53 -0800 Subject: [PATCH] Added fallback pattern for variant 2.0 (x86). Fixes issue #6 --- Steamless.Unpacker.Variant20.x86/Main.cs | 7 ++++++- .../Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Steamless.Unpacker.Variant20.x86/Main.cs b/Steamless.Unpacker.Variant20.x86/Main.cs index 33d05a0..f87342c 100644 --- a/Steamless.Unpacker.Variant20.x86/Main.cs +++ b/Steamless.Unpacker.Variant20.x86/Main.cs @@ -298,7 +298,12 @@ namespace Steamless.Unpacker.Variant20.x86 // Scan for the needed data by a known pattern for the block of offset data.. var drmpOffset = Pe32Helpers.FindPattern(this.SteamDrmpData, "8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8D ?? ?? ?? ?? ?? 05"); if (drmpOffset == 0) - return false; + { + // Fall-back pattern scan for certain files that fail with the above pattern.. + drmpOffset = Pe32Helpers.FindPattern(this.SteamDrmpData, "8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8B"); + if (drmpOffset == 0) + return false; + } // Copy the block of data from the SteamDRMP.dll data.. var drmpOffsetData = new byte[1024]; diff --git a/Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs b/Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs index 744fb5a..028cfa1 100644 --- a/Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs +++ b/Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs @@ -36,5 +36,5 @@ using System.Runtime.InteropServices; [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("a40154cd-a0fd-4371-8099-ce277e0989af")] -[assembly: AssemblyVersion("1.0.0.1")] -[assembly: AssemblyFileVersion("1.0.0.1")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.0.2")] +[assembly: AssemblyFileVersion("1.0.0.2")] \ No newline at end of file