diff --git a/Steamless.Unpacker.Variant31.x86/Main.cs b/Steamless.Unpacker.Variant31.x86/Main.cs index cfadc18..aafaf8b 100644 --- a/Steamless.Unpacker.Variant31.x86/Main.cs +++ b/Steamless.Unpacker.Variant31.x86/Main.cs @@ -34,6 +34,7 @@ namespace Steamless.Unpacker.Variant31.x86 using API.Services; using Classes; using System; + using System.Collections.Generic; using System.IO; using System.Security.Cryptography; @@ -108,19 +109,29 @@ namespace Steamless.Unpacker.Variant31.x86 var varient = Pe32Helpers.FindPattern(bind, "E8 00 00 00 00 50 53 51 52 56 57 55 8B 44 24 1C 2D 05 00 00 00 8B CC 83 E4 F0 51 51 51 50"); if (varient == 0) return false; - // Attempt to determine the varient version.. - int headerSize; - var offset = Pe32Helpers.FindPattern(bind, "55 8B EC 81 EC ?? ?? ?? ?? 53 ?? ?? ?? ?? ?? 68"); - if (offset == 0) - { - offset = Pe32Helpers.FindPattern(bind, "55 8B EC 81 EC ?? ?? ?? ?? 53 ?? ?? ?? ?? ?? 8D 83"); - if (offset == 0) - return false; + // Version patterns.. + var varientPatterns = new List> + { + new KeyValuePair("55 8B EC 81 EC ?? ?? ?? ?? 53 ?? ?? ?? ?? ?? 68", 0x10), // v3.1 [Original version?] + new KeyValuePair("55 8B EC 81 EC ?? ?? ?? ?? 53 ?? ?? ?? ?? ?? 8D 83", 0x16), // v3.1.1 [Newer, 3.1.1? (Seen 2015?)] + new KeyValuePair("55 8B EC 81 EC ?? ?? ?? ?? 56 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 8D", 0x10) // v3.1.2 [Newer, 3.1.2? (Seen late 2017.)] + }; - headerSize = BitConverter.ToInt32(bind, (int)offset + 22); + var headerSize = 0; + uint offset = 0; + foreach (var p in varientPatterns) + { + offset = Pe32Helpers.FindPattern(bind, p.Key); + if (offset <= 0) + continue; + + headerSize = BitConverter.ToInt32(bind, (int)offset + p.Value); + break; } - else - headerSize = BitConverter.ToInt32(bind, (int)offset + 16); + + // Ensure valid data was found.. + if (offset == 0 || headerSize == 0) + return false; return headerSize == 0xF0; } diff --git a/Steamless.Unpacker.Variant31.x86/Properties/AssemblyInfo.cs b/Steamless.Unpacker.Variant31.x86/Properties/AssemblyInfo.cs index 1fa83a7..173a2ed 100644 --- a/Steamless.Unpacker.Variant31.x86/Properties/AssemblyInfo.cs +++ b/Steamless.Unpacker.Variant31.x86/Properties/AssemblyInfo.cs @@ -36,5 +36,5 @@ using System.Runtime.InteropServices; [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("0f2fae37-f898-4392-b4f6-711954beeb4f")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.0.1")] +[assembly: AssemblyFileVersion("1.0.0.1")] \ No newline at end of file diff --git a/Steamless/Properties/AssemblyInfo.cs b/Steamless/Properties/AssemblyInfo.cs index 01dc699..7fb4e54 100644 --- a/Steamless/Properties/AssemblyInfo.cs +++ b/Steamless/Properties/AssemblyInfo.cs @@ -37,5 +37,5 @@ using System.Windows; [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] -[assembly: AssemblyVersion("3.0.0.4")] -[assembly: AssemblyFileVersion("3.0.0.4")] \ No newline at end of file +[assembly: AssemblyVersion("3.0.0.5")] +[assembly: AssemblyFileVersion("3.0.0.5")] \ No newline at end of file diff --git a/Steamless/View/MainWindow.xaml b/Steamless/View/MainWindow.xaml index 9436198..220e69c 100644 --- a/Steamless/View/MainWindow.xaml +++ b/Steamless/View/MainWindow.xaml @@ -30,7 +30,7 @@ xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:view="clr-namespace:Steamless.View" mc:Ignorable="d" FontFamily="Tahoma" Icon="../Assets/steam.ico" - Title="Steamless" MinHeight="600" MaxHeight="800" MinWidth="450" Width="450" SizeToContent="Height" + Title="Steamless" MinHeight="600" MaxHeight="800" MinWidth="450" Width="525" SizeToContent="Height" TextOptions.TextRenderingMode="ClearType" TextOptions.TextFormattingMode="Display" ResizeMode="CanResizeWithGrip" AllowsTransparency="True" WindowStartupLocation="CenterScreen" WindowStyle="None">