Skip to content

Commit 640e57e

Browse files
committed
Unpacker 2.0 (x86) - Add support for additional samples. (Header size: 884)
Bump version.
1 parent fa0d831 commit 640e57e

4 files changed

Lines changed: 39 additions & 4 deletions

File tree

Steamless.Unpacker.Variant20.x86/Classes/SteamStubHeader.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,38 @@ public struct SteamStub32Var20_856_Header
5959
public byte[] StubData; // Misc stub data, such as strings, error messages, etc.
6060
}
6161

62+
/// <summary>
63+
/// SteamStub DRM Variant 2.0 Header
64+
///
65+
/// Size: 884 bytes
66+
/// </summary>
67+
[StructLayout(LayoutKind.Sequential)]
68+
public struct SteamStub32Var20_884_Header
69+
{
70+
public uint XorKey1; // Xor key used to encode the header data.
71+
public uint XorKey2; // Xor key used to encode the header data.
72+
public uint GetModuleHandleA_idata; // The address of GetModuleHandleA inside of the .idata section.
73+
public uint GetProcAddress_idata; // The address of GetProcAddress inside of the .idata section.
74+
public uint LoadLibraryA_idata; // The address of LoadLibraryA inside of the .idata section.
75+
public uint GetProcAddress_custom; // The address of the custom GetProcAddress implementation function.
76+
public uint Flags; // Protection flags used with the file.
77+
public uint Unknown0000; // Unknown (Used as part of a hash check when (Flags & 0x10) is set.)
78+
public uint BindSectionVirtualAddress; // The virtual address to the .bind section.
79+
public uint BindSectionCodeSize; // The size of the code stub inside of the .bind section.
80+
public uint BindSectionHash; // Hash that is calculated based on the .bind code section and .bind stub header data. (Only used if (Flags & 1) is set.)
81+
public uint OEP; // The original file OEP to be invoked after the stub has finished.
82+
public uint CodeSectionVirtualAddress; // The virtual address to the code section. (.text)
83+
public uint CodeSectionSize; // The size of the code section.
84+
public uint CodeSectionXorKey; // The starting key to xor decode against. (Only used if (Flags & 4) is set.)
85+
public uint SteamAppId; // The steam application id of the packed file.
86+
87+
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x08)]
88+
public byte[] SteamAppIDString; // The SteamAppID of the packed file, in string format.
89+
90+
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x32C)]
91+
public byte[] StubData; // Misc stub data, such as strings, error messages, etc.
92+
}
93+
6294
/// <summary>
6395
/// SteamStub DRM Variant 2.0 Header
6496
///

Steamless.Unpacker.Variant20.x86/Main.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ private bool Step1()
201201
case 856:
202202
this.StubHeader = Pe32Helpers.GetStructure<SteamStub32Var20_856_Header>(headerData);
203203
break;
204+
case 884:
205+
this.StubHeader = Pe32Helpers.GetStructure<SteamStub32Var20_884_Header>(headerData);
206+
break;
204207
case 952:
205208
this.StubHeader = Pe32Helpers.GetStructure<SteamStub32Var20_952_Header>(headerData);
206209
break;

Steamless.Unpacker.Variant20.x86/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
[assembly: AssemblyCulture("")]
3737
[assembly: ComVisible(false)]
3838
[assembly: Guid("4f11f26d-2946-467f-a4e9-9e2a619a1fd3")]
39-
[assembly: AssemblyVersion("1.0.0.2")]
40-
[assembly: AssemblyFileVersion("1.0.0.2")]
39+
[assembly: AssemblyVersion("1.0.0.3")]
40+
[assembly: AssemblyFileVersion("1.0.0.3")]

Steamless/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@
3737
[assembly: AssemblyCulture("")]
3838
[assembly: ComVisible(false)]
3939
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
40-
[assembly: AssemblyVersion("3.1.0.2")]
41-
[assembly: AssemblyFileVersion("3.1.0.2")]
40+
[assembly: AssemblyVersion("3.1.0.3")]
41+
[assembly: AssemblyFileVersion("3.1.0.3")]

0 commit comments

Comments
 (0)