diff --git a/BurnOutSharp.Wrappers/LinearExecutable.cs b/BurnOutSharp.Wrappers/LinearExecutable.cs index 1f1dfde8..50bfaffb 100644 --- a/BurnOutSharp.Wrappers/LinearExecutable.cs +++ b/BurnOutSharp.Wrappers/LinearExecutable.cs @@ -6,6 +6,75 @@ namespace BurnOutSharp.Wrappers { #region Pass-Through Properties + #region MS-DOS Stub + + #region Standard Fields + + /// + public byte[] Stub_Magic => _executable.Stub.Header.Magic; + + /// + public ushort Stub_LastPageBytes => _executable.Stub.Header.LastPageBytes; + + /// + public ushort Stub_Pages => _executable.Stub.Header.Pages; + + /// + public ushort Stub_RelocationItems => _executable.Stub.Header.RelocationItems; + + /// + public ushort Stub_HeaderParagraphSize => _executable.Stub.Header.HeaderParagraphSize; + + /// + public ushort Stub_MinimumExtraParagraphs => _executable.Stub.Header.MinimumExtraParagraphs; + + /// + public ushort Stub_MaximumExtraParagraphs => _executable.Stub.Header.MaximumExtraParagraphs; + + /// + public ushort Stub_InitialSSValue => _executable.Stub.Header.InitialSSValue; + + /// + public ushort Stub_Stub_InitialSPValue => _executable.Stub.Header.InitialSPValue; + + /// + public ushort Stub_Checksum => _executable.Stub.Header.Checksum; + + /// + public ushort Stub_InitialIPValue => _executable.Stub.Header.InitialIPValue; + + /// + public ushort Stub_InitialCSValue => _executable.Stub.Header.InitialCSValue; + + /// + public ushort Stub_RelocationTableAddr => _executable.Stub.Header.RelocationTableAddr; + + /// + public ushort Stub_OverlayNumber => _executable.Stub.Header.OverlayNumber; + + #endregion + + #region PE Extensions + + /// + public ushort[] Stub_Reserved1 => _executable.Stub.Header.Reserved1; + + /// + public ushort Stub_OEMIdentifier => _executable.Stub.Header.OEMIdentifier; + + /// + public ushort Stub_OEMInformation => _executable.Stub.Header.OEMInformation; + + /// + public ushort[] Stub_Reserved2 => _executable.Stub.Header.Reserved2; + + /// + public uint Stub_NewExeHeaderAddr => _executable.Stub.Header.NewExeHeaderAddr; + + #endregion + + #endregion + // TODO: Determine what properties can be passed through #endregion @@ -21,7 +90,7 @@ namespace BurnOutSharp.Wrappers /// /// Internal representation of the executable /// - private BurnOutSharp.Models.LinearExecutable.Executable _executable; + private Models.LinearExecutable.Executable _executable; #endregion @@ -38,7 +107,7 @@ namespace BurnOutSharp.Wrappers /// An LE/LX executable wrapper on success, null on failure public static LinearExecutable Create(byte[] data, int offset) { - var executable = BurnOutSharp.Builder.LinearExecutable.ParseExecutable(data, offset); + var executable = Builder.LinearExecutable.ParseExecutable(data, offset); if (executable == null) return null; @@ -53,7 +122,7 @@ namespace BurnOutSharp.Wrappers /// An LE/LX executable wrapper on success, null on failure public static LinearExecutable Create(Stream data) { - var executable = BurnOutSharp.Builder.LinearExecutable.ParseExecutable(data); + var executable = Builder.LinearExecutable.ParseExecutable(data); if (executable == null) return null; diff --git a/BurnOutSharp.Wrappers/NewExecutable.cs b/BurnOutSharp.Wrappers/NewExecutable.cs index 5674cfdb..9d474d09 100644 --- a/BurnOutSharp.Wrappers/NewExecutable.cs +++ b/BurnOutSharp.Wrappers/NewExecutable.cs @@ -6,6 +6,75 @@ namespace BurnOutSharp.Wrappers { #region Pass-Through Properties + #region MS-DOS Stub + + #region Standard Fields + + /// + public byte[] Stub_Magic => _executable.Stub.Header.Magic; + + /// + public ushort Stub_LastPageBytes => _executable.Stub.Header.LastPageBytes; + + /// + public ushort Stub_Pages => _executable.Stub.Header.Pages; + + /// + public ushort Stub_RelocationItems => _executable.Stub.Header.RelocationItems; + + /// + public ushort Stub_HeaderParagraphSize => _executable.Stub.Header.HeaderParagraphSize; + + /// + public ushort Stub_MinimumExtraParagraphs => _executable.Stub.Header.MinimumExtraParagraphs; + + /// + public ushort Stub_MaximumExtraParagraphs => _executable.Stub.Header.MaximumExtraParagraphs; + + /// + public ushort Stub_InitialSSValue => _executable.Stub.Header.InitialSSValue; + + /// + public ushort Stub_Stub_InitialSPValue => _executable.Stub.Header.InitialSPValue; + + /// + public ushort Stub_Checksum => _executable.Stub.Header.Checksum; + + /// + public ushort Stub_InitialIPValue => _executable.Stub.Header.InitialIPValue; + + /// + public ushort Stub_InitialCSValue => _executable.Stub.Header.InitialCSValue; + + /// + public ushort Stub_RelocationTableAddr => _executable.Stub.Header.RelocationTableAddr; + + /// + public ushort Stub_OverlayNumber => _executable.Stub.Header.OverlayNumber; + + #endregion + + #region PE Extensions + + /// + public ushort[] Stub_Reserved1 => _executable.Stub.Header.Reserved1; + + /// + public ushort Stub_OEMIdentifier => _executable.Stub.Header.OEMIdentifier; + + /// + public ushort Stub_OEMInformation => _executable.Stub.Header.OEMInformation; + + /// + public ushort[] Stub_Reserved2 => _executable.Stub.Header.Reserved2; + + /// + public uint Stub_NewExeHeaderAddr => _executable.Stub.Header.NewExeHeaderAddr; + + #endregion + + #endregion + // TODO: Determine what properties can be passed through #endregion @@ -21,7 +90,7 @@ namespace BurnOutSharp.Wrappers /// /// Internal representation of the executable /// - private BurnOutSharp.Models.NewExecutable.Executable _executable; + private Models.NewExecutable.Executable _executable; #endregion @@ -38,7 +107,7 @@ namespace BurnOutSharp.Wrappers /// An NE executable wrapper on success, null on failure public static NewExecutable Create(byte[] data, int offset) { - var executable = BurnOutSharp.Builder.NewExecutable.ParseExecutable(data, offset); + var executable = Builder.NewExecutable.ParseExecutable(data, offset); if (executable == null) return null; @@ -53,7 +122,7 @@ namespace BurnOutSharp.Wrappers /// An NE executable wrapper on success, null on failure public static NewExecutable Create(Stream data) { - var executable = BurnOutSharp.Builder.NewExecutable.ParseExecutable(data); + var executable = Builder.NewExecutable.ParseExecutable(data); if (executable == null) return null; diff --git a/BurnOutSharp.Wrappers/PortableExecutable.cs b/BurnOutSharp.Wrappers/PortableExecutable.cs index 97b89df5..4d1607dd 100644 --- a/BurnOutSharp.Wrappers/PortableExecutable.cs +++ b/BurnOutSharp.Wrappers/PortableExecutable.cs @@ -6,6 +6,75 @@ namespace BurnOutSharp.Wrappers { #region Pass-Through Properties + #region MS-DOS Stub + + #region Standard Fields + + /// + public byte[] Stub_Magic => _executable.Stub.Header.Magic; + + /// + public ushort Stub_LastPageBytes => _executable.Stub.Header.LastPageBytes; + + /// + public ushort Stub_Pages => _executable.Stub.Header.Pages; + + /// + public ushort Stub_RelocationItems => _executable.Stub.Header.RelocationItems; + + /// + public ushort Stub_HeaderParagraphSize => _executable.Stub.Header.HeaderParagraphSize; + + /// + public ushort Stub_MinimumExtraParagraphs => _executable.Stub.Header.MinimumExtraParagraphs; + + /// + public ushort Stub_MaximumExtraParagraphs => _executable.Stub.Header.MaximumExtraParagraphs; + + /// + public ushort Stub_InitialSSValue => _executable.Stub.Header.InitialSSValue; + + /// + public ushort Stub_Stub_InitialSPValue => _executable.Stub.Header.InitialSPValue; + + /// + public ushort Stub_Checksum => _executable.Stub.Header.Checksum; + + /// + public ushort Stub_InitialIPValue => _executable.Stub.Header.InitialIPValue; + + /// + public ushort Stub_InitialCSValue => _executable.Stub.Header.InitialCSValue; + + /// + public ushort Stub_RelocationTableAddr => _executable.Stub.Header.RelocationTableAddr; + + /// + public ushort Stub_OverlayNumber => _executable.Stub.Header.OverlayNumber; + + #endregion + + #region PE Extensions + + /// + public ushort[] Stub_Reserved1 => _executable.Stub.Header.Reserved1; + + /// + public ushort Stub_OEMIdentifier => _executable.Stub.Header.OEMIdentifier; + + /// + public ushort Stub_OEMInformation => _executable.Stub.Header.OEMInformation; + + /// + public ushort[] Stub_Reserved2 => _executable.Stub.Header.Reserved2; + + /// + public uint Stub_NewExeHeaderAddr => _executable.Stub.Header.NewExeHeaderAddr; + + #endregion + + #endregion + // TODO: Determine what properties can be passed through #endregion @@ -21,7 +90,7 @@ namespace BurnOutSharp.Wrappers /// /// Internal representation of the executable /// - private BurnOutSharp.Models.PortableExecutable.Executable _executable; + private Models.PortableExecutable.Executable _executable; #endregion @@ -38,7 +107,7 @@ namespace BurnOutSharp.Wrappers /// A PE executable wrapper on success, null on failure public static PortableExecutable Create(byte[] data, int offset) { - var executable = BurnOutSharp.Builder.PortableExecutable.ParseExecutable(data, offset); + var executable = Builder.PortableExecutable.ParseExecutable(data, offset); if (executable == null) return null; @@ -53,7 +122,7 @@ namespace BurnOutSharp.Wrappers /// A PE executable wrapper on success, null on failure public static PortableExecutable Create(Stream data) { - var executable = BurnOutSharp.Builder.PortableExecutable.ParseExecutable(data); + var executable = Builder.PortableExecutable.ParseExecutable(data); if (executable == null) return null;