diff --git a/Steamless.Unpacker.Variant21.x86/Main.cs b/Steamless.Unpacker.Variant21.x86/Main.cs index b62fe2e..87a249d 100644 --- a/Steamless.Unpacker.Variant21.x86/Main.cs +++ b/Steamless.Unpacker.Variant21.x86/Main.cs @@ -395,11 +395,12 @@ namespace Steamless.Unpacker.Variant21.x86 var aesKey = this.PayloadData.Skip(this.SteamDrmpOffsets[5]).Take(32).ToArray(); var aesIv = this.PayloadData.Skip(this.SteamDrmpOffsets[6]).Take(16).ToArray(); var codeStolen = this.PayloadData.Skip(this.SteamDrmpOffsets[7]).Take(16).ToArray(); + var encryptedSize = BitConverter.ToUInt32(this.PayloadData.Skip(this.SteamDrmpOffsets[4]).Take(4).ToArray(), 0); // Restore the stolen data then read the rest of the section data.. - codeSectionData = new byte[mainSection.SizeOfRawData + codeStolen.Length]; + codeSectionData = new byte[encryptedSize + codeStolen.Length]; Array.Copy(codeStolen, 0, codeSectionData, 0, codeStolen.Length); - Array.Copy(this.File.FileData, this.File.GetFileOffsetFromRva(mainSection.VirtualAddress), codeSectionData, codeStolen.Length, mainSection.SizeOfRawData); + Array.Copy(this.File.FileData, this.File.GetFileOffsetFromRva(mainSection.VirtualAddress), codeSectionData, codeStolen.Length, encryptedSize); // Decrypt the code section.. var aes = new AesHelper(aesKey, aesIv); diff --git a/Steamless.Unpacker.Variant21.x86/Properties/AssemblyInfo.cs b/Steamless.Unpacker.Variant21.x86/Properties/AssemblyInfo.cs index ceec40f..f1fc313 100644 --- a/Steamless.Unpacker.Variant21.x86/Properties/AssemblyInfo.cs +++ b/Steamless.Unpacker.Variant21.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.7")] -[assembly: AssemblyFileVersion("1.0.0.7")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.0.8")] +[assembly: AssemblyFileVersion("1.0.0.8")] \ No newline at end of file diff --git a/Steamless/Properties/AssemblyInfo.cs b/Steamless/Properties/AssemblyInfo.cs index 6f63f47..5703a65 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.11")] -[assembly: AssemblyFileVersion("3.0.0.11")] \ No newline at end of file +[assembly: AssemblyVersion("3.0.0.12")] +[assembly: AssemblyFileVersion("3.0.0.12")] \ No newline at end of file