51 Commits
1.7.0 ... 1.7.2

Author SHA1 Message Date
Matt Nadareski
0130a9caee Bump version 2025-09-22 17:26:04 -04:00
Matt Nadareski
da204f129f Remove unnecessary NoWarn 2025-09-22 17:22:32 -04:00
Matt Nadareski
945a62d1f2 Add COFF constants 2025-09-22 15:57:16 -04:00
Matt Nadareski
8ab5088607 Simplify naming in comments 2025-09-22 12:58:02 -04:00
Matt Nadareski
9e9fcac654 Move delay load table because it was missed 2025-09-22 12:39:44 -04:00
Matt Nadareski
76dac1025c Move TODO more out of the way 2025-09-22 12:38:03 -04:00
Matt Nadareski
0ec1cac7cf Remove TODO that was done 2025-09-22 12:36:01 -04:00
Matt Nadareski
6a0b97fdcd Remove meta-tables 2025-09-22 12:34:26 -04:00
Matt Nadareski
66f7adc49a Slightly change description on optional header 2025-09-22 12:19:06 -04:00
Matt Nadareski
4bc685ba23 Move TLS 2025-09-22 12:17:29 -04:00
Matt Nadareski
89ef827251 Move resource 2025-09-22 12:16:47 -04:00
Matt Nadareski
beb42b7e35 Move load configuration 2025-09-22 12:13:08 -04:00
Matt Nadareski
0502808962 This goes in resource entries 2025-09-22 12:07:26 -04:00
Matt Nadareski
e3411d3984 This is also import-related 2025-09-22 12:06:46 -04:00
Matt Nadareski
9d13cb01e3 Move import table 2025-09-22 12:06:05 -04:00
Matt Nadareski
649ea98a52 Move export table 2025-09-22 12:04:06 -04:00
Matt Nadareski
b90d7c5e9a Move debug data table 2025-09-22 12:01:12 -04:00
Matt Nadareski
9def156302 Move delay load directory table 2025-09-22 11:56:11 -04:00
Matt Nadareski
e1db4fc17b Move attribute certificate table 2025-09-22 11:52:28 -04:00
Matt Nadareski
ae4ad5c272 Optional header is partially COFF 2025-09-22 11:38:24 -04:00
Matt Nadareski
5bda523aec Sections are COFF, who knew? 2025-09-22 11:29:39 -04:00
Matt Nadareski
eda099d44e Separate out COFF stuff maybe for later? 2025-09-22 11:26:08 -04:00
Matt Nadareski
b5ac9304a4 Move base relocation to new namespace 2025-09-22 11:14:27 -04:00
Matt Nadareski
b40f84dd4b Move more things to resource entries namespace 2025-09-22 11:09:58 -04:00
Matt Nadareski
4a276fb65e Move MoPaQ encryption constants to IO 2025-09-22 10:37:40 -04:00
Matt Nadareski
973a94b340 Move LZX models to IO 2025-09-22 10:33:33 -04:00
Matt Nadareski
c6062f71eb Move Quantum compression models to IO 2025-09-22 10:29:29 -04:00
Matt Nadareski
fd7746fae3 Move MSZIP "model" to IO 2025-09-22 10:22:38 -04:00
Matt Nadareski
d3c6bdf23f Update Newtonsoft 2025-09-22 09:46:23 -04:00
Matt Nadareski
605a3bf30d Add a bunch of useful constants 2025-09-22 09:35:00 -04:00
Matt Nadareski
710ddc912d Add and update models needed for BOS 2025-09-22 09:06:33 -04:00
HeroponRikiBestest
2f94464b7d Small matroschka model update (#14)
* Small model updates, mainly documentation. Not essential.

* wrong branch lol
2025-09-19 12:09:16 -04:00
Matt Nadareski
b3d9bd3d6b Add some more hashes for fun 2025-09-19 08:29:49 -04:00
Matt Nadareski
c51c16ed2d Add RA extensions to Logiqx (fixes #13) 2025-09-17 09:29:29 -04:00
HeroponRikiBestest
978b6904db Add fileData variable to MatroshkaEntry.cs model (#12)
* Add fileData variable to MatroshkaEntry.cs model

This will be necessary to handle parsing properly in serialization.

* Use PascalCase
2025-09-16 15:30:47 -04:00
Matt Nadareski
d62bd2f60c Cleanup from last PR 2025-09-12 12:54:22 -04:00
Deterous
26f7f4d7da AACS2 support (#11)
* AACS2 support

* Better names

* libaacs links
2025-09-12 12:50:32 -04:00
Matt Nadareski
50a6f9ba89 There 2025-09-10 21:52:09 -04:00
Matt Nadareski
f07c11fb47 Simplify TLS directory 2025-09-09 13:54:19 -04:00
Matt Nadareski
dc47f64ee6 Sync a few notes from Serialization 2025-09-09 13:52:48 -04:00
Matt Nadareski
69006247a9 One more potential constant 2025-09-09 12:32:11 -04:00
Matt Nadareski
9c43b80502 Rename to be more accurate 2025-09-09 12:29:26 -04:00
Matt Nadareski
cbb7563724 Add missing symbol types, make a flag 2025-09-09 11:07:51 -04:00
Matt Nadareski
c7530884b3 Add constant notes 2025-09-09 09:42:55 -04:00
Matt Nadareski
e59c9205d4 Make OptionalHeader a bit more correct 2025-09-09 09:30:43 -04:00
Matt Nadareski
f5859638c2 Move these 2025-09-08 21:09:54 -04:00
Matt Nadareski
84d3740e73 Yeah 2025-09-08 21:07:25 -04:00
Matt Nadareski
517324ab58 Bump version 2025-09-05 09:10:29 -04:00
Matt Nadareski
a02c037995 Remind myself of this 2025-09-02 19:20:59 -04:00
Matt Nadareski
a1890e1fe6 I messed this up too 2025-09-01 16:17:02 -04:00
Matt Nadareski
32c6633788 Fix this naming for later 2025-09-01 15:52:50 -04:00
135 changed files with 2620 additions and 3070 deletions

7
LICENSE Normal file
View File

@@ -0,0 +1,7 @@
Copyright (c) 2018-2025 Matt Nadareski
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -37,6 +37,7 @@ Not all of this information was able to be gathered directly from the files in q
| [IETF](https://www.ietf.org/) | GZIP |
| [Independent Commodore Library](https://petlibrary.tripod.com/) | PKZIP |
| [Ladislav Zezula](http://zezula.net/en/tools/main.html) | MoPaQ |
| [libaacs](https://code.videolan.org/videolan/libaacs/) | AACS |
| [libbdplus](https://github.com/mwgoldsmith/bdplus) | BD+ |
| [libexe](https://github.com/libyal/libexe/) | NewExecutable |
| [MAME](https://github.com/mamedev/mame/) | CHD |

View File

@@ -27,6 +27,20 @@ namespace SabreTools.Models.AACS
/// Section 3.2.5.2, which are only processed by Class II Licensed Products.
/// </summary>
Type10 = 0x000A1003,
/// <summary>
/// Type 2.0 Category C.
/// This is the Media Key Block Type found on "UHD" media (AACS v2.0)
/// </summary>
/// <see href="https://code.videolan.org/videolan/libaacs/-/blob/master/src/libaacs/mkb.h"/>
Type20 = 0x48141003,
/// <summary>
/// Type 2.1 Category C.
/// This is the Media Key Block Type found on "UHD" media (AACS v2.1)
/// </summary>
/// <see href="https://code.videolan.org/videolan/libaacs/-/blob/master/src/libaacs/mkb.h"/>
Type21 = 0x48151003,
}
public enum RecordType : byte
@@ -35,6 +49,7 @@ namespace SabreTools.Models.AACS
ExplicitSubsetDifference = 0x04,
MediaKeyData = 0x05,
SubsetDifferenceIndex = 0x07,
MediaKeyVariantData = 0x0C,
TypeAndVersion = 0x10,
DriveRevocationList = 0x20,
HostRevocationList = 0x21,
@@ -42,5 +57,13 @@ namespace SabreTools.Models.AACS
// Not documented
Copyright = 0x7F,
// Record types only found in UHD media (AACS v2)
// <see href="https://code.videolan.org/videolan/libaacs/-/blob/master/src/devtools/mkb_dump.c"/>
Unknown0x28_AACS2 = 0x28,
DriveRevocationList_AACS2 = 0x30,
HostRevocationList_AACS2 = 0x31,
VerifyMediaKey_AACS2 = 0x86,
EmptyRecord0xF8_AACS2 = 0xF8,
}
}

View File

@@ -0,0 +1,13 @@
namespace SabreTools.Models.AACS
{
/// <summary>
/// This represents any record that does not have a concrete model yet
/// </summary>
public sealed class GenericRecord : Record
{
/// <summary>
/// Unparsed data comprising the record after the header
/// </summary>
public byte[]? Data { get; set; }
}
}

View File

@@ -2,6 +2,8 @@ namespace SabreTools.Models.BDPlus
{
public static class Constants
{
public static readonly byte[] SignatureBytes = [0x42, 0x44, 0x53, 0x56, 0x4D, 0x5F, 0x43, 0x43];
public const string SignatureString = "BDSVM_CC";
}
}

View File

@@ -0,0 +1,9 @@
namespace SabreTools.Models.BZip2
{
public static class Constants
{
public static readonly byte[] SignatureBytes = [0x42, 0x52, 0x68];
public const string SignatureString = "BRh";
}
}

View File

@@ -2,6 +2,8 @@ namespace SabreTools.Models.CHD
{
public static class Constants
{
public static readonly byte[] SignatureBytes = [0x4D, 0x43, 0x6F, 0x6D, 0x70, 0x72, 0x48, 0x44];
public const string SignatureString = "MComprHD";
#region Header Sizes

View File

@@ -0,0 +1,20 @@
namespace SabreTools.Models.COFF
{
public static class Constants
{
/// <summary>
/// Fixed size of <see cref="FileHeader"/>
/// </summary>
public const int FileHeaderSize = 20;
/// <summary>
/// Fixed size of <see cref="SectionHeader"/>
/// </summary>
public const int SectionHeaderSize = 40;
/// <summary>
/// Fixed size of <see cref="SymbolTableEntries.BaseEntry"/>
/// </summary>
public const int SymbolTableEntrySize = 18;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// At the beginning of an object file, or immediately after the signature
@@ -9,7 +9,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class COFFFileHeader
public sealed class FileHeader
{
/// <summary>
/// The number that identifies the type of target machine.

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// COFF line numbers are no longer produced and, in the future, will
@@ -17,7 +17,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Explicit)]
public sealed class COFFLineNumber
public sealed class LineNumber
{
/// <summary>
/// Used when Linenumber is zero: index to symbol table entry for a function.

View File

@@ -0,0 +1,88 @@
namespace SabreTools.Models.COFF
{
/// <summary>
/// Every image file has an optional header that provides information to the loader.
/// This header is optional in the sense that some files (specifically, object files)
/// do not have it. For image files, this header is required. An object file can have
/// an optional header, but generally this header has no function in an object file
/// except to increase its size.
///
/// Note that the size of the optional header is not fixed. The SizeOfOptionalHeader
/// field in the COFF header must be used to validate that a probe into the file for
/// a particular data directory does not go beyond SizeOfOptionalHeader.
///
/// The NumberOfRvaAndSizes field of the optional header should also be used to ensure
/// that no probe for a particular data directory entry goes beyond the optional header.
/// In addition, it is important to validate the optional header magic number for format
/// compatibility.
///
/// The optional header magic number determines whether an image is a PE32 or
/// PE32+ executable.
///
/// PE32+ images allow for a 64-bit address space while limiting the image size to
/// 2 gigabytes. Other PE32+ modifications are addressed in their respective sections.
///
/// The first eight fields of the optional header are standard fields that are defined
/// for every implementation of COFF. These fields contain general information that is
/// useful for loading and running an executable file. They are unchanged for the
/// PE32+ format.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public class OptionalHeader
{
/// <summary>
/// The unsigned integer that identifies the state of the image file. The most
/// common number is 0x10B, which identifies it as a normal executable file.
/// 0x107 identifies it as a ROM image, and 0x20B identifies it as a PE32+ executable.
/// </summary>
public OptionalHeaderMagicNumber Magic { get; set; }
/// <summary>
/// The linker major version number.
/// </summary>
public byte MajorLinkerVersion { get; set; }
/// <summary>
/// The linker minor version number.
/// </summary>
public byte MinorLinkerVersion { get; set; }
/// <summary>
/// The size of the code (text) section, or the sum of all code sections if there
/// are multiple sections.
/// </summary>
public uint SizeOfCode { get; set; }
/// <summary>
/// The size of the initialized data section, or the sum of all such sections if
/// there are multiple data sections.
/// </summary>
public uint SizeOfInitializedData { get; set; }
/// <summary>
/// The size of the uninitialized data section (BSS), or the sum of all such sections
/// if there are multiple BSS sections.
/// </summary>
public uint SizeOfUninitializedData { get; set; }
/// <summary>
/// The address of the entry point relative to the image base when the executable file
/// is loaded into memory. For program images, this is the starting address. For
/// device drivers, this is the address of the initialization function. An entry point
/// is optional for DLLs. When no entry point is present, this field must be zero.
/// </summary>
public uint AddressOfEntryPoint { get; set; }
/// <summary>
/// The address that is relative to the image base of the beginning-of-code section when
/// it is loaded into memory.
/// </summary>
public uint BaseOfCode { get; set; }
/// <summary>
/// The address that is relative to the image base of the beginning-of-data section when
/// it is loaded into memory.
/// </summary>
public uint BaseOfData { get; set; }
}
}

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// Object files contain COFF relocations, which specify how the section data
@@ -18,7 +18,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class COFFRelocation
public sealed class Relocation
{
/// <summary>
/// The address of the item to which relocation is applied. This is the

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// Each row of the section table is, in effect, a section header. This table
@@ -29,7 +29,8 @@
/// characters. Long names in object files are truncated if they are emitted
/// to an executable file.
/// </summary>
public byte[]? Name { get; set; } = new byte[8];
/// <remarks>8 bytes</remarks>
public byte[]? Name { get; set; }
/// <summary>
/// The total size of the section when loaded into memory. If this value is
@@ -100,11 +101,11 @@
/// <summary>
/// COFF Relocations (Object Only)
/// </summary>
public COFFRelocation[]? COFFRelocations { get; set; }
public Relocation[]? COFFRelocations { get; set; }
/// <summary>
/// COFF Line Numbers (Deprecated)
/// </summary>
public COFFLineNumber[]? COFFLineNumbers { get; set; }
public LineNumber[]? COFFLineNumbers { get; set; }
}
}

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.COFF
{
/// <summary>
/// Immediately following the COFF symbol table is the COFF string table. The
@@ -6,7 +6,7 @@
/// COFF header and adding the number of symbols multiplied by the size of a symbol.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class COFFStringTable
public sealed class StringTable
{
/// <summary>
/// At the beginning of the COFF string table are 4 bytes that contain the

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// The symbol table in this section is inherited from the traditional

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 6: CLR Token Definition (Object Only)
@@ -12,22 +12,22 @@ namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
/// <summary>
/// Must be IMAGE_AUX_SYMBOL_TYPE_TOKEN_DEF (1).
/// </summary>
public byte AuxFormat6AuxType { get; set; }
public byte AuxType { get; set; }
/// <summary>
/// Reserved, must be zero.
/// </summary>
public byte AuxFormat6Reserved1 { get; set; }
public byte Reserved1 { get; set; }
/// <summary>
/// The symbol index of the COFF symbol to which this CLR token definition refers.
/// </summary>
public uint AuxFormat6SymbolTableIndex { get; set; }
public uint SymbolTableIndex { get; set; }
/// <summary>
/// Reserved, must be zero.
/// </summary>
/// <remarks>12 bytes</remarks>
public byte[]? AuxFormat6Reserved2 { get; set; }
public byte[]? Reserved2 { get; set; }
}
}

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 2: .bf and .ef Symbols

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 4: Files

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 1: Function Definitions

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 5: Section Definitions

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// A standard record defines a symbol or name.
@@ -37,7 +37,7 @@ namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
/// The signed integer that identifies the section, using a one-based index
/// into the section table. Some values have special meaning.
/// </summary>
public ushort SectionNumber { get; set; }
public SectionNumber SectionNumber { get; set; }
/// <summary>
/// A number that represents type. Microsoft tools set this field to 0x20

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.COFFSymbolTableEntries
namespace SabreTools.Models.COFF.SymbolTableEntries
{
/// <summary>
/// Auxiliary Format 3: Weak Externals

View File

@@ -34,6 +34,18 @@ namespace SabreTools.Models.ClrMamePro
#region Hash Extensions
/// <remarks>md2; Appears after CRC</remarks>
public string? MD2 { get; set; }
/// <remarks>md4; Appears after MD2</remarks>
public string? MD4 { get; set; }
/// <remarks>ripemd128; Appears after MD5</remarks>
public string? RIPEMD128 { get; set; }
/// <remarks>ripemd160; Appears after RIPEMD128</remarks>
public string? RIPEMD160 { get; set; }
/// <remarks>sha256; Also in No-Intro spec; Appears after SHA1</remarks>
public string? SHA256 { get; set; }

View File

@@ -1,58 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// An aligned offset block is identical to the verbatim block except for the presence of the aligned offset
/// tree preceding the other trees.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class AlignedOffsetBlockData : BlockData
{
/// <summary>
/// Aligned offset tree
/// </summary>
/// <remarks>8 elements, 3 bits each</remarks>
public byte[]? AlignedOffsetTree { get; set; }
/// <summary>
/// Pretree for first 256 elements of main tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeFirst256 { get; set; }
/// <summary>
/// Path lengths of first 256 elements of main tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsFirst256 { get; set; }
/// <summary>
/// Pretree for remainder of main tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeRemainder { get; set; }
/// <summary>
/// Path lengths of remaining elements of main tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsRemainder { get; set; }
/// <summary>
/// Pretree for length tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeLengthTree { get; set; }
/// <summary>
/// Path lengths of elements in length tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsLengthTree { get; set; }
/// <summary>
/// Token sequence (matches and literals)
/// </summary>
/// <remarks>Variable</remarks>
public byte[]? TokenSequence { get; set; }
}
}

View File

@@ -1,24 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// An LZXD block represents a sequence of compressed data that is encoded with the same set of
/// Huffman trees, or a sequence of uncompressed data. There can be one or more LZXD blocks in a
/// compressed stream, each with its own set of Huffman trees. Blocks do not have to start or end on a
/// chunk boundary; blocks can span multiple chunks, or a single chunk can contain multiple blocks. The
/// number of chunks is related to the size of the data being compressed, while the number of blocks is
/// related to how well the data is compressed.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class Block
{
/// <summary>
/// Block header
/// </summary>
public BlockHeader? Header { get; set; }
/// <summary>
/// Block data
/// </summary>
public BlockData? BlockData { get; set; }
}
}

View File

@@ -1,8 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public abstract class BlockData
{
// No common fields between all block data
}
}

View File

@@ -1,33 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// The Block Type field, as specified in section 2.3.1.1, indicates which type of block follows,
/// and the Block Size field, as specified in section 2.3.1.2, indicates the number of
/// uncompressed bytes represented by the block. Following the generic block
/// header is a type-specific header that describes the remainder of the block.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class BlockHeader
{
/// <remarks>3 bits</remarks>
public BlockType BlockType { get; set; }
/// <summary>
/// Block size is the high 8 bits of 24
/// </summary>
/// <remarks>8 bits</remarks>
public byte BlockSizeMSB { get; set; }
/// <summary>
/// Block size is the middle 8 bits of 24
/// </summary>
/// <remarks>8 bits</remarks>
public byte BlockSizeByte2 { get; set; }
/// <summary>
/// Block size is the low 8 bits of 24
/// </summary>
/// <remarks>8 bits</remarks>
public byte BlocksizeLSB { get; set; }
}
}

View File

@@ -1,25 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// The LZXD compressor emits chunks of compressed data. A chunk represents exactly 32 KB of
/// uncompressed data until the last chunk in the stream, which can represent less than 32 KB. To
/// ensure that an exact number of input bytes represent an exact number of output bytes for each
/// chunk, after each 32 KB of uncompressed data is represented in the output compressed bitstream, the
/// output bitstream is padded with up to 15 bits of zeros to realign the bitstream on a 16-bit boundary
/// (even byte boundary) for the next 32 KB of data. This results in a compressed chunk of a byte-aligned
/// size. The compressed chunk could be smaller than 32 KB or larger than 32 KB if the data is
/// incompressible when the chunk is not the last one.
/// </summary>
public class Chunk
{
/// <summary>
/// Chunk header
/// </summary>
public ChunkHeader? Header { get; set; }
/// <summary>
/// Block headers and data
/// </summary>
public Block[]? Blocks { get; set; }
}
}

View File

@@ -1,46 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// The LZXD compressor emits chunks of compressed data. A chunk represents exactly 32 KB of
/// uncompressed data until the last chunk in the stream, which can represent less than 32 KB. To
/// ensure that an exact number of input bytes represent an exact number of output bytes for each
/// chunk, after each 32 KB of uncompressed data is represented in the output compressed bitstream, the
/// output bitstream is padded with up to 15 bits of zeros to realign the bitstream on a 16-bit boundary
/// (even byte boundary) for the next 32 KB of data. This results in a compressed chunk of a byte-aligned
/// size. The compressed chunk could be smaller than 32 KB or larger than 32 KB if the data is
/// incompressible when the chunk is not the last one.
/// </summary>
public class ChunkHeader
{
/// <summary>
/// The LZXD engine encodes a compressed, chunk-size prefix field preceding each compressed chunk in
/// the compressed byte stream. The compressed, chunk-size prefix field is a byte aligned, little-endian,
/// 16-bit field. The chunk prefix chain could be followed in the compressed stream without
/// decompressing any data. The next chunk prefix is at a location computed by the absolute byte offset
/// location of this chunk prefix plus 2 (for the size of the chunk-size prefix field) plus the current chunk
/// size.
/// </summary>
public ushort ChunkSize { get; set; }
/// <summary>
/// The first bit in the first chunk in the LZXD bitstream (following the 2-byte, chunk-size prefix described
/// in section 2.2.1) indicates the presence or absence of two 16-bit fields immediately following the
/// single bit. If the bit is set, E8 translation is enabled for all the following chunks in the stream using the
/// 32-bit value derived from the two 16-bit fields as the E8_file_size provided to the compressor when E8
/// translation was enabled. Note that E8_file_size is completely independent of the length of the
/// uncompressed data. E8 call translation is disabled after the 32,768th chunk (after 1 gigabyte (GB) of
/// uncompressed data).
/// </summary>
public byte E8Translation { get; set; }
/// <summary>
/// E8 translation size, high WORD
/// </summary>
public ushort? TranslationSizeHighWord { get; set; }
/// <summary>
/// E8 translation size, low WORD
/// </summary>
public ushort? TranslationSizeLowWord { get; set; }
}
}

View File

@@ -1,38 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
public static class Constants
{
/* some constants defined by the LZX specification */
public const int LZX_MIN_MATCH = 2;
public const int LZX_MAX_MATCH = 257;
public const int LZX_NUM_CHARS = 256;
public const int LZX_PRETREE_NUM_ELEMENTS = 20;
/// <summary>
/// aligned offset tree #elements
/// </summary>
public const int LZX_ALIGNED_NUM_ELEMENTS = 8;
/// <summary>
/// this one missing from spec!
/// </summary>
public const int LZX_NUM_PRIMARY_LENGTHS = 7;
/// <summary>
/// length tree #elements
/// </summary>
public const int LZX_NUM_SECONDARY_LENGTHS = 249;
/* LZX huffman defines: tweak tablebits as desired */
public const int LZX_PRETREE_MAXSYMBOLS = LZX_PRETREE_NUM_ELEMENTS;
public const int LZX_PRETREE_TABLEBITS = 6;
public const int LZX_MAINTREE_MAXSYMBOLS = LZX_NUM_CHARS + 50 * 8;
public const int LZX_MAINTREE_TABLEBITS = 12;
public const int LZX_LENGTH_MAXSYMBOLS = LZX_NUM_SECONDARY_LENGTHS + 1;
public const int LZX_LENGTH_TABLEBITS = 12;
public const int LZX_ALIGNED_MAXSYMBOLS = LZX_ALIGNED_NUM_ELEMENTS;
public const int LZX_ALIGNED_TABLEBITS = 7;
public const int LZX_LENTABLE_SAFETY = 64; /* we allow length table decoding overruns */
}
}

View File

@@ -1,48 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// 3-bit block type
/// </summary>
public enum BlockType : byte
{
/// <summary>
/// Not valid
/// </summary>
INVALID_0 = 0b000,
/// <summary>
/// Verbatim block
/// </summary>
Verbatim = 0b001,
/// <summary>
/// Aligned offset block
/// </summary>
AlignedOffset = 0b010,
/// <summary>
/// Uncompressed block
/// </summary>
Uncompressed = 0b011,
/// <summary>
/// Not valid
/// </summary>
INVALID_4 = 0b100,
/// <summary>
/// Not valid
/// </summary>
INVALID_5 = 0b101,
/// <summary>
/// Not valid
/// </summary>
INVALID_6 = 0b110,
/// <summary>
/// Not valid
/// </summary>
INVALID_7 = 0b111,
}
}

View File

@@ -1,54 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// Following the generic block header, an uncompressed block begins with 1 to 16 bits of zero padding
/// to align the bit buffer on a 16-bit boundary. At this point, the bitstream ends and a byte stream
/// begins. Following the zero padding, new 32-bit values for R0, R1, and R2 are output in little-endian
/// form, followed by the uncompressed data bytes themselves. Finally, if the uncompressed data length
/// is odd, one extra byte of zero padding is encoded to realign the following bitstream.
///
/// Then the bitstream of byte-swapped 16-bit integers resumes for the next Block Type field (if there
/// are subsequent blocks).
///
/// The decoded R0, R1, and R2 values are used as initial repeated offset values to decode the
/// subsequent compressed block if present.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class UncompressedBlockData : BlockData
{
/// <summary>
/// Padding to align following field on 16-bit boundary
/// </summary>
/// <remarks>Bits have a value of zero</remarks>
public ushort PaddingBits { get; set; }
/// <summary>
/// Least significant to most significant byte (little-endian DWORD ([MS-DTYP]))
/// </summary>
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
public uint R0 { get; set; }
/// <summary>
/// Least significant to most significant byte (little-endian DWORD)
/// </summary>
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
public uint R1 { get; set; }
/// <summary>
/// Least significant to most significant byte (little-endian DWORD)
/// </summary>
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
public uint R2 { get; set; }
/// <summary>
/// Can use the direct memcpy function, as specified in [IEEE1003.1]
/// </summary>
/// <remarks>Encoded directly in the byte stream, not in the bitstream of byte-swapped 16-bit words</remarks>
public byte[]? RawDataBytes { get; set; }
/// <summary>
/// Only if uncompressed size is odd
/// </summary>
public byte AlignmentByte { get; set; }
}
}

View File

@@ -1,51 +0,0 @@
namespace SabreTools.Models.Compression.LZX
{
/// <summary>
/// The fields of a verbatim block that follow the generic block header
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-PATCH/%5bMS-PATCH%5d.pdf"/>
public class VerbatimBlockData : BlockData
{
/// <summary>
/// Pretree for first 256 elements of main tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeFirst256 { get; set; }
/// <summary>
/// Path lengths of first 256 elements of main tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsFirst256 { get; set; }
/// <summary>
/// Pretree for remainder of main tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeRemainder { get; set; }
/// <summary>
/// Path lengths of remaining elements of main tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsRemainder { get; set; }
/// <summary>
/// Pretree for length tree
/// </summary>
/// <remarks>20 elements, 4 bits each</remarks>
public byte[]? PretreeLengthTree { get; set; }
/// <summary>
/// Path lengths of elements in length tree
/// </summary>
/// <remarks>Encoded using pretree</remarks>
public int[]? PathLengthsLengthTree { get; set; }
/// <summary>
/// Token sequence (matches and literals)
/// </summary>
/// <remarks>Variable</remarks>
public byte[]? TokenSequence { get; set; }
}
}

View File

@@ -1,28 +0,0 @@
namespace SabreTools.Models.Compression.MSZIP
{
/// <summary>
/// Each MSZIP block MUST consist of a 2-byte MSZIP signature and one or more RFC 1951 blocks. The
/// 2-byte MSZIP signature MUST consist of the bytes 0x43 and 0x4B. The MSZIP signature MUST be
/// the first 2 bytes in the MSZIP block. The MSZIP signature is shown in the following packet diagram.
///
/// Each MSZIP block is the result of a single deflate compression operation, as defined in [RFC1951].
/// The compressor that performs the compression operation MUST generate one or more RFC 1951
/// blocks, as defined in [RFC1951]. The number, deflation mode, and type of RFC 1951 blocks in each
/// MSZIP block is determined by the compressor, as defined in [RFC1951]. The last RFC 1951 block in
/// each MSZIP block MUST be marked as the "end" of the stream(1), as defined by [RFC1951]
/// section 3.2.3. Decoding trees MUST be discarded after each RFC 1951 block, but the history buffer
/// MUST be maintained.Each MSZIP block MUST represent no more than 32 KB of uncompressed data.
///
/// The maximum compressed size of each MSZIP block is 32 KB + 12 bytes. This enables the MSZIP
/// block to contain 32 KB of data split between two noncompressed RFC 1951 blocks, each of which
/// has a value of BTYPE = 00.
/// </summary>
/// <see href="https://interoperability.blob.core.windows.net/files/MS-MCI/%5bMS-MCI%5d.pdf"/>
public class BlockHeader
{
/// <summary>
/// 'CK'
/// </summary>
public ushort Signature { get; set; }
}
}

View File

@@ -1,50 +0,0 @@
namespace SabreTools.Models.Compression.Quantum
{
/// <see href="http://www.russotto.net/quantumcomp.html"/>
public static class Constants
{
public static readonly int[] PositionSlot =
[
0x00000, 0x00001, 0x00002, 0x00003, 0x00004, 0x00006, 0x00008, 0x0000c,
0x00010, 0x00018, 0x00020, 0x00030, 0x00040, 0x00060, 0x00080, 0x000c0,
0x00100, 0x00180, 0x00200, 0x00300, 0x00400, 0x00600, 0x00800, 0x00c00,
0x01000, 0x01800, 0x02000, 0x03000, 0x04000, 0x06000, 0x08000, 0x0c000,
0x10000, 0x18000, 0x20000, 0x30000, 0x40000, 0x60000, 0x80000, 0xc0000,
0x100000, 0x180000
];
public static readonly int[] PositionExtraBits =
[
0, 0, 0, 0, 1, 1, 2, 2,
3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10,
11, 11, 12, 12, 13, 13, 14, 14,
15, 15, 16, 16, 17, 17, 18, 18,
19, 19
];
public static readonly int[] LengthSlot =
[
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x08,
0x0a, 0x0c, 0x0e, 0x12, 0x16, 0x1a, 0x1e, 0x26,
0x2e, 0x36, 0x3e, 0x4e, 0x5e, 0x6e, 0x7e, 0x9e,
0xbe, 0xde, 0xfe
];
public static readonly int[] LengthExtraBits =
[
0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 2, 2, 2, 2, 3, 3,
3, 3, 4, 4, 4, 4, 5, 5,
5, 5, 0
];
/// <summary>
/// Number of position slots for (tsize - 10)
/// </summary>
public static readonly int[] NumPositionSlots =
[
20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42
];
}
}

View File

@@ -1,45 +0,0 @@
namespace SabreTools.Models.Compression.Quantum
{
public enum SelectorModel
{
/// <summary>
/// Literal model, 64 entries, start at symbol 0
/// </summary>
SELECTOR_0 = 0,
/// <summary>
/// Literal model, 64 entries, start at symbol 64
/// </summary>
SELECTOR_1 = 1,
/// <summary>
/// Literal model, 64 entries, start at symbol 128
/// </summary>
SELECTOR_2 = 2,
/// <summary>
/// Literal model, 64 entries, start at symbol 192
/// </summary>
SELECTOR_3 = 3,
/// <summary>
/// LZ model, 3 character matches, max 24 entries, start at symbol 0
/// </summary>
SELECTOR_4 = 4,
/// <summary>
/// LZ model, 4 character matches, max 36 entries, start at symbol 0
/// </summary>
SELECTOR_5 = 5,
/// <summary>
/// LZ model, 5+ character matches, max 42 entries, start at symbol 0
/// </summary>
SELECTOR_6_POSITION = 6,
/// <summary>
/// LZ model, 5+ character matches, 27 entries, start at symbol 0
/// </summary>
SELECTOR_6_LENGTH = 7,
}
}

View File

@@ -1,24 +0,0 @@
namespace SabreTools.Models.Compression.Quantum
{
/// <see href="http://www.russotto.net/quantumcomp.html"/>
public sealed class Model
{
public int Entries { get; set; }
/// <remarks>
/// All the models are initialized with the symbols in symbol
/// order in the table, and with every symbol in the table
/// having a frequency of 1
/// </remarks>
public ModelSymbol[]? Symbols { get; set; }
/// <remarks>
/// The initial total frequency is equal to the number of entries
/// in the table
/// </remarks>
public int TotalFrequency { get; set; }
/// <remarks>The initial time_to_reorder value is 4</remarks>
public int TimeToReorder { get; set; }
}
}

View File

@@ -1,15 +0,0 @@
namespace SabreTools.Models.Compression.Quantum
{
/// <see href="http://www.russotto.net/quantumcomp.html"/>
public sealed class ModelSymbol
{
public ushort Symbol { get; set; }
/// <summary>
/// The cumulative frequency is the frequency of all the symbols
/// which are at a higher index in the table than that symbol —
/// thus the last entry in the table has a cumulative frequency of 0.
/// </summary>
public ushort CumulativeFrequency { get; set; }
}
}

View File

@@ -11,6 +11,10 @@ namespace SabreTools.Models.Hashfile
public MD5[]? MD5 { get; set; }
public RIPEMD128[]? RIPEMD128 { get; set; }
public RIPEMD160[]? RIPEMD160 { get; set; }
public SHA1[]? SHA1 { get; set; }
public SHA256[]? SHA256 { get; set; }

View File

@@ -0,0 +1,14 @@
namespace SabreTools.Models.Hashfile
{
/// <summary>
/// RIPEMD128 File
/// </summary>
public class RIPEMD128
{
[Required]
public string? Hash { get; set; }
[Required]
public string? File { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
namespace SabreTools.Models.Hashfile
{
/// <summary>
/// RIPEMD160 File
/// </summary>
public class RIPEMD160
{
[Required]
public string? Hash { get; set; }
[Required]
public string? File { get; set; }
}
}

View File

@@ -3,5 +3,7 @@ namespace SabreTools.Models.InstallShieldArchiveV3
public static class Constants
{
public const uint HeaderSignature = 0x8C655D13;
public static readonly byte[] HeaderSignatureBytes = [0x13, 0x5D, 0x65, 0x8C];
}
}

View File

@@ -0,0 +1,9 @@
namespace SabreTools.Models.LDSCRYPT
{
public static class Constants
{
public static readonly byte[] SignatureBytes = [0x4C, 0x44, 0x53, 0x43, 0x52, 0x59, 0x50, 0x54];
public const string SignatureString = "LDSCRYPT";
}
}

View File

@@ -0,0 +1,10 @@
namespace SabreTools.Models.LDSCRYPT
{
/// <summary>
/// This is a placeholder model for future work
/// </summary>
public class EncryptedFile
{
}
}

View File

@@ -111,5 +111,13 @@ namespace SabreTools.Models.Logiqx
/// <remarks>MAME extension</remarks>
[XmlElement("softwarelist")]
public SoftwareList[]? SoftwareList { get; set; }
/// <remarks>RetroAchievements extension</remarks>
[XmlAttribute("url")]
public string? Url { get; set; }
/// <remarks>RetroAchievements extension</remarks>
[XmlAttribute("hash")]
public string? Hash { get; set; }
}
}

View File

@@ -17,9 +17,25 @@ namespace SabreTools.Models.Logiqx
[XmlAttribute("crc")]
public string? CRC { get; set; }
/// <remarks>Hash extension</remarks>
[XmlAttribute("md2")]
public string? MD2 { get; set; }
/// <remarks>Hash extension</remarks>
[XmlAttribute("md4")]
public string? MD4 { get; set; }
[XmlAttribute("md5")]
public string? MD5 { get; set; }
/// <remarks>Hash extension</remarks>
[XmlAttribute("ripemd128")]
public string? RIPEMD128 { get; set; }
/// <remarks>Hash extension</remarks>
[XmlAttribute("ripemd160")]
public string? RIPEMD160 { get; set; }
[XmlAttribute("sha1")]
public string? SHA1 { get; set; }

View File

@@ -113,6 +113,9 @@ namespace SabreTools.Models.Metadata
/// <remarks>string</remarks>
public const string GenMSXIDKey = "genmsxid";
/// <remarks>string</remarks>
public const string HashKey = "hash";
/// <remarks>string</remarks>
public const string HistoryKey = "history";
@@ -260,6 +263,9 @@ namespace SabreTools.Models.Metadata
[NoFilter]
public const string TruripKey = "trurip";
/// <remarks>string</remarks>
public const string UrlKey = "url";
/// <remarks>Video[]</remarks>
[NoFilter]
public const string VideoKey = "video";

View File

@@ -182,6 +182,12 @@ namespace SabreTools.Models.Metadata
/// <remarks>string; OpenMSX.RomBase</remarks>
public const string RemarkKey = "remark";
/// <remarks>string</remarks>
public const string RIPEMD128Key = "ripemd128";
/// <remarks>string</remarks>
public const string RIPEMD160Key = "ripemd160";
/// <remarks>string, possibly long; ArchiveDotOrg.File</remarks>
public const string RotationKey = "rotation";

View File

@@ -68,8 +68,6 @@ namespace SabreTools.Models.MoPaQ
#region Encryption
public const uint MPQ_HASH_KEY2_MIX = 0x400;
/// <summary>
/// Obtained by HashString("(block table)", MPQ_HASH_FILE_KEY)
/// </summary>
@@ -80,8 +78,6 @@ namespace SabreTools.Models.MoPaQ
/// </summary>
public const uint MPQ_KEY_HASH_TABLE = 0xC3AF3770;
public const uint STORM_BUFFER_SIZE = 0x500;
#endregion
}
}

View File

@@ -3,20 +3,32 @@ namespace SabreTools.Models.PFF
/// <see href="https://devilsclaws.net/download/file-pff-new-bz2"/>
public static class Constants
{
public static readonly byte[] Version0SignatureBytes = [0x50, 0x46, 0x46, 0x30];
public const string Version0SignatureString = "PFF0";
public const uint Version0HSegmentSize = 0x00000020;
// Version 1 not confirmed
// public const string Version1SignatureString = "PFF1";
// public const uint Version1SegmentSize = 0x00000020;
public static readonly byte[] Version2SignatureBytes = [0x50, 0x46, 0x46, 0x32];
public const string Version2SignatureString = "PFF2";
public const uint Version2SegmentSize = 0x00000020;
public static readonly byte[] Version3SignatureBytes = [0x50, 0x46, 0x46, 0x33];
public const string Version3SignatureString = "PFF3";
public const uint Version3SegmentSize = 0x00000024;
public static readonly byte[] Version4SignatureBytes = [0x50, 0x46, 0x46, 0x34];
public const string Version4SignatureString = "PFF4";
public const uint Version4SegmentSize = 0x00000028;
public const string FooterKingTag = "KING";

View File

@@ -107,9 +107,9 @@ namespace SabreTools.Models.PKZIP
public string? FileName { get; set; }
/// <summary>
/// Extra field (variable size)
/// Extra fields (variable size)
/// </summary>
public ExtensibleDataField? ExtraField { get; set; }
public ExtensibleDataField[]? ExtraFields { get; set; }
/// <summary>
/// File comment (variable size)

View File

@@ -70,8 +70,8 @@ namespace SabreTools.Models.PKZIP
public string? FileName { get; set; }
/// <summary>
/// Extra field (variable size)
/// Extra fields (variable size)
/// </summary>
public ExtensibleDataField? ExtraField { get; set; }
public ExtensibleDataField[]? ExtraFields { get; set; }
}
}

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.AttributeCertificate
{
/// <summary>
/// Attribute certificates can be associated with an image by adding an attribute
@@ -37,7 +37,7 @@
/// the remainder of this section.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class AttributeCertificateTableEntry
public sealed class Entry
{
/// <summary>
/// Specifies the length of the attribute certificate entry.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.BaseRelocation
{
/// <summary>
/// The base relocation table contains entries for all base relocations in
@@ -18,7 +18,7 @@
/// relocations do not have to be applied.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class BaseRelocationBlock
public sealed class Block
{
/// <summary>
/// The image base plus the page RVA is added to each offset to create
@@ -46,6 +46,6 @@
/// in the Page RVA field for the block. This offset
/// specifies where the base relocation is to be applied.
/// </summary>
public BaseRelocationTypeOffsetFieldEntry[]? TypeOffsetFieldEntries { get; set; }
public TypeOffsetFieldEntry[]? TypeOffsetFieldEntries { get; set; }
}
}

View File

@@ -1,10 +1,10 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.BaseRelocation
{
/// <summary>
/// Type or Offset field entry is a WORD (2 bytes).
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class BaseRelocationTypeOffsetFieldEntry
public sealed class TypeOffsetFieldEntry
{
/// <summary>
/// Stored in the high 4 bits of the WORD, a value that indicates the type

View File

@@ -1,5 +1,7 @@
namespace SabreTools.Models.PortableExecutable
{
// TODO: Add more constants around sizes
// - Debug Directory entry size is a constant value of 28 (0x1C)
public static class Constants
{
public static readonly byte[] SignatureBytes = [0x50, 0x45, 0x00, 0x00];

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.DebugData
{
/// <summary>
/// Image files contain an optional debug directory that indicates what form
@@ -20,7 +20,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DebugDirectoryEntry
public sealed class Entry
{
/// <summary>
/// Reserved, must be zero.

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.DebugData
{
/// <summary>
/// PDB 2.0 files

View File

@@ -1,7 +1,7 @@
using System;
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.DebugData
{
/// <summary>
/// This file describes the format of the pdb (Program Database) files of the "RSDS"

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.DebugData
{
/// <summary>
/// The .debug section is used in object files to contain compiler-generated debug
@@ -15,7 +15,7 @@
/// is mapped in the address space.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class DebugTable
public sealed class Table
{
/// <summary>
/// Image files contain an optional debug directory that indicates what form
@@ -33,6 +33,6 @@
/// file and is not mapped into the run-time address space). If it is mapped,
/// the RVA is its address.
/// </summary>
public DebugDirectoryEntry[]? DebugDirectoryTable { get; set; }
public Entry[]? DebugDirectoryTable { get; set; }
}
}

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.DelayLoad
{
/// <summary>
/// The delay-load directory table is the counterpart to the import directory
@@ -9,7 +9,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Sequential)]
public sealed class DelayLoadDirectoryTable
public sealed class DirectoryTable
{
/// <summary>
/// Must be zero.
@@ -30,7 +30,7 @@ namespace SabreTools.Models.PortableExecutable
/// The name of the DLL to be delay-loaded resides in the read-only data
/// section of the image. It is referenced through the szName field.
/// </remarks>
public uint Name;
public uint NameRVA;
/// <summary>
/// The RVA of the module handle (in the data section of the image) of the DLL

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,5 @@
using System.Collections.Generic;
namespace SabreTools.Models.PortableExecutable
{
/// <summary>
@@ -22,62 +24,196 @@ namespace SabreTools.Models.PortableExecutable
public string? Signature { get; set; }
/// <summary>
/// COFF file header
/// File header
/// </summary>
public COFFFileHeader? COFFFileHeader { get; set; }
public COFF.FileHeader? FileHeader { get; set; }
/// <summary>
/// Optional header
/// Microsoft extended optional header
/// </summary>
public OptionalHeader? OptionalHeader { get; set; }
/// <summary>
/// Section table
/// </summary>
public COFF.SectionHeader[]? SectionTable { get; set; }
/// <summary>
/// Symbol table
/// </summary>
public COFF.SymbolTableEntries.BaseEntry[]? SymbolTable { get; set; }
/// <summary>
/// String table
/// </summary>
public COFF.StringTable? StringTable { get; set; }
#region Data Directories
/// <summary>
/// The export data section, named .edata, contains information about symbols that other images
/// can access through dynamic linking. Exported symbols are generally found in DLLs, but DLLs
/// can also import symbols.
///
/// An overview of the general structure of the export section is described below. The tables
/// described are usually contiguous in the file in the order shown (though this is not
/// required). Only the export directory table and export address table are required to export
/// symbols as ordinals. (An ordinal is an export that is accessed directly by its export
/// address table index.) The name pointer table, ordinal table, and export name table all
/// exist to support use of export names.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
#region Export Table (.edata)
/// <summary>
/// A table with just one row (unlike the debug directory). This table indicates the
/// locations and sizes of the other export tables.
/// </summary>
public Export.DirectoryTable? ExportDirectoryTable { get; set; }
/// <summary>
/// An array of RVAs of exported symbols. These are the actual addresses of the exported
/// functions and data within the executable code and data sections. Other image files
/// can import a symbol by using an index to this table (an ordinal) or, optionally, by
/// using the public name that corresponds to the ordinal if a public name is defined.
/// </summary>
public Export.AddressTableEntry[]? ExportAddressTable { get; set; }
/// <summary>
/// An array of pointers to the public export names, sorted in ascending order.
/// </summary>
public Export.NamePointerTable? NamePointerTable { get; set; }
/// <summary>
/// An array of the ordinals that correspond to members of the name pointer table. The
/// correspondence is by position; therefore, the name pointer table and the ordinal table
/// must have the same number of members. Each ordinal is an index into the export address
/// table.
/// </summary>
public Export.OrdinalTable? OrdinalTable { get; set; }
/// <summary>
/// A series of null-terminated ASCII strings. Members of the name pointer table point into
/// this area. These names are the public names through which the symbols are imported and
/// exported; they are not necessarily the same as the private names that are used within
/// the image file.
/// </summary>
public Export.NameTable? ExportNameTable { get; set; }
#endregion
/// <summary>
/// All image files that import symbols, including virtually all executable (EXE) files,
/// have an .idata section. A typical file layout for the import information follows:
///
/// - Directory Table
/// Null Directory Entry
/// - DLL1 Import Lookup Table
/// Null
/// - DLL2 Import Lookup Table
/// Null
/// - DLL3 Import Lookup Table
/// Null
/// - Hint-Name Table
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
#region Import Table (.idata) and Import Address Table
/// <summary>
/// The import information begins with the import directory table, which describes the
/// remainder of the import information.
/// </summary>
public Import.DirectoryTableEntry[]? ImportDirectoryTable { get; set; }
/// <summary>
/// An import lookup table is an array of 32-bit numbers for PE32 or an array of 64-bit
/// numbers for PE32+.
/// </summary>
public Dictionary<int, Import.LookupTableEntry[]?>? ImportLookupTables { get; set; }
/// <summary>
/// These addresses are the actual memory addresses of the symbols, although technically
/// they are still called "virtual addresses".
/// </summary>
public Dictionary<int, Import.AddressTableEntry[]?>? ImportAddressTables { get; set; }
/// <summary>
/// One hint/name table suffices for the entire import section.
/// </summary>
public Import.HintNameTableEntry[]? HintNameTable { get; set; }
#endregion
#region Resource Table (.rsrc)
/// <summary>
/// Resource directory table (.rsrc)
/// </summary>
public Resource.DirectoryTable? ResourceDirectoryTable { get; set; }
#endregion
// TODO: Handle Exception Table
#region Certificate Table
/// <summary>
/// Attribute certificate table
/// </summary>
public AttributeCertificate.Entry[]? AttributeCertificateTable { get; set; }
#endregion
#region Base Relocation Table (.reloc)
/// <summary>
/// Base relocation table
/// </summary>
public BaseRelocation.Block[]? BaseRelocationTable { get; set; }
#endregion
#region Debug Data (.debug*)
/// <summary>
/// Debug table
/// </summary>
public DebugData.Table? DebugTable { get; set; }
#endregion
// TODO: Handle Architecture
// TODO: Handle Global Ptr
// TODO: Thread Local Storage (.tls)
// TODO: Load Configuration Table
// TODO: Bound Import Table
#region Delay Load Table
/// <summary>
/// Delay-load directory table
/// </summary>
public DelayLoad.DirectoryTable? DelayLoadDirectoryTable { get; set; }
#endregion
// TODO: CLR Runtime Header (.cormeta)
// TODO: Reserved
#endregion
#region Named Sections
// TODO: Support grouped sections in section reading and parsing
// https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#grouped-sections-object-only
// Grouped sections are ordered and mean that the data in the sections contributes
// to the "base" section (the one without the "$X" suffix). This may negatively impact
// the use of some of the different types of executables.
/// <summary>
/// Section table
/// </summary>
public SectionHeader[]? SectionTable { get; set; }
/// <summary>
/// COFF symbol table
/// </summary>
public COFFSymbolTableEntries.BaseEntry[]? COFFSymbolTable { get; set; }
/// <summary>
/// COFF string table
/// </summary>
public COFFStringTable? COFFStringTable { get; set; }
/// <summary>
/// Attribute certificate table
/// </summary>
public AttributeCertificateTableEntry[]? AttributeCertificateTable { get; set; }
/// <summary>
/// Delay-load directory table
/// </summary>
public DelayLoadDirectoryTable? DelayLoadDirectoryTable { get; set; }
#region Named Sections
// .cormeta - CLR metadata is stored in this section. It is used to indicate that
// the object file contains managed code. The format of the metadata is not
// documented, but can be handed to the CLR interfaces for handling metadata.
/// <summary>
/// Base relocation table (.reloc)
/// </summary>
public BaseRelocationBlock[]? BaseRelocationTable { get; set; }
/// <summary>
/// Debug table (.debug*)
/// </summary>
public DebugTable? DebugTable { get; set; }
// .drectve - A section is a directive section if it has the IMAGE_SCN_LNK_INFO
// flag set in the section header and has the .drectve section name. The linker
// removes a .drectve section after processing the information, so the section
@@ -94,20 +230,7 @@ namespace SabreTools.Models.PortableExecutable
//
// TODO: Can we implement reading/parsing the .drectve section?
/// <summary>
/// Export table (.edata)
/// </summary>
public ExportTable? ExportTable { get; set; }
/// <summary>
/// Import table (.idata)
/// </summary>
public ImportTable? ImportTable { get; set; }
/// <summary>
/// Resource directory table (.rsrc)
/// </summary>
public ResourceDirectoryTable? ResourceDirectoryTable { get; set; }
// .pdata Section - Multiple formats per entry
// .sxdata - The valid exception handlers of an object are listed in the .sxdata
// section of that object. The section is marked IMAGE_SCN_LNK_INFO. It contains
@@ -122,18 +245,6 @@ namespace SabreTools.Models.PortableExecutable
#endregion
// TODO: Implement and/or document the following non-modeled parts:
// - Delay-Load Import Tables
// - [The Delay-Load Directory Table]
// - Delay Import Address Table
// - Delay Import Name Table
// - Delay Bound Import Address Table
// - Delay Unload Import Address Table
// - The .pdata Section [Multiple formats per entry]
// - The .tls Section
// - TLS Callback Functions
// - [The Load Configuration Structure (Image Only)]
// TODO: Determine if "Archive (Library) File Format" is worth modelling
}
}

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Export
{
/// <summary>
/// The export address table contains the address of exported entry points
@@ -16,7 +16,7 @@ namespace SabreTools.Models.PortableExecutable
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
[StructLayout(LayoutKind.Explicit)]
public sealed class ExportAddressTableEntry
public sealed class AddressTableEntry
{
/// <summary>
/// The address of the exported symbol when loaded into memory, relative to

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Export
{
/// <summary>
/// The export symbol information begins with the export directory table,
@@ -7,7 +7,7 @@
/// imports to the entry points within this image.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ExportDirectoryTable
public sealed class DirectoryTable
{
/// <summary>
/// Reserved, must be 0.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Export
{
/// <summary>
/// The export name pointer table is an array of addresses (RVAs) into the export name table.
@@ -8,7 +8,7 @@
/// An export name is defined only if the export name pointer table contains a pointer to it.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ExportNamePointerTable
public sealed class NamePointerTable
{
/// <summary>
/// The pointers are 32 bits each and are relative to the image base.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Export
{
/// <summary>
/// The export name table contains the actual string data that was pointed to by the export
@@ -17,7 +17,7 @@
/// of variable length.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ExportNameTable
public sealed class NameTable
{
/// <summary>
/// A series of null-terminated ASCII strings of variable length.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Export
{
/// <summary>
/// The export ordinal table is an array of 16-bit unbiased indexes into the export address table.
@@ -32,7 +32,7 @@
/// name = ExportNameTable[i];
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ExportOrdinalTable
public sealed class OrdinalTable
{
/// <summary>
/// An array of 16-bit unbiased indexes into the export address table

View File

@@ -1,53 +0,0 @@
namespace SabreTools.Models.PortableExecutable
{
/// <summary>
/// The export data section, named .edata, contains information about symbols that other images
/// can access through dynamic linking. Exported symbols are generally found in DLLs, but DLLs
/// can also import symbols.
///
/// An overview of the general structure of the export section is described below. The tables
/// described are usually contiguous in the file in the order shown (though this is not
/// required). Only the export directory table and export address table are required to export
/// symbols as ordinals. (An ordinal is an export that is accessed directly by its export
/// address table index.) The name pointer table, ordinal table, and export name table all
/// exist to support use of export names.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ExportTable
{
/// <summary>
/// A table with just one row (unlike the debug directory). This table indicates the
/// locations and sizes of the other export tables.
/// </summary>
public ExportDirectoryTable? ExportDirectoryTable { get; set; }
/// <summary>
/// An array of RVAs of exported symbols. These are the actual addresses of the exported
/// functions and data within the executable code and data sections. Other image files
/// can import a symbol by using an index to this table (an ordinal) or, optionally, by
/// using the public name that corresponds to the ordinal if a public name is defined.
/// </summary>
public ExportAddressTableEntry[]? ExportAddressTable { get; set; }
/// <summary>
/// An array of pointers to the public export names, sorted in ascending order.
/// </summary>
public ExportNamePointerTable? NamePointerTable { get; set; }
/// <summary>
/// An array of the ordinals that correspond to members of the name pointer table. The
/// correspondence is by position; therefore, the name pointer table and the ordinal table
/// must have the same number of members. Each ordinal is an index into the export address
/// table.
/// </summary>
public ExportOrdinalTable? OrdinalTable { get; set; }
/// <summary>
/// A series of null-terminated ASCII strings. Members of the name pointer table point into
/// this area. These names are the public names through which the symbols are imported and
/// exported; they are not necessarily the same as the private names that are used within
/// the image file.
/// </summary>
public ExportNameTable? ExportNameTable { get; set; }
}
}

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Import
{
/// <summary>
/// The structure and content of the import address table are identical to those of
@@ -9,7 +9,7 @@
/// called "virtual addresses." The loader typically processes the binding.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ImportAddressTableEntry
public sealed class AddressTableEntry
{
/// <summary>
/// If this bit is set, import by ordinal. Otherwise, import by name. Bit is

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Import
{
/// <summary>
/// The import information begins with the import directory table, which
@@ -10,7 +10,7 @@
/// which indicates the end of the directory table.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ImportDirectoryTableEntry
public sealed class DirectoryTableEntry
{
/// <summary>
/// The RVA of the import lookup table. This table contains a name or ordinal

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Import
{
/// <summary>
/// One hint/name table suffices for the entire import section.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Import
{
/// <summary>
/// An import lookup table is an array of 32-bit numbers for PE32 or an array of
@@ -9,7 +9,7 @@
/// (NULL) to indicate the end of the table.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ImportLookupTableEntry
public sealed class LookupTableEntry
{
/// <summary>
/// If this bit is set, import by ordinal. Otherwise, import by name. Bit is

View File

@@ -1,45 +0,0 @@
using System.Collections.Generic;
namespace SabreTools.Models.PortableExecutable
{
/// <summary>
/// All image files that import symbols, including virtually all executable (EXE) files,
/// have an .idata section. A typical file layout for the import information follows:
///
/// - Directory Table
/// Null Directory Entry
/// - DLL1 Import Lookup Table
/// Null
/// - DLL2 Import Lookup Table
/// Null
/// - DLL3 Import Lookup Table
/// Null
/// - Hint-Name Table
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ImportTable
{
/// <summary>
/// The import information begins with the import directory table, which describes the
/// remainder of the import information.
/// </summary>
public ImportDirectoryTableEntry[]? ImportDirectoryTable { get; set; }
/// <summary>
/// An import lookup table is an array of 32-bit numbers for PE32 or an array of 64-bit
/// numbers for PE32+.
/// </summary>
public Dictionary<int, ImportLookupTableEntry[]?>? ImportLookupTables { get; set; }
/// <summary>
/// These addresses are the actual memory addresses of the symbols, although technically
/// they are still called "virtual addresses".
/// </summary>
public Dictionary<int, ImportAddressTableEntry[]?>? ImportAddressTables { get; set; }
/// <summary>
/// One hint/name table suffices for the entire import section.
/// </summary>
public HintNameTableEntry[]? HintNameTable { get; set; }
}
}

View File

@@ -0,0 +1,189 @@
namespace SabreTools.Models.PortableExecutable.LoadConfiguration
{
/// <summary>
/// The data directory entry for a pre-reserved SEH load configuration
/// structure must specify a particular size of the load configuration
/// structure because the operating system loader always expects it to
/// be a certain value. In that regard, the size is really only a
/// version check. For compatibility with Windows XP and earlier versions
/// of Windows, the size must be 64 for x86 images.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class Directory
{
/// <summary>
/// Flags that indicate attributes of the file, currently unused.
/// </summary>
public uint Characteristics { get; set; }
/// <summary>
/// Date and time stamp value. The value is represented in the number of
/// seconds that have elapsed since midnight (00:00:00), January 1, 1970,
/// Universal Coordinated Time, according to the system clock. The time
/// stamp can be printed by using the C runtime (CRT) time function.
/// </summary>
public uint TimeDateStamp { get; set; }
/// <summary>
/// Major version number.
/// </summary>
public ushort MajorVersion { get; set; }
/// <summary>
/// Minor version number.
/// </summary>
public ushort MinorVersion { get; set; }
/// <summary>
/// The global loader flags to clear for this process as the loader starts
/// the process.
/// </summary>
public uint GlobalFlagsClear { get; set; }
/// <summary>
/// The global loader flags to set for this process as the loader starts
/// the process.
/// </summary>
public uint GlobalFlagsSet { get; set; }
/// <summary>
/// Memory that must be freed before it is returned to the system, in bytes.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong DeCommitFreeBlockThreshold { get; set; }
/// <summary>
/// Total amount of free memory, in bytes.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong DeCommitTotalFreeThreshold { get; set; }
/// <summary>
/// [x86 only] The VA of a list of addresses where the LOCK prefix is used so
/// that they can be replaced with NOP on single processor machines.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong LockPrefixTable { get; set; }
/// <summary>
/// Maximum allocation size, in bytes.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong MaximumAllocationSize { get; set; }
/// <summary>
/// Maximum virtual memory size, in bytes.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong VirtualMemoryThreshold { get; set; }
/// <summary>
/// Setting this field to a non-zero value is equivalent to calling
/// SetProcessAffinityMask with this value during process startup (.exe only)
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong ProcessAffinityMask { get; set; }
/// <summary>
/// Process heap flags that correspond to the first argument of the
/// HeapCreate function. These flags apply to the process heap that
/// is created during process startup.
/// </summary>
public uint ProcessHeapFlags { get; set; }
/// <summary>
/// The service pack version identifier.
/// </summary>
public ushort CSDVersion { get; set; }
/// <summary>
/// Must be zero.
/// </summary>
public ushort Reserved { get; set; }
/// <summary>
/// Reserved for use by the system.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong EditList { get; set; }
// <summary>
/// A pointer to a cookie that is used by Visual C++ or GS implementation.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong SecurityCookie { get; set; }
/// <summary>
/// [x86 only] The VA of the sorted table of RVAs of each valid, unique
/// SE handler in the image.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong SEHandlerTable { get; set; }
/// <summary>
/// [x86 only] The count of unique handlers in the table.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong SEHandlerCount { get; set; }
/// <summary>
/// The VA where Control Flow Guard check-function pointer is stored.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong GuardCFCheckFunctionPointer { get; set; }
/// <summary>
/// The VA where Control Flow Guard dispatch-function pointer is stored.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong GuardCFDispatchFunctionPointer { get; set; }
/// <summary>
/// The VA of the sorted table of RVAs of each Control Flow Guard
/// function in the image.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong GuardCFFunctionTable { get; set; }
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong GuardCFFunctionCount { get; set; }
/// <summary>
/// Control Flow Guard related flags.
/// </summary>
public GuardFlags GuardFlags { get; set; }
/// <summary>
/// Code integrity information.
/// </summary>
/// <remarks>12 bytes</remarks>
public byte[]? CodeIntegrity { get; set; }
/// <summary>
/// The VA where Control Flow Guard address taken IAT table is stored.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong GuardAddressTakenIatEntryTable { get; set; }
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong GuardAddressTakenIatEntryCount { get; set; }
/// <summary>
/// The VA where Control Flow Guard long jump target table is stored.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong GuardLongJumpTargetTable { get; set; }
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong GuardLongJumpTargetCount { get; set; }
}
}

View File

@@ -1,343 +0,0 @@
namespace SabreTools.Models.PortableExecutable
{
/// <summary>
/// The data directory entry for a pre-reserved SEH load configuration
/// structure must specify a particular size of the load configuration
/// structure because the operating system loader always expects it to
/// be a certain value. In that regard, the size is really only a
/// version check. For compatibility with Windows XP and earlier versions
/// of Windows, the size must be 64 for x86 images.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class LoadConfigurationDirectory
{
/// <summary>
/// Flags that indicate attributes of the file, currently unused.
/// </summary>
public uint Characteristics { get; set; }
/// <summary>
/// Date and time stamp value. The value is represented in the number of
/// seconds that have elapsed since midnight (00:00:00), January 1, 1970,
/// Universal Coordinated Time, according to the system clock. The time
/// stamp can be printed by using the C runtime (CRT) time function.
/// </summary>
public uint TimeDateStamp { get; set; }
/// <summary>
/// Major version number.
/// </summary>
public ushort MajorVersion { get; set; }
/// <summary>
/// Minor version number.
/// </summary>
public ushort MinorVersion { get; set; }
/// <summary>
/// The global loader flags to clear for this process as the loader starts
/// the process.
/// </summary>
public uint GlobalFlagsClear { get; set; }
/// <summary>
/// The global loader flags to set for this process as the loader starts
/// the process.
/// </summary>
public uint GlobalFlagsSet { get; set; }
/// <summary>
/// The default timeout value to use for this process's critical sections
/// that are abandoned.
/// </summary>
public uint CriticalSectionDefaultTimeout { get; set; }
#region DeCommitFreeBlockThreshold
/// <summary>
/// Memory that must be freed before it is returned to the system, in bytes.
/// </summary>
public uint DeCommitFreeBlockThreshold_PE32 { get; set; }
/// <summary>
/// Memory that must be freed before it is returned to the system, in bytes.
/// </summary>
public ulong DeCommitFreeBlockThreshold_PE32Plus { get; set; }
#endregion
#region DeCommitTotalFreeThreshold
/// <summary>
/// Total amount of free memory, in bytes.
/// </summary>
public uint DeCommitTotalFreeThreshold_PE32 { get; set; }
/// <summary>
/// Total amount of free memory, in bytes.
/// </summary>
public ulong DeCommitTotalFreeThreshold_PE32Plus { get; set; }
#endregion
#region LockPrefixTable
/// <summary>
/// [x86 only] The VA of a list of addresses where the LOCK prefix is used so
/// that they can be replaced with NOP on single processor machines.
/// </summary>
public uint LockPrefixTable_PE32 { get; set; }
/// <summary>
/// [x86 only] The VA of a list of addresses where the LOCK prefix is used so
/// that they can be replaced with NOP on single processor machines.
/// </summary>
public ulong LockPrefixTable_PE32Plus { get; set; }
#endregion
#region MaximumAllocationSize
/// <summary>
/// Maximum allocation size, in bytes.
/// </summary>
public uint MaximumAllocationSize_PE32 { get; set; }
/// <summary>
/// Maximum allocation size, in bytes.
/// </summary>
public ulong MaximumAllocationSize_PE32Plus { get; set; }
#endregion
#region VirtualMemoryThreshold
/// <summary>
/// Maximum virtual memory size, in bytes.
/// </summary>
public uint VirtualMemoryThreshold_PE32 { get; set; }
/// <summary>
/// Maximum virtual memory size, in bytes.
/// </summary>
public ulong VirtualMemoryThreshold_PE32Plus { get; set; }
#endregion
#region ProcessAffinityMask
/// <summary>
/// Setting this field to a non-zero value is equivalent to calling
/// SetProcessAffinityMask with this value during process startup (.exe only)
/// </summary>
public uint ProcessAffinityMask_PE32 { get; set; }
/// <summary>
/// Setting this field to a non-zero value is equivalent to calling
/// SetProcessAffinityMask with this value during process startup (.exe only)
/// </summary>
public ulong ProcessAffinityMask_PE32Plus { get; set; }
#endregion
/// <summary>
/// Process heap flags that correspond to the first argument of the
/// HeapCreate function. These flags apply to the process heap that
/// is created during process startup.
/// </summary>
public uint ProcessHeapFlags { get; set; }
/// <summary>
/// The service pack version identifier.
/// </summary>
public ushort CSDVersion { get; set; }
/// <summary>
/// Must be zero.
/// </summary>
public ushort Reserved { get; set; }
#region EditList
/// <summary>
/// Reserved for use by the system.
/// </summary>
public uint EditList_PE32 { get; set; }
/// <summary>
/// Reserved for use by the system.
/// </summary>
public ulong EditList_PE32Plus { get; set; }
#endregion
#region SecurityCookie
/// <summary>
/// A pointer to a cookie that is used by Visual C++ or GS implementation.
/// </summary>
public uint SecurityCookie_PE32 { get; set; }
/// <summary>
/// A pointer to a cookie that is used by Visual C++ or GS implementation.
/// </summary>
public ulong SecurityCookie_PE32Plus { get; set; }
#endregion
#region SEHandlerTable
/// <summary>
/// [x86 only] The VA of the sorted table of RVAs of each valid, unique
/// SE handler in the image.
/// </summary>
public uint SEHandlerTable_PE32 { get; set; }
/// <summary>
/// [x86 only] The VA of the sorted table of RVAs of each valid, unique
/// SE handler in the image.
/// </summary>
public ulong SEHandlerTable_PE32Plus { get; set; }
#endregion
#region SEHandlerCount
/// <summary>
/// [x86 only] The count of unique handlers in the table.
/// </summary>
public uint SEHandlerCount_PE32 { get; set; }
/// <summary>
/// [x86 only] The count of unique handlers in the table.
/// </summary>
public ulong SEHandlerCount_PE32Plus { get; set; }
#endregion
#region GuardCFCheckFunctionPointer
/// <summary>
/// The VA where Control Flow Guard check-function pointer is stored.
/// </summary>
public uint GuardCFCheckFunctionPointer_PE32 { get; set; }
/// <summary>
/// The VA where Control Flow Guard check-function pointer is stored.
/// </summary>
public ulong GuardCFCheckFunctionPointer_PE32Plus { get; set; }
#endregion
#region GuardCFDispatchFunctionPointer
/// <summary>
/// The VA where Control Flow Guard dispatch-function pointer is stored.
/// </summary>
public uint GuardCFDispatchFunctionPointer_PE32 { get; set; }
/// <summary>
/// The VA where Control Flow Guard dispatch-function pointer is stored.
/// </summary>
public ulong GuardCFDispatchFunctionPointer_PE32Plus { get; set; }
#endregion
#region GuardCFFunctionTable
/// <summary>
/// The VA of the sorted table of RVAs of each Control Flow Guard
/// function in the image.
/// </summary>
public uint GuardCFFunctionTable_PE32 { get; set; }
/// <summary>
/// The VA of the sorted table of RVAs of each Control Flow Guard
/// function in the image.
/// </summary>
public ulong GuardCFFunctionTable_PE32Plus { get; set; }
#endregion
#region GuardCFFunctionCount
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
public uint GuardCFFunctionCount_PE32 { get; set; }
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
public ulong GuardCFFunctionCount_PE32Plus { get; set; }
#endregion
/// <summary>
/// Control Flow Guard related flags.
/// </summary>
public GuardFlags GuardFlags { get; set; }
/// <summary>
/// Code integrity information.
/// </summary>
/// <remarks>12 bytes</remarks>
public byte[]? CodeIntegrity { get; set; }
#region GuardAddressTakenIatEntryTable
/// <summary>
/// The VA where Control Flow Guard address taken IAT table is stored.
/// </summary>
public uint GuardAddressTakenIatEntryTable_PE32 { get; set; }
/// <summary>
/// The VA where Control Flow Guard address taken IAT table is stored.
/// </summary>
public ulong GuardAddressTakenIatEntryTable_PE32Plus { get; set; }
#endregion
#region GuardAddressTakenIatEntryCount
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
public uint GuardAddressTakenIatEntryCount_PE32 { get; set; }
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
public ulong GuardAddressTakenIatEntryCount_PE32Plus { get; set; }
#endregion
#region GuardLongJumpTargetTable
/// <summary>
/// The VA where Control Flow Guard long jump target table is stored.
/// </summary>
public uint GuardLongJumpTargetTable_PE32 { get; set; }
/// <summary>
/// The VA where Control Flow Guard long jump target table is stored.
/// </summary>
public ulong GuardLongJumpTargetTable_PE32Plus { get; set; }
#endregion
#region GuardLongJumpTargetCount
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
public uint GuardLongJumpTargetCount_PE32 { get; set; }
/// <summary>
/// The count of unique RVAs in the above table.
/// </summary>
public ulong GuardLongJumpTargetCount_PE32Plus { get; set; }
#endregion
}
}

View File

@@ -28,92 +28,16 @@
/// PE32+ format.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class OptionalHeader
public sealed class OptionalHeader : COFF.OptionalHeader
{
#region Standard Fields (Image Only)
/// <summary>
/// The unsigned integer that identifies the state of the image file. The most
/// common number is 0x10B, which identifies it as a normal executable file.
/// 0x107 identifies it as a ROM image, and 0x20B identifies it as a PE32+ executable.
/// </summary>
public OptionalHeaderMagicNumber Magic { get; set; }
/// <summary>
/// The linker major version number.
/// </summary>
public byte MajorLinkerVersion { get; set; }
/// <summary>
/// The linker minor version number.
/// </summary>
public byte MinorLinkerVersion { get; set; }
/// <summary>
/// The size of the code (text) section, or the sum of all code sections if there
/// are multiple sections.
/// </summary>
public uint SizeOfCode { get; set; }
/// <summary>
/// The size of the initialized data section, or the sum of all such sections if
/// there are multiple data sections.
/// </summary>
public uint SizeOfInitializedData { get; set; }
/// <summary>
/// The size of the uninitialized data section (BSS), or the sum of all such sections
/// if there are multiple BSS sections.
/// </summary>
public uint SizeOfUninitializedData { get; set; }
/// <summary>
/// The address of the entry point relative to the image base when the executable file
/// is loaded into memory. For program images, this is the starting address. For
/// device drivers, this is the address of the initialization function. An entry point
/// is optional for DLLs. When no entry point is present, this field must be zero.
/// </summary>
public uint AddressOfEntryPoint { get; set; }
/// <summary>
/// The address that is relative to the image base of the beginning-of-code section when
/// it is loaded into memory.
/// </summary>
public uint BaseOfCode { get; set; }
#region PE32-Only
/// <summary>
/// The address that is relative to the image base of the beginning-of-data section when
/// it is loaded into memory.
/// </summary>
public uint BaseOfData { get; set; }
#endregion
#endregion
#region Windows-Specific Fields (Image Only)
#region ImageBase
/// <summary>
/// The preferred address of the first byte of image when loaded into memory { get; set; }
/// must be a multiple of 64 K. The default for DLLs is 0x10000000. The default
/// for Windows CE EXEs is 0x00010000. The default for Windows NT, Windows 2000,
/// Windows XP, Windows 95, Windows 98, and Windows Me is 0x00400000.
/// </summary>
public uint ImageBase_PE32 { get; set; }
/// <summary>
/// The preferred address of the first byte of image when loaded into memory { get; set; }
/// must be a multiple of 64 K. The default for DLLs is 0x10000000. The default
/// for Windows CE EXEs is 0x00010000. The default for Windows NT, Windows 2000,
/// Windows XP, Windows 95, Windows 98, and Windows Me is 0x00400000.
/// </summary>
public ulong ImageBase_PE32Plus { get; set; }
#endregion
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong ImageBase { get; set; }
/// <summary>
/// The alignment (in bytes) of sections when they are loaded into memory. It must
@@ -195,67 +119,32 @@
/// </summary>
public DllCharacteristics DllCharacteristics { get; set; }
#region SizeOfStackReserve
/// <summary>
/// The size of the stack to reserve. Only SizeOfStackCommit is committed; the rest
/// is made available one page at a time until the reserve size is reached.
/// </summary>
public uint SizeOfStackReserve_PE32 { get; set; }
/// <summary>
/// The size of the stack to reserve. Only SizeOfStackCommit is committed; the rest
/// is made available one page at a time until the reserve size is reached.
/// </summary>
public ulong SizeOfStackReserve_PE32Plus { get; set; }
#endregion
#region SizeOfStackCommit
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong SizeOfStackReserve { get; set; }
/// <summary>
/// The size of the stack to commit.
/// </summary>
public uint SizeOfStackCommit_PE32 { get; set; }
/// <summary>
/// The size of the stack to commit.
/// </summary>
public ulong SizeOfStackCommit_PE32Plus { get; set; }
#endregion
#region SizeOfHeapReserve
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong SizeOfStackCommit { get; set; }
/// <summary>
/// The size of the local heap space to reserve. Only SizeOfHeapCommit is
/// committed; the rest is made available one page at a time until the reserve
/// size is reached.
/// </summary>
public uint SizeOfHeapReserve_PE32 { get; set; }
/// <summary>
/// The size of the local heap space to reserve. Only SizeOfHeapCommit is
/// committed; the rest is made available one page at a time until the reserve
/// size is reached.
/// </summary>
public ulong SizeOfHeapReserve_PE32Plus { get; set; }
#endregion
#region SizeOfHeapCommit
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong SizeOfHeapReserve { get; set; }
/// <summary>
/// The size of the local heap space to commit.
/// </summary>
public uint SizeOfHeapCommit_PE32 { get; set; }
/// <summary>
/// The size of the local heap space to commit.
/// </summary>
public ulong SizeOfHeapCommit_PE32Plus { get; set; }
#endregion
/// <remarks>This value is 32-bit if PE32 and 64-bit if PE32+</remarks>
public ulong SizeOfHeapCommit { get; set; }
/// <summary>
/// Reserved, must be zero.
@@ -268,8 +157,6 @@
/// </summary>
public uint NumberOfRvaAndSizes { get; set; }
#endregion
#region Data Directories (Image Only)
/// <summary>

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Resource
{
/// <summary>
/// The resource directory string area consists of Unicode strings, which
@@ -8,7 +8,7 @@
/// alignment of the fixed-size directory entries.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ResourceDataEntry
public sealed class DataEntry
{
/// <summary>
/// The address of a unit of resource data in the Resource Data area.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Resource
{
/// <summary>
/// A leaf's Type, Name, and Language IDs are determined by the path that is
@@ -17,7 +17,7 @@
/// IMAGE_DIRECTORY_ENTRY_RESOURCE DataDirectory.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ResourceDirectoryEntry
public sealed class DirectoryEntry
{
#region Offset 0x00
@@ -31,7 +31,7 @@
/// A string that gives the Type, Name, or Language ID entry, depending on
/// level of table.
/// </summary>
public ResourceDirectoryString? Name { get; set; }
public DirectoryString? Name { get; set; }
/// <summary>
/// A 32-bit integer that identifies the Type, Name, or Language ID entry.
@@ -50,7 +50,7 @@
/// <summary>
/// Resource data entry (a leaf).
/// </summary>
public ResourceDataEntry? DataEntry { get; set; }
public DataEntry? DataEntry { get; set; }
/// <summary>
/// High bit 1. The lower 31 bits are the address of another resource
@@ -61,7 +61,7 @@
/// <summary>
/// Another resource directory table (the next level down).
/// </summary>
public ResourceDirectoryTable? Subdirectory { get; set; }
public DirectoryTable? Subdirectory { get; set; }
#endregion
}

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Resource
{
/// <summary>
/// The resource directory string area consists of Unicode strings, which
@@ -8,7 +8,7 @@
/// alignment of the fixed-size directory entries.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ResourceDirectoryString
public sealed class DirectoryString
{
/// <summary>
/// The size of the string, not including length field itself.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Resource
{
/// <summary>
/// Each directory table is followed by a series of directory entries that
@@ -13,7 +13,7 @@
/// actually consists of directory entries.
/// </summary>
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
public sealed class ResourceDirectoryTable
public sealed class DirectoryTable
{
/// <summary>
/// Resource flags. This field is reserved for future use. It is currently
@@ -54,6 +54,6 @@
/// strings to identify Type, Name, or Language entries (depending on the
/// level of the table).
/// </summary>
public ResourceDirectoryEntry[]? Entries { get; set; }
public DirectoryEntry[]? Entries { get; set; }
}
}

View File

@@ -1,5 +1,5 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// The ACCELTABLEENTRY structure is repeated for all accelerator table entries in the resource.

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Describes the data in an individual accelerator table resource. The structure definition

View File

@@ -1,6 +1,6 @@
using System.Xml.Serialization;
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <see href="https://learn.microsoft.com/en-us/windows/win32/sbscs/manifest-file-schema"/>
[XmlRoot(ElementName = "assembly", Namespace = "urn:schemas-microsoft-com:asm.v1")]

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// The system handles each icon and cursor as a single file. However, these are stored in

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// A dialog box is also one resource entry in the resource file. It consists of one

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Defines the dimensions and style of a control in a dialog box. One or more of these

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// A block of text used by an extended dialog box template to describe the extended dialog box.

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Defines the dimensions and style of a dialog box. This structure, always the first

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// An extended dialog box template begins with a DLGTEMPLATEEX header that describes

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Contains the information necessary for an application to access a specific font. The structure

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Contains version information for a file. This information is language and

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Contains information about an individual font in a font resource group. The structure definition

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Contains the information necessary for an application to access a specific font. The structure

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Common base class for menu item types

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Defines the header for an extended menu template. This structure definition is for

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Common base class for menu item types

View File

@@ -1,6 +1,6 @@
using System.Runtime.InteropServices;
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// Defines a menu item in an extended menu template. This structure definition is for

View File

@@ -1,4 +1,4 @@
namespace SabreTools.Models.PortableExecutable.ResourceEntries
namespace SabreTools.Models.PortableExecutable.Resource.Entries
{
/// <summary>
/// A menu resource consists of a MENUHEADER structure followed by one or more

Some files were not shown because too many files have changed in this diff Show More