AlphaOmega.PEReader 1.3.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package AlphaOmega.PEReader --version 1.3.1
NuGet\Install-Package AlphaOmega.PEReader -Version 1.3.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AlphaOmega.PEReader" Version="1.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AlphaOmega.PEReader --version 1.3.1
#r "nuget: AlphaOmega.PEReader, 1.3.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AlphaOmega.PEReader as a Cake Addin
#addin nuget:?package=AlphaOmega.PEReader&version=1.3.1

// Install AlphaOmega.PEReader as a Cake Tool
#tool nuget:?package=AlphaOmega.PEReader&version=1.3.1

Portable Executable reader

Auto build Nuget

PE/PE+/CLI executable reader assembly. Compatible with .NET Framework 2.0 & .NET Standard 2.0

Usage (See Wiki for details):

String filePath=@"C:\Windows\System32\kernel32.dll";
using(PEFile file = new PEFile(filePath, StreamLoader.FromFile(filePath)))
{
    if(file.Header.IsValid)
    {
        if(!file.Resource.IsEmpty)
        {//IMAGE_RESOURCE_DIRECTORY
            //...
        }

        if(!file.Export.IsEmpty)
        {//IMAGE_EXPORT_DIRECTORY
            //...
        }

        if(!file.Import.IsEmpty)
        {//IMAGE_IMPORT_DESCRIPTOR
            //...
        }

        if(!file.Certificate.IsEmpty)
        {//WIN_CERTIFICATE
            X509Certificate2 cert = file.Certificate.X509;
            //...
        }

        if(file.ComDescriptor != null)
        {//CLI
            var metaData = file.ComDescriptor.MetaData;
            //...
        }
    }
}
  • DOS header (IMAGE_DOS_HEADER)
    • PE/PE+ header (IMAGE_NT_HEADERS)
    • File header (IMAGE_FILE_HEADER)
    • Optional header (IMAGE_OPTIONAL_HEADER)
    • COFF header (IMAGE_COFF_SYMBOLS_HEADER)
    • Sections header (IMAGE_SECTION_HEADER[])
    • Directories:
      • Architecture
      • Bound import
      • Certificate
      • CLR runtime header
        • MetaData
          • #~
            • Module
            • TypeRef
            • TypeDef
            • FieldPtr
            • Field
            • MethodPtr
            • MethodDef
              • Signature
              • IL Instructions
            • ParamPtr
            • Param
            • InterfaceImpl
            • MemberRef
              • Signature
            • Constant
            • CustomAttribute
              • Signature
            • FieldMarshal
            • DeclSecurity
            • ClassLayout
            • FieldLayout
            • StandAloneSig
            • EventMap
            • EventPtr
            • Event
            • PropertyMap
            • PropertyPtr
            • Property
              • Signature
            • MethodSemantics
            • MethodImpl
            • ModuleRef
            • TypeSpec
            • ImplMap
            • FieldRVA
            • ENCLog
            • ENCMap
            • Assembly
            • AssemblyProcessor
            • AssemblyOS
            • AssemblyRef
            • AssemblyRefProcessor
            • AssemblyRefOS
            • File
            • ExportedType
            • ManifestResource
            • NestedClass
            • GenericParam
            • MethodSpec
            • GenericParamConstraint
          • #Strings
          • #US
          • #Guid
          • #Blob
        • Resource Table (Linked to ManifestResource MetaData table)
        • VTable fixup
        • Code Manager Table
        • Export Address Table
        • Managed Native Header
        • Strong Name Signature
      • Debug
        • CodeView PDB2
        • CodeView PDB7
        • Misc (IMAGE_DEBUG_MISC)
      • Delay Import Descriptor
        • List of delay load imported libraries
        • List of delay load imported functions
      • Exception Table
      • Export Table
        • List of exported functions
      • Global Ptr
      • IAT
      • Import Table
        • List of imported libraries
        • List of imported functions
      • Load Config Table
      • Base Relocation Table
        • Relocation Blocks
        • Relocation Sections
      • Resource Table. Supported resource types:
        • RT_STRING
        • RT_HTML
        • RT_MANIFEST
        • RT_ACCELERATOR
        • RT_MESSAGETABLE
        • RT_DIALOG (Without DLU conversion)
        • RT_BITMAP
        • RT_MENU
        • RT_VERSION
      • TLS Table

Few supported structures:

  • DOS Header
    • IMAGE_DOS_HEADER
  • PE/PE+ Headers
    • IMAGE_FILE_HEADER
    • IMAGE_OPTIONAL_HEADER32
    • IMAGE_OPTIONAL_HEADER64
    • IMAGE_NT_HEADERS32
    • IMAGE_NT_HEADERS64
    • IMAGE_SECTION_HEADER
    • Unmanaged resources
      • IMAGE_RESOURCE_DIRECTORY
      • IMAGE_RESOURCE_DIRECTORY_ENTRY
      • IMAGE_RESOURCE_DATA_ENTRY
      • IMAGE_RESOURCE_DIRECTORY_STRING
      • ACCELTABLEENTRY
      • DLGTEMPLATE
      • DLGITEMTEMPLATE
      • DLGTEMPLATEEX
      • DLGITEMTEMPLATEEX
      • MENUHEADER
      • MENUITEM
      • MENUITEMPOPUP
      • MENUITEMEX
      • BITMAPINFOHEADER
      • VS_VERSIONINFO
      • VS_FIXEDFILEINFO
      • VarFileInfo
      • StringTable
      • V_STRING
      • FONTDIRENTRY
      • MESSAGE_RESOURCE_BLOCK
      • MESSAGE_RESOURCE_ENTRY
    • IMAGE_IMPORT_DESCRIPTOR
    • IMAGE_THUNK_DATA32
    • IMAGE_THUNK_DATA64
    • IMAGE_IMPORT_BY_NAME
    • IMAGE_RUNTIME_FUNCTION_ENTRY
    • IMAGE_DATA_DIRECTORY
    • IMAGE_EXPORT_DIRECTORY
    • IMAGE_BOUND_IMPORT_DESCRIPTOR
    • IMAGE_BOUND_FORWARDER_REF
    • WIN_CERTIFICATE
    • ImgDelayDescr
    • IMAGE_BASE_RELOCATION
    • IMAGE_LOAD_CONFIG_DIRECTORY32
    • IMAGE_LOAD_CONFIG_DIRECTORY64
    • IMAGE_TLS_DIRECTORY32
    • IMAGE_TLS_DIRECTORY64
    • Debug directory
      • IMAGE_DEBUG_DIRECTORY
      • CV_INFO_PDB70
      • CV_HEADER
      • CV_INFO_PDB20
      • IMAGE_DEBUG_MISC
    • .NET CLI
      • IMAGE_COR20_HEADER
      • IMAGE_COR20_METADATA
      • IMAGE_COR20_VTABLE
      • ResourceManagerHeader
      • ResourceSetHeader
      • STREAM_HEADER
      • STREAM_TABLE_HEADER
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net20 is compatible.  net35 was computed.  net40 was computed.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.2 217 1/2/2024
1.3.1 171 11/26/2023
1.0.8464.38673 242 3/5/2023
1.0.8415.24894 231 1/15/2023