mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-04-29 01:50:24 +00:00
Add data at PE entry point
This commit is contained in:
@@ -57,7 +57,7 @@ namespace BurnOutSharp.ExecutableType.Microsoft.PE.Headers
|
||||
/// 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.
|
||||
/// An entry point is optional for DLLs.
|
||||
/// When no entry point is present, this field must be zero.
|
||||
/// </summary>
|
||||
public uint AddressOfEntryPoint;
|
||||
|
||||
@@ -184,6 +184,15 @@ namespace BurnOutSharp.ExecutableType.Microsoft.PE
|
||||
|
||||
#endregion
|
||||
|
||||
#region Raw Other Data
|
||||
|
||||
/// <summary>
|
||||
/// Data at the entry point of the application
|
||||
/// </summary>
|
||||
public byte[] EntryPointRaw;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Resources
|
||||
|
||||
/// <summary>
|
||||
@@ -366,6 +375,16 @@ namespace BurnOutSharp.ExecutableType.Microsoft.PE
|
||||
|
||||
#endregion
|
||||
|
||||
#region Freeform Data
|
||||
|
||||
if (this.OptionalHeader != null && this.OptionalHeader.AddressOfEntryPoint != 0)
|
||||
{
|
||||
int entryPointAddress = (int)ConvertVirtualAddress(this.OptionalHeader.AddressOfEntryPoint, SectionTable);
|
||||
this.EntryPointRaw = this.ReadArbitraryRange(entryPointAddress, 256);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Populate resources, if possible
|
||||
PopulateResourceStrings();
|
||||
}
|
||||
@@ -476,6 +495,13 @@ namespace BurnOutSharp.ExecutableType.Microsoft.PE
|
||||
|
||||
#endregion
|
||||
|
||||
#region Freeform Data
|
||||
|
||||
if (this.OptionalHeader != null && this.OptionalHeader.AddressOfEntryPoint != 0)
|
||||
this.EntryPointRaw = this.ReadArbitraryRange((int)this.OptionalHeader.AddressOfEntryPoint, 256);
|
||||
|
||||
#endregion
|
||||
|
||||
// Populate resources, if possible
|
||||
PopulateResourceStrings();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user