mirror of
https://github.com/SabreTools/SabreTools.Models.git
synced 2026-09-22 06:36:47 +00:00
Start documenting Advanced Installer
This commit is contained in:
61
SabreTools.Models/AdvancedInstaller/FileEntry.cs
Normal file
61
SabreTools.Models/AdvancedInstaller/FileEntry.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
namespace SabreTools.Models.AdvancedInstaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Single entry in the file table
|
||||
/// </summary>
|
||||
public class FileEntry
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 05 00 00 00 (DLL)
|
||||
/// - 01 00 00 00 (MSI, CAB)
|
||||
/// - 00 00 00 00 (INI)
|
||||
/// </remarks>
|
||||
public uint Unknown0 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 0C 00 00 00 (DLL)
|
||||
/// - 00 00 00 00 (MSI)
|
||||
/// - 01 00 00 00 (CAB)
|
||||
/// - 03 00 00 00 (INI)
|
||||
/// </remarks>
|
||||
public uint Unknown1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown, always 0?
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 00 00 00 00 (DLL, MSI, CAB, INI)
|
||||
/// </remarks>
|
||||
public uint Unknown2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Size of the file
|
||||
/// </summary>
|
||||
public uint FileSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset of the file relative to the start
|
||||
/// of the SFX stub
|
||||
/// </summary>
|
||||
public uint FileOffset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Size of the file name in characters
|
||||
/// </summary>
|
||||
public uint NameSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unicode-encoded file name
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
}
|
||||
69
SabreTools.Models/AdvancedInstaller/Footer.cs
Normal file
69
SabreTools.Models/AdvancedInstaller/Footer.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
namespace SabreTools.Models.AdvancedInstaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Structure similar to the end of central directory
|
||||
/// header in PKZIP files
|
||||
/// </summary>
|
||||
public class Footer
|
||||
{
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 00 00 00 00
|
||||
/// </remarks>
|
||||
public uint Unknown0 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Pointer to <see cref="Unknown0"/>?
|
||||
/// </summary>
|
||||
public uint FooterOffset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of entries that preceed the footer
|
||||
/// </summary>
|
||||
public uint EntryCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Observed values:
|
||||
/// - 64 00 00 00
|
||||
/// </remarks>
|
||||
public uint Unknown1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Pointer to <see cref="Unknown0"/>?
|
||||
/// </summary>
|
||||
public uint FooterOffset2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset of the start of the file table
|
||||
/// </summary>
|
||||
public uint TablePointer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Offset to the start of the file data
|
||||
/// </summary>
|
||||
public uint FileDataStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Null-terminated hex string that looks
|
||||
/// like a key or other identifier.
|
||||
/// </summary>
|
||||
public string? KeyString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unknown, always zero?
|
||||
/// </summary>
|
||||
public ushort Unknown2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "ADVINSTSFX", null terminated
|
||||
/// </summary>
|
||||
/// <remarks>May have another trailing null after?</remarks>
|
||||
public string? Signature { get; set; }
|
||||
}
|
||||
}
|
||||
21
SabreTools.Models/AdvancedInstaller/SFX.cs
Normal file
21
SabreTools.Models/AdvancedInstaller/SFX.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace SabreTools.Models.AdvancedInstaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the structure at the end of a Caphyon
|
||||
/// Advanced Installer SFX file. These SFX files store
|
||||
/// all files uncompressed sequentially in the overlay
|
||||
/// of an executable.
|
||||
/// </summary>
|
||||
public class SFX
|
||||
{
|
||||
/// <summary>
|
||||
/// Set of file entries
|
||||
/// </summary>
|
||||
public FileEntry[]? Entries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Footer representing the central directory
|
||||
/// </summary>
|
||||
public Footer? Footer { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user