diff --git a/ExamplePlugin/Main.cs b/ExamplePlugin/Main.cs index 07fe5d7..3d5f8bd 100644 --- a/ExamplePlugin/Main.cs +++ b/ExamplePlugin/Main.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/ExamplePlugin/Properties/AssemblyInfo.cs b/ExamplePlugin/Properties/AssemblyInfo.cs index 4a67dde..d1988df 100644 --- a/ExamplePlugin/Properties/AssemblyInfo.cs +++ b/ExamplePlugin/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("atom0s")] [assembly: AssemblyProduct("ExamplePlugin")] -[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2018")] +[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Steamless.API/Crypto/AesHelper.cs b/Steamless.API/Crypto/AesHelper.cs index 871cd6f..50af36b 100644 --- a/Steamless.API/Crypto/AesHelper.cs +++ b/Steamless.API/Crypto/AesHelper.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/Events/LogMessageEventArgs.cs b/Steamless.API/Events/LogMessageEventArgs.cs index 69852c4..af8d1c4 100644 --- a/Steamless.API/Events/LogMessageEventArgs.cs +++ b/Steamless.API/Events/LogMessageEventArgs.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/Events/LogMessageType.cs b/Steamless.API/Events/LogMessageType.cs index 0b7237d..43a474c 100644 --- a/Steamless.API/Events/LogMessageType.cs +++ b/Steamless.API/Events/LogMessageType.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/Extensions/FileStreamExtensions.cs b/Steamless.API/Extensions/FileStreamExtensions.cs index 1b99d20..698946d 100644 --- a/Steamless.API/Extensions/FileStreamExtensions.cs +++ b/Steamless.API/Extensions/FileStreamExtensions.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/Model/NavigatedEventArgs.cs b/Steamless.API/Model/NavigatedEventArgs.cs index 4ce5668..4e9bb39 100644 --- a/Steamless.API/Model/NavigatedEventArgs.cs +++ b/Steamless.API/Model/NavigatedEventArgs.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/Model/NotifiableModel.cs b/Steamless.API/Model/NotifiableModel.cs index a844631..9e15826 100644 --- a/Steamless.API/Model/NotifiableModel.cs +++ b/Steamless.API/Model/NotifiableModel.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/Model/SteamlessOptions.cs b/Steamless.API/Model/SteamlessOptions.cs index 9e7e7bd..ef9af6f 100644 --- a/Steamless.API/Model/SteamlessOptions.cs +++ b/Steamless.API/Model/SteamlessOptions.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -36,6 +36,7 @@ namespace Steamless.API.Model this.KeepBindSection = false; this.DumpPayloadToDisk = false; this.DumpSteamDrmpToDisk = false; + this.UseExperimentalFeatures = false; } /// @@ -43,8 +44,8 @@ namespace Steamless.API.Model /// public bool VerboseOutput { - get { return this.Get("VerboseOutput"); } - set { this.Set("VerboseOutput", value); } + get => this.Get("VerboseOutput"); + set => this.Set("VerboseOutput", value); } /// @@ -52,8 +53,8 @@ namespace Steamless.API.Model /// public bool KeepBindSection { - get { return this.Get("KeepBindSection"); } - set { this.Set("KeepBindSection", value); } + get => this.Get("KeepBindSection"); + set => this.Set("KeepBindSection", value); } /// @@ -61,8 +62,8 @@ namespace Steamless.API.Model /// public bool DumpPayloadToDisk { - get { return this.Get("DumpPayloadToDisk"); } - set { this.Set("DumpPayloadToDisk", value); } + get => this.Get("DumpPayloadToDisk"); + set => this.Set("DumpPayloadToDisk", value); } /// @@ -70,8 +71,17 @@ namespace Steamless.API.Model /// public bool DumpSteamDrmpToDisk { - get { return this.Get("DumpSteamDrmpToDisk"); } - set { this.Set("DumpSteamDrmpToDisk", value); } + get => this.Get("DumpSteamDrmpToDisk"); + set => this.Set("DumpSteamDrmpToDisk", value); + } + + /// + /// Gets or sets the use experimental features option value. + /// + public bool UseExperimentalFeatures + { + get => this.Get("UseExperimentalFeatures"); + set => this.Set("UseExperimentalFeatures", value); } } } \ No newline at end of file diff --git a/Steamless.API/Model/SteamlessPlugin.cs b/Steamless.API/Model/SteamlessPlugin.cs index 8a38aee..1fca835 100644 --- a/Steamless.API/Model/SteamlessPlugin.cs +++ b/Steamless.API/Model/SteamlessPlugin.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/Model/ViewModelBase.cs b/Steamless.API/Model/ViewModelBase.cs index dbc9001..644ada9 100644 --- a/Steamless.API/Model/ViewModelBase.cs +++ b/Steamless.API/Model/ViewModelBase.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -70,8 +70,8 @@ namespace Steamless.API.Model /// private EventHandlerList Events { - get { return this.Get("Events"); } - set { this.Set("Events", value); } + get => this.Get("Events"); + set => this.Set("Events", value); } /// @@ -79,8 +79,8 @@ namespace Steamless.API.Model /// public event EventHandler NavigatedFrom { - add { this.Events.AddHandler("NavigatedFromEvent", value); } - remove { this.Events.RemoveHandler("NavigatedFromEvent", value); } + add => this.Events.AddHandler("NavigatedFromEvent", value); + remove => this.Events.RemoveHandler("NavigatedFromEvent", value); } /// @@ -88,8 +88,8 @@ namespace Steamless.API.Model /// public event EventHandler NavigatedTo { - add { this.Events.AddHandler("NavigatedToEvent", value); } - remove { this.Events.RemoveHandler("NavigatedToEvent", value); } + add => this.Events.AddHandler("NavigatedToEvent", value); + remove => this.Events.RemoveHandler("NavigatedToEvent", value); } /// diff --git a/Steamless.API/PE32/NativeApi32.cs b/Steamless.API/PE32/NativeApi32.cs index 44a1726..c00f24f 100644 --- a/Steamless.API/PE32/NativeApi32.cs +++ b/Steamless.API/PE32/NativeApi32.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/PE32/Pe32File.cs b/Steamless.API/PE32/Pe32File.cs index 6ac560a..4db8ad6 100644 --- a/Steamless.API/PE32/Pe32File.cs +++ b/Steamless.API/PE32/Pe32File.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/PE32/Pe32Helpers.cs b/Steamless.API/PE32/Pe32Helpers.cs index 074caab..025080f 100644 --- a/Steamless.API/PE32/Pe32Helpers.cs +++ b/Steamless.API/PE32/Pe32Helpers.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/PE64/NativeApi64.cs b/Steamless.API/PE64/NativeApi64.cs index 3853b68..c1f7262 100644 --- a/Steamless.API/PE64/NativeApi64.cs +++ b/Steamless.API/PE64/NativeApi64.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/PE64/Pe64File.cs b/Steamless.API/PE64/Pe64File.cs index 8388560..b33d265 100644 --- a/Steamless.API/PE64/Pe64File.cs +++ b/Steamless.API/PE64/Pe64File.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/PE64/Pe64Helpers.cs b/Steamless.API/PE64/Pe64Helpers.cs index b54a996..8767c27 100644 --- a/Steamless.API/PE64/Pe64Helpers.cs +++ b/Steamless.API/PE64/Pe64Helpers.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/Properties/AssemblyInfo.cs b/Steamless.API/Properties/AssemblyInfo.cs index fe32d12..6c815e9 100644 --- a/Steamless.API/Properties/AssemblyInfo.cs +++ b/Steamless.API/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("atom0s")] [assembly: AssemblyProduct("Steamless.API")] -[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2018")] +[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Steamless.API/Services/LoggingService.cs b/Steamless.API/Services/LoggingService.cs index de2fb50..d809bb4 100644 --- a/Steamless.API/Services/LoggingService.cs +++ b/Steamless.API/Services/LoggingService.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/SteamlessApiVersionAttribute.cs b/Steamless.API/SteamlessApiVersionAttribute.cs index 4664866..106a633 100644 --- a/Steamless.API/SteamlessApiVersionAttribute.cs +++ b/Steamless.API/SteamlessApiVersionAttribute.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.API/SteamlessEvents.cs b/Steamless.API/SteamlessEvents.cs index c46d6fd..49b0de0 100644 --- a/Steamless.API/SteamlessEvents.cs +++ b/Steamless.API/SteamlessEvents.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant20.x86/Classes/SteamStubDrmFlags.cs b/Steamless.Unpacker.Variant20.x86/Classes/SteamStubDrmFlags.cs index a5019d4..52220e4 100644 --- a/Steamless.Unpacker.Variant20.x86/Classes/SteamStubDrmFlags.cs +++ b/Steamless.Unpacker.Variant20.x86/Classes/SteamStubDrmFlags.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant20.x86/Classes/SteamStubHeader.cs b/Steamless.Unpacker.Variant20.x86/Classes/SteamStubHeader.cs index 6b8b991..9e3cd2a 100644 --- a/Steamless.Unpacker.Variant20.x86/Classes/SteamStubHeader.cs +++ b/Steamless.Unpacker.Variant20.x86/Classes/SteamStubHeader.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant20.x86/Classes/SteamStubHelpers.cs b/Steamless.Unpacker.Variant20.x86/Classes/SteamStubHelpers.cs index 262b276..bfb8d26 100644 --- a/Steamless.Unpacker.Variant20.x86/Classes/SteamStubHelpers.cs +++ b/Steamless.Unpacker.Variant20.x86/Classes/SteamStubHelpers.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant20.x86/Main.cs b/Steamless.Unpacker.Variant20.x86/Main.cs index 76b8b7d..0f7af29 100644 --- a/Steamless.Unpacker.Variant20.x86/Main.cs +++ b/Steamless.Unpacker.Variant20.x86/Main.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -187,20 +187,16 @@ namespace Steamless.Unpacker.Variant20.x86 if (BitConverter.ToUInt32(this.File.FileData, (int)fileOffset - 4) != 0xC0DEC0DE) return false; - uint structOffset; - uint structSize; - uint structXorKey; - // Disassemble the file to locate the needed DRM information.. - if (!this.DisassembleFile(out structOffset, out structSize, out structXorKey)) + if (!this.DisassembleFile(out var structOffset, out var structSize, out var structXorKey)) return false; // Obtain the DRM header data.. var headerData = new byte[structSize]; - Array.Copy(this.File.FileData, this.File.GetFileOffsetFromRva((uint)structOffset), headerData, 0, structSize); + Array.Copy(this.File.FileData, this.File.GetFileOffsetFromRva(structOffset), headerData, 0, structSize); // Xor decode the header data.. - this.XorKey = SteamStubHelpers.SteamXor(ref headerData, (uint)headerData.Length, (uint)structXorKey); + this.XorKey = SteamStubHelpers.SteamXor(ref headerData, (uint)headerData.Length, structXorKey); // Determine how to handle the header based on the size.. if ((structSize / 4) == 0xD0) @@ -325,7 +321,7 @@ namespace Steamless.Unpacker.Variant20.x86 Array.Copy(this.SteamDrmpData, drmpOffset, drmpOffsetData, 0, 1024); // Obtain the offsets from the file data.. - var drmpOffsets = this.GetSteamDrmpOffsets(drmpOffsetData); + var drmpOffsets = (this.Options.UseExperimentalFeatures) ? this.GetSteamDrmpOffsetsDynamic(drmpOffsetData) : this.GetSteamDrmpOffsets(drmpOffsetData); if (drmpOffsets.Count != 8) return false; @@ -557,14 +553,14 @@ namespace Steamless.Unpacker.Variant20.x86 if (inst.Mnemonic == ud_mnemonic_code.UD_Imov && inst.Operands[0].Type == ud_type.UD_OP_MEM && inst.Operands[1].Type == ud_type.UD_OP_IMM) { if (structOffset == 0) - structOffset = (uint)(inst.Operands[1].LvalUDWord - this.File.NtHeaders.OptionalHeader.ImageBase); + structOffset = inst.Operands[1].LvalUDWord - this.File.NtHeaders.OptionalHeader.ImageBase; else - structXorKey = (uint)inst.Operands[1].LvalUDWord; + structXorKey = inst.Operands[1].LvalUDWord; } // Looks for: mov reg, immediate if (inst.Mnemonic == ud_mnemonic_code.UD_Imov && inst.Operands[0].Type == ud_type.UD_OP_REG && inst.Operands[1].Type == ud_type.UD_OP_IMM) - structSize = (uint)inst.Operands[1].LvalUDWord * 4; + structSize = inst.Operands[1].LvalUDWord * 4; } offset = size = xorKey = 0; @@ -615,6 +611,97 @@ namespace Steamless.Unpacker.Variant20.x86 return offsets; } + /// + /// Obtains the needed DRM offsets from the SteamDRMP.dll file. (Dynamically via disassembling.) + /// + /// + /// + private List GetSteamDrmpOffsetsDynamic(byte[] data) + { + Disassembler disasm = null; + var offsets = new List(); + var count = 0; + + /** + * Assumed order of the offset values: + * - Flags (mov) + * - SteamAppId (mov) + * - OEP (mov) + * - Code Section VA (mov) + * - Code Section Size (mov) + * - Code Section AES Key (lea) + * - Code Section AES IV (offset from above lea) + * - Stolen Bytes (add) + */ + + try + { + var skipMov = false; + + // Disassemble the incoming block of data to look for the needed offsets dynamically.. + disasm = new Disassembler(data, ArchitectureMode.x86_32); + foreach (var inst in disasm.Disassemble().Where(inst => !inst.Error)) + { + if (count >= 8) + break; + + // ex: mov eax, [eax+1234] + if (!skipMov && inst.Mnemonic == ud_mnemonic_code.UD_Imov) + { + if (inst.Operands.Length >= 2 + && inst.Operands[0].Type == ud_type.UD_OP_REG + && inst.Operands[1].Type == ud_type.UD_OP_MEM) + { + count++; + offsets.Add(inst.Operands[1].LvalSDWord); + } + } + + // ex: lea eax, [eax+1234] + if (inst.Mnemonic == ud_mnemonic_code.UD_Ilea) + { + if (inst.Operands.Length >= 2 + && inst.Operands[0].Type == ud_type.UD_OP_REG + && inst.Operands[1].Type == ud_type.UD_OP_MEM) + { + count += 2; + offsets.Add(inst.Operands[1].LvalSDWord); + offsets.Add(inst.Operands[1].LvalSDWord + 16); + + /** + * Some v2 compiled files have the order of the last offset (add inst) after a mov which loads + * GetModuleHandleA's address into a register. In order to skip that from being read as an offset + * we need this small workaround.. + */ + skipMov = true; + } + } + + // ex: add eax, 1234 + if (inst.Mnemonic == ud_mnemonic_code.UD_Iadd) + { + if (inst.Operands.Length >= 2 + && inst.Operands[0].Type == ud_type.UD_OP_REG + && inst.Operands[1].Type == ud_type.UD_OP_IMM) + { + count++; + offsets.Add(inst.Operands[1].LvalSDWord); + } + } + } + + return offsets; + } + catch + { + return new List(); + } + finally + { + disasm?.Dispose(); + } + } + /// /// Gets or sets the Steamless options this file was requested to process with. /// diff --git a/Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs b/Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs index baa45b1..70f056d 100644 --- a/Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs +++ b/Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -31,10 +31,10 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("atom0s")] [assembly: AssemblyProduct("Steamless.Unpacker.Variant20.x86")] -[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2018")] +[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] [assembly: Guid("a40154cd-a0fd-4371-8099-ce277e0989af")] -[assembly: AssemblyVersion("1.0.0.5")] -[assembly: AssemblyFileVersion("1.0.0.5")] \ No newline at end of file +[assembly: AssemblyVersion("1.0.0.6")] +[assembly: AssemblyFileVersion("1.0.0.6")] \ No newline at end of file diff --git a/Steamless.Unpacker.Variant30.x64/Classes/SteamStubDrmFlags.cs b/Steamless.Unpacker.Variant30.x64/Classes/SteamStubDrmFlags.cs index 599acf2..a9255d9 100644 --- a/Steamless.Unpacker.Variant30.x64/Classes/SteamStubDrmFlags.cs +++ b/Steamless.Unpacker.Variant30.x64/Classes/SteamStubDrmFlags.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant30.x64/Classes/SteamStubHeader.cs b/Steamless.Unpacker.Variant30.x64/Classes/SteamStubHeader.cs index 92e8af3..a5cc096 100644 --- a/Steamless.Unpacker.Variant30.x64/Classes/SteamStubHeader.cs +++ b/Steamless.Unpacker.Variant30.x64/Classes/SteamStubHeader.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant30.x64/Classes/SteamStubHelpers.cs b/Steamless.Unpacker.Variant30.x64/Classes/SteamStubHelpers.cs index 640c2a4..c590e92 100644 --- a/Steamless.Unpacker.Variant30.x64/Classes/SteamStubHelpers.cs +++ b/Steamless.Unpacker.Variant30.x64/Classes/SteamStubHelpers.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant30.x64/Main.cs b/Steamless.Unpacker.Variant30.x64/Main.cs index 285497b..65d9a17 100644 --- a/Steamless.Unpacker.Variant30.x64/Main.cs +++ b/Steamless.Unpacker.Variant30.x64/Main.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant30.x64/Properties/AssemblyInfo.cs b/Steamless.Unpacker.Variant30.x64/Properties/AssemblyInfo.cs index 5279978..d412a19 100644 --- a/Steamless.Unpacker.Variant30.x64/Properties/AssemblyInfo.cs +++ b/Steamless.Unpacker.Variant30.x64/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("atom0s")] [assembly: AssemblyProduct("Steamless.Unpacker.Variant30.x64")] -[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2018")] +[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Steamless.Unpacker.Variant30.x86/Classes/SteamStubDrmFlags.cs b/Steamless.Unpacker.Variant30.x86/Classes/SteamStubDrmFlags.cs index dc41551..ba89a08 100644 --- a/Steamless.Unpacker.Variant30.x86/Classes/SteamStubDrmFlags.cs +++ b/Steamless.Unpacker.Variant30.x86/Classes/SteamStubDrmFlags.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant30.x86/Classes/SteamStubHeader.cs b/Steamless.Unpacker.Variant30.x86/Classes/SteamStubHeader.cs index b2d60b7..4ee6785 100644 --- a/Steamless.Unpacker.Variant30.x86/Classes/SteamStubHeader.cs +++ b/Steamless.Unpacker.Variant30.x86/Classes/SteamStubHeader.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant30.x86/Classes/SteamStubHelpers.cs b/Steamless.Unpacker.Variant30.x86/Classes/SteamStubHelpers.cs index 758d51a..1b52952 100644 --- a/Steamless.Unpacker.Variant30.x86/Classes/SteamStubHelpers.cs +++ b/Steamless.Unpacker.Variant30.x86/Classes/SteamStubHelpers.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant30.x86/Main.cs b/Steamless.Unpacker.Variant30.x86/Main.cs index 97f8cf5..cbf9160 100644 --- a/Steamless.Unpacker.Variant30.x86/Main.cs +++ b/Steamless.Unpacker.Variant30.x86/Main.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant30.x86/Properties/AssemblyInfo.cs b/Steamless.Unpacker.Variant30.x86/Properties/AssemblyInfo.cs index 3a32e3b..5ebf22f 100644 --- a/Steamless.Unpacker.Variant30.x86/Properties/AssemblyInfo.cs +++ b/Steamless.Unpacker.Variant30.x86/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("atom0s")] [assembly: AssemblyProduct("Steamless.Unpacker.Variant30.x86")] -[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2018")] +[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Steamless.Unpacker.Variant31.x64/Classes/SteamStubDrmFlags.cs b/Steamless.Unpacker.Variant31.x64/Classes/SteamStubDrmFlags.cs index 3744aaf..fa27ac2 100644 --- a/Steamless.Unpacker.Variant31.x64/Classes/SteamStubDrmFlags.cs +++ b/Steamless.Unpacker.Variant31.x64/Classes/SteamStubDrmFlags.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant31.x64/Classes/SteamStubHeader.cs b/Steamless.Unpacker.Variant31.x64/Classes/SteamStubHeader.cs index 917ebf4..687169c 100644 --- a/Steamless.Unpacker.Variant31.x64/Classes/SteamStubHeader.cs +++ b/Steamless.Unpacker.Variant31.x64/Classes/SteamStubHeader.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant31.x64/Classes/SteamStubHelpers.cs b/Steamless.Unpacker.Variant31.x64/Classes/SteamStubHelpers.cs index 2bfd9d2..656bae4 100644 --- a/Steamless.Unpacker.Variant31.x64/Classes/SteamStubHelpers.cs +++ b/Steamless.Unpacker.Variant31.x64/Classes/SteamStubHelpers.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant31.x64/Main.cs b/Steamless.Unpacker.Variant31.x64/Main.cs index cd02726..61ab61c 100644 --- a/Steamless.Unpacker.Variant31.x64/Main.cs +++ b/Steamless.Unpacker.Variant31.x64/Main.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant31.x64/Properties/AssemblyInfo.cs b/Steamless.Unpacker.Variant31.x64/Properties/AssemblyInfo.cs index 530b66f..0803c92 100644 --- a/Steamless.Unpacker.Variant31.x64/Properties/AssemblyInfo.cs +++ b/Steamless.Unpacker.Variant31.x64/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("atom0s")] [assembly: AssemblyProduct("Steamless.Unpacker.Variant31.x64")] -[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2018")] +[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Steamless.Unpacker.Variant31.x86/Classes/SteamStubDrmFlags.cs b/Steamless.Unpacker.Variant31.x86/Classes/SteamStubDrmFlags.cs index 1a96115..cc99f8f 100644 --- a/Steamless.Unpacker.Variant31.x86/Classes/SteamStubDrmFlags.cs +++ b/Steamless.Unpacker.Variant31.x86/Classes/SteamStubDrmFlags.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant31.x86/Classes/SteamStubHeader.cs b/Steamless.Unpacker.Variant31.x86/Classes/SteamStubHeader.cs index bfd168b..a2307a8 100644 --- a/Steamless.Unpacker.Variant31.x86/Classes/SteamStubHeader.cs +++ b/Steamless.Unpacker.Variant31.x86/Classes/SteamStubHeader.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant31.x86/Classes/SteamStubHelpers.cs b/Steamless.Unpacker.Variant31.x86/Classes/SteamStubHelpers.cs index cb7aa4a..b492de7 100644 --- a/Steamless.Unpacker.Variant31.x86/Classes/SteamStubHelpers.cs +++ b/Steamless.Unpacker.Variant31.x86/Classes/SteamStubHelpers.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant31.x86/Main.cs b/Steamless.Unpacker.Variant31.x86/Main.cs index 5c9e579..87516c1 100644 --- a/Steamless.Unpacker.Variant31.x86/Main.cs +++ b/Steamless.Unpacker.Variant31.x86/Main.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to diff --git a/Steamless.Unpacker.Variant31.x86/Properties/AssemblyInfo.cs b/Steamless.Unpacker.Variant31.x86/Properties/AssemblyInfo.cs index b7b7886..9e3ca04 100644 --- a/Steamless.Unpacker.Variant31.x86/Properties/AssemblyInfo.cs +++ b/Steamless.Unpacker.Variant31.x86/Properties/AssemblyInfo.cs @@ -1,5 +1,5 @@ /** - * Steamless - Copyright (c) 2015 - 2018 atom0s [atom0s@live.com] + * Steamless - Copyright (c) 2015 - 2019 atom0s [atom0s@live.com] * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or send a letter to @@ -31,7 +31,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyCompany("atom0s")] [assembly: AssemblyProduct("Steamless.Unpacker.Variant31.x86")] -[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2018")] +[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/Steamless/App.xaml b/Steamless/App.xaml index 58a713b..2eb94db 100644 --- a/Steamless/App.xaml +++ b/Steamless/App.xaml @@ -1,5 +1,5 @@