1
0
Fork 0
mirror of https://github.com/atom0s/Steamless.git synced 2024-12-19 23:07:41 +01:00

Update more copyrights to 2020.

Update Paypal links to use newer Paypal.me format.
Fix issue with structure size casting that can cause an exception when trying to read a stub header structure.
Fix typo's on some spelling.
This commit is contained in:
atom0s 2020-12-17 23:10:04 -08:00
parent 0b6374e497
commit 869b893ac3
No known key found for this signature in database
GPG key ID: 37D5FD3494D79AF8
12 changed files with 31 additions and 21 deletions

View file

@ -43,6 +43,11 @@ namespace Steamless.API.PE32
{
var size = Marshal.SizeOf(typeof(T));
var ptr = Marshal.AllocHGlobal(size);
// Size can land up being bigger than our buffer..
if (size > data.Length)
size = Math.Min(data.Length, Math.Max(0, size));
Marshal.Copy(data, offset, ptr, size);
var obj = (T)Marshal.PtrToStructure(ptr, typeof(T));
Marshal.FreeHGlobal(ptr);

View file

@ -43,6 +43,11 @@ namespace Steamless.API.PE64
{
var size = Marshal.SizeOf(typeof(T));
var ptr = Marshal.AllocHGlobal(size);
// Size can land up being bigger than our buffer..
if (size > data.Length)
size = Math.Min(data.Length, Math.Max(0, size));
Marshal.Copy(data, offset, ptr, size);
var obj = (T)Marshal.PtrToStructure(ptr, typeof(T));
Marshal.FreeHGlobal(ptr);

View file

@ -31,7 +31,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyCompany("atom0s")]
[assembly: AssemblyProduct("Steamless.API")]
[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2019")]
[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -98,10 +98,10 @@ namespace Steamless.Unpacker.Variant30.x64
var bind = f.GetSectionData(".bind");
// Attempt to locate the known v3.x signature..
var varient = Pe64Helpers.FindPattern(bind, "E8 00 00 00 00 50 53 51 52 56 57 55 41 50");
if (varient == 0) return 0;
var variant = Pe64Helpers.FindPattern(bind, "E8 00 00 00 00 50 53 51 52 56 57 55 41 50");
if (variant == 0) return 0;
// Attempt to determine the varient version..
// Attempt to determine the variant version..
var offset = Pe64Helpers.FindPattern(bind, "48 8D 91 ?? ?? ?? ?? 48"); // 3.0
if (offset == 0)
offset = Pe64Helpers.FindPattern(bind, "48 8D 91 ?? ?? ?? ?? 41"); // 3.1

View file

@ -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 - 2019")]
[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -98,10 +98,10 @@ namespace Steamless.Unpacker.Variant30.x86
var bind = f.GetSectionData(".bind");
// Attempt to locate the known v3.x signature..
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 0;
var variant = 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 (variant == 0) return 0;
// Attempt to determine the varient version..
// Attempt to determine the variant version..
uint headerSize;
var offset = Pe32Helpers.FindPattern(bind, "55 8B EC 81 EC ?? ?? ?? ?? 53 ?? ?? ?? ?? ?? 68");
if (offset == 0)

View file

@ -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 - 2019")]
[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -106,10 +106,10 @@ namespace Steamless.Unpacker.Variant31.x64
var bind = f.GetSectionData(".bind");
// Attempt to locate the known v3.x signature..
var varient = Pe64Helpers.FindPattern(bind, "E8 00 00 00 00 50 53 51 52 56 57 55 41 50");
if (varient == 0) return false;
var variant = Pe64Helpers.FindPattern(bind, "E8 00 00 00 00 50 53 51 52 56 57 55 41 50");
if (variant == 0) return false;
// Attempt to determine the varient version..
// Attempt to determine the variant version..
var offset = Pe64Helpers.FindPattern(bind, "48 8D 91 ?? ?? ?? ?? 48"); // 3.0
if (offset == 0)
offset = Pe64Helpers.FindPattern(bind, "48 8D 91 ?? ?? ?? ?? 41"); // 3.1

View file

@ -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 - 2019")]
[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -107,11 +107,11 @@ namespace Steamless.Unpacker.Variant31.x86
var bind = f.GetSectionData(".bind");
// Attempt to locate the known v3.x signature..
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;
var variant = 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 (variant == 0) return false;
// Version patterns..
var varientPatterns = new List<KeyValuePair<string, int>>
var variantPatterns = new List<KeyValuePair<string, int>>
{
new KeyValuePair<string, int>("55 8B EC 81 EC ?? ?? ?? ?? 53 ?? ?? ?? ?? ?? 68", 0x10), // v3.1 [Original version?]
new KeyValuePair<string, int>("55 8B EC 81 EC ?? ?? ?? ?? 53 ?? ?? ?? ?? ?? 8D 83", 0x16), // v3.1.1 [Newer, 3.1.1? (Seen 2015?)]
@ -120,7 +120,7 @@ namespace Steamless.Unpacker.Variant31.x86
var headerSize = 0;
uint offset = 0;
foreach (var p in varientPatterns)
foreach (var p in variantPatterns)
{
offset = Pe32Helpers.FindPattern(bind, p.Key);
if (offset <= 0)

View file

@ -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 - 2019")]
[assembly: AssemblyCopyright("Copyright © atom0s 2015 - 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

View file

@ -216,7 +216,7 @@
<Label.OpacityMask>
<VisualBrush Visual="{StaticResource appbar_paypal}" />
</Label.OpacityMask>
<Hyperlink NavigateUri="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=7U7Q2GRT6KUJN" Foreground="Transparent" FontSize="24">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
<Hyperlink NavigateUri="https://www.paypal.me/atom0s" Foreground="Transparent" FontSize="24">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
<i:Interaction.Triggers>
<i:EventTrigger EventName="RequestNavigate">
<i:InvokeCommandAction Command="{Binding Path=MainWindow.OnOpenHyperlinkCommand, Source={StaticResource ViewModelLocator}}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Hyperlink}}}" />
@ -225,7 +225,7 @@
</Hyperlink>
</Label>
<Label ToolTip="Donate via Paypal" Margin="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<Hyperlink NavigateUri="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=7U7Q2GRT6KUJN" Foreground="#c0dd65" >Donate via Paypal
<Hyperlink NavigateUri="https://www.paypal.me/atom0s" Foreground="#c0dd65" >Donate via Paypal
<i:Interaction.Triggers>
<i:EventTrigger EventName="RequestNavigate">
<i:InvokeCommandAction Command="{Binding Path=MainWindow.OnOpenHyperlinkCommand, Source={StaticResource ViewModelLocator}}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Hyperlink}}}" />
@ -303,7 +303,7 @@
<LineBreak />
All work is original and done for educational purposes.
<LineBreak /><LineBreak />
Steam © 2003 - 2016 Valve Corporation. All rights reserved.
Steam © 2003 - 2020 Valve Corporation. All rights reserved.
</TextBlock>
</StackPanel>
</ScrollViewer>