Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Steamless.API/Model/SteamlessOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public SteamlessOptions()
this.DontRealignSections = true;
this.ZeroDosStubData = true;
this.RecalculateFileChecksum = false;
this.RemoveCertificateTable = true;
}

/// <summary>
Expand Down Expand Up @@ -113,5 +114,11 @@ public bool RecalculateFileChecksum
get => this.Get<bool>("RecalculateFileChecksum");
set => this.Set("RecalculateFileChecksum", value);
}

public bool RemoveCertificateTable
{
get => this.Get<bool>("RemoveCertificateTable");
set => this.Set("RemoveCertificateTable", value);
}
}
}
7 changes: 7 additions & 0 deletions Steamless.Unpacker.Variant31.x64/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,13 @@ private bool Step6()
var ntHeaders = this.File.NtHeaders;
ntHeaders.OptionalHeader.AddressOfEntryPoint = (uint)this.StubHeader.OriginalEntryPoint;
ntHeaders.OptionalHeader.CheckSum = 0;

if(this.Options.RemoveCertificateTable)
{
ntHeaders.OptionalHeader.CertificateTable.Size = 0;
ntHeaders.OptionalHeader.CertificateTable.VirtualAddress = 0;
}

this.File.NtHeaders = ntHeaders;

// Write the NT headers to the file..
Expand Down
2 changes: 2 additions & 0 deletions Steamless/View/MainView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox Grid.Row="0" Content="Verbose Output" Margin="2" ToolTip="If enabled, Steamless will allow logging of debug messages." IsChecked="{Binding Options.VerboseOutput}" />
<CheckBox Grid.Row="1" Content="Keep Bind Section" Margin="2" ToolTip="The bind section should be kept within the file after unpacking." IsChecked="{Binding Options.KeepBindSection}" />
Expand All @@ -96,6 +97,7 @@
<CheckBox Grid.Row="5" Content="Don't Realign Sections" Margin="2" ToolTip="Disables realignment of sections when unpacking." IsChecked="{Binding Options.DontRealignSections}" />
<CheckBox Grid.Row="6" Content="Zero DOS Stub Data" Margin="2" ToolTip="Sets the DOS stub data to 00's." IsChecked="{Binding Options.ZeroDosStubData}" />
<CheckBox Grid.Row="7" Content="Recalculate File Checksum" Margin="2" ToolTip="Recalculates the file checksum in the unpacked file." IsChecked="{Binding Options.RecalculateFileChecksum}" />
<CheckBox Grid.Row="8" Content="Remove Certificate Table" Margin="2" ToolTip="Removes the security directory from the optional data directories." IsChecked="{Binding Options.RemoveCertificateTable}" />
</Grid>
</GroupBox>

Expand Down