pefile

package module
v0.0.0-...-6f59b1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2015 License: BSD-2-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	IMAGE_DOS_SIGNATURE   = 0x5A4D
	IMAGE_DOSZM_SIGNATURE = 0x4D5A
	IMAGE_NE_SIGNATURE    = 0x454E
	IMAGE_LE_SIGNATURE    = 0x454C
	IMAGE_LX_SIGNATURE    = 0x584C
	IMAGE_TE_SIGNATURE    = 0x5A56 // Terse Executables have a 'VZ' signature
	IMAGE_NT_SIGNATURE    = 0x00004550
)
View Source
const (
	// IMAGE_RICH_KEY = A3 D2 F3 B4
	IMAGE_RICH_KEY       = 0x92033d19
	IMAGE_RICH_SIGNATURE = 0x68636952
	IMAGE_DANS_SIGNATURE = 0x68636952
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRelocation

type BaseRelocation struct {
	VirtualAddress uint32
	SizeOfBlock    uint32
}

type BaseRelocationEntry

type BaseRelocationEntry struct {
	Data uint16
}

type BoundForwarderRef

type BoundForwarderRef struct {
	TimeDateStamp    TimeDateStamp
	OffsetModuleName uint16
	Reserved         uint16
}

type BoundImportDescriptor

type BoundImportDescriptor struct {
	TimeDateStamp               TimeDateStamp
	OffsetModuleName            uint16
	NumberOfModuleForwarderRefs uint16
}

type DataDirectoryEntry

type DataDirectoryEntry struct {
	VirtualAddress uint32
	Size           uint32
}

type DebugDirectory

type DebugDirectory struct {
	Characteristics  DebugDirectoryCharacteristics
	TimeDateStamp    TimeDateStamp
	MajorVersion     uint16
	MinorVersion     uint16
	Type             uint32
	SizeOfData       uint32
	AddressOfRawData uint32
	PointerToRawData uint32
}

type DebugDirectoryCharacteristics

type DebugDirectoryCharacteristics uint32

type DebugType

type DebugType uint32
const (
	IMAGE_DEBUG_TYPE_UNKNOWN       DebugType = 0
	IMAGE_DEBUG_TYPE_COFF          DebugType = 1
	IMAGE_DEBUG_TYPE_CODEVIEW      DebugType = 2
	IMAGE_DEBUG_TYPE_FPO           DebugType = 3
	IMAGE_DEBUG_TYPE_MISC          DebugType = 4
	IMAGE_DEBUG_TYPE_EXCEPTION     DebugType = 5
	IMAGE_DEBUG_TYPE_FIXUP         DebugType = 6
	IMAGE_DEBUG_TYPE_OMAP_TO_SRC   DebugType = 7
	IMAGE_DEBUG_TYPE_OMAP_FROM_SRC DebugType = 8
	IMAGE_DEBUG_TYPE_BORLAND       DebugType = 9
	IMAGE_DEBUG_TYPE_RESERVED10    DebugType = 10
	IMAGE_DEBUG_TYPE_CLSID         DebugType = 11
)

type DelayImportDescriptor

type DelayImportDescriptor struct {
	// contains filtered or unexported fields
}

type DirectoryEntryType

type DirectoryEntryType uint16
const (
	IMAGE_DIRECTORY_ENTRY_EXPORT         DirectoryEntryType = 0
	IMAGE_DIRECTORY_ENTRY_IMPORT         DirectoryEntryType = 1
	IMAGE_DIRECTORY_ENTRY_RESOURCE       DirectoryEntryType = 2
	IMAGE_DIRECTORY_ENTRY_EXCEPTION      DirectoryEntryType = 3
	IMAGE_DIRECTORY_ENTRY_SECURITY       DirectoryEntryType = 4
	IMAGE_DIRECTORY_ENTRY_BASERELOC      DirectoryEntryType = 5
	IMAGE_DIRECTORY_ENTRY_DEBUG          DirectoryEntryType = 6
	IMAGE_DIRECTORY_ENTRY_COPYRIGHT      DirectoryEntryType = 7 // Architecture on non-x86 platforms
	IMAGE_DIRECTORY_ENTRY_GLOBALPTR      DirectoryEntryType = 8
	IMAGE_DIRECTORY_ENTRY_TLS            DirectoryEntryType = 9
	IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG    DirectoryEntryType = 10
	IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT   DirectoryEntryType = 11
	IMAGE_DIRECTORY_ENTRY_IAT            DirectoryEntryType = 12
	IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT   DirectoryEntryType = 13
	IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR DirectoryEntryType = 14
	IMAGE_DIRECTORY_ENTRY_RESERVED       DirectoryEntryType = 15
)

type DllCharacteristics

type DllCharacteristics uint16
const (
	IMAGE_LIBRARY_PROCESS_INIT                     DllCharacteristics = 0x0001 // reserved
	IMAGE_LIBRARY_PROCESS_TERM                     DllCharacteristics = 0x0002 // reserved
	IMAGE_LIBRARY_THREAD_INIT                      DllCharacteristics = 0x0004 // reserved
	IMAGE_LIBRARY_THREAD_TERM                      DllCharacteristics = 0x0008 // reserved
	IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA       DllCharacteristics = 0x0020
	IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE          DllCharacteristics = 0x0040
	IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY       DllCharacteristics = 0x0080
	IMAGE_DLLCHARACTERISTICS_NX_COMPAT             DllCharacteristics = 0x0100
	IMAGE_DLLCHARACTERISTICS_NO_ISOLATION          DllCharacteristics = 0x0200
	IMAGE_DLLCHARACTERISTICS_NO_SEH                DllCharacteristics = 0x0400
	IMAGE_DLLCHARACTERISTICS_NO_BIND               DllCharacteristics = 0x0800
	IMAGE_DLLCHARACTERISTICS_APPCONTAINER          DllCharacteristics = 0x1000
	IMAGE_DLLCHARACTERISTICS_WDM_DRIVER            DllCharacteristics = 0x2000
	IMAGE_DLLCHARACTERISTICS_GUARD_CF              DllCharacteristics = 0x4000
	IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE DllCharacteristics = 0x8000
)

type DosHeader

type DosHeader struct {
	E_magic    uint16
	E_cblp     uint16
	E_cp       uint16
	E_crlc     uint16
	E_cparhdr  uint16
	E_minalloc uint16
	E_maxalloc uint16
	E_ss       uint16
	E_sp       uint16
	E_csum     uint16
	E_ip       uint16
	E_cs       uint16
	E_lfarlc   uint16
	E_ovno     uint16
	E_res      [8]byte
	E_oemid    uint16
	E_oeminfo  uint16
	E_res2     [20]byte
	E_lfanew   uint32
}

type ExportCharacteristics

type ExportCharacteristics uint32

type ExportDirectory

type ExportDirectory struct {
	Characteristics       ExportCharacteristics
	TimeDateStamp         TimeDateStamp
	MajorVersion          uint16
	MinorVersion          uint16
	Name                  uint32
	Base                  uint32
	NumberOfFunctions     uint32
	NumberOfNames         uint32
	AddressOfFunctions    uint32
	AddressOfNames        uint32
	AddressOfNameOrdinals uint32
}

type FileHeader

type FileHeader struct {
	Machine              MachineType
	NumberOfSections     uint16
	TimeDateStamp        TimeDateStamp
	PointerToSymbolTable uint32
	NumberOfSymbols      uint32
	SizeOfOptionalHeader uint16
	Characteristics      ImageCharacteristics
}

type FixedFileInfo

type FixedFileInfo struct {
	Signature        uint32
	StrucVersion     uint32
	FileVersionMS    uint32
	FileVersionLS    uint32
	ProductVersionMS uint32
	ProductVersionLS uint32
	FileFlagsMask    uint32
	FileFlags        uint32
	FileOS           uint32
	FileType         uint32
	FileSubtype      uint32
	FileDateMS       uint32
	FileDateLS       uint32
}

type ImageCharacteristics

type ImageCharacteristics uint16
const (
	IMAGE_FILE_RELOCS_STRIPPED         ImageCharacteristics = 0x0001
	IMAGE_FILE_EXECUTABLE_IMAGE        ImageCharacteristics = 0x0002
	IMAGE_FILE_LINE_NUMS_STRIPPED      ImageCharacteristics = 0x0004
	IMAGE_FILE_LOCAL_SYMS_STRIPPED     ImageCharacteristics = 0x0008
	IMAGE_FILE_AGGRESIVE_WS_TRIM       ImageCharacteristics = 0x0010
	IMAGE_FILE_LARGE_ADDRESS_AWARE     ImageCharacteristics = 0x0020
	IMAGE_FILE_16BIT_MACHINE           ImageCharacteristics = 0x0040
	IMAGE_FILE_BYTES_REVERSED_LO       ImageCharacteristics = 0x0080
	IMAGE_FILE_32BIT_MACHINE           ImageCharacteristics = 0x0100
	IMAGE_FILE_DEBUG_STRIPPED          ImageCharacteristics = 0x0200
	IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP ImageCharacteristics = 0x0400
	IMAGE_FILE_NET_RUN_FROM_SWAP       ImageCharacteristics = 0x0800
	IMAGE_FILE_SYSTEM                  ImageCharacteristics = 0x1000
	IMAGE_FILE_DLL                     ImageCharacteristics = 0x2000
	IMAGE_FILE_UP_SYSTEM_ONLY          ImageCharacteristics = 0x4000
	IMAGE_FILE_BYTES_REVERSED_HI       ImageCharacteristics = 0x8000
)

type ImportDescriptor

type ImportDescriptor struct {
	Characteristics ImportDescriptorCharacteristics // union with OriginalFirstChunk
	TimeDateStamp   TimeDateStamp
	ForwarderChain  uint32
	Name            uint32
	FirstThunk      uint32
}

type ImportDescriptorCharacteristics

type ImportDescriptorCharacteristics uint32

type LoadConfigDirectory

type LoadConfigDirectory struct {
	Size                          uint32
	TimeDateStamp                 TimeDateStamp
	MajorVersion                  uint16
	MinorVersion                  uint16
	GlobalFlagsClear              uint32
	GlobalFlagsSet                uint32
	CriticalSectionDefaultTimeout uint32
	DeCommitFreeBlockThreshold    uint32
	DeCommitTotalFreeThreshold    uint32
	LockPrefixTable               uint32
	MaximumAllocationSize         uint32
	VirtualMemoryThreshold        uint32
	ProcessHeapFlags              uint32
	ProcessAffinityMask           uint32
	CSDVersion                    uint16
	Reserved1                     uint16
	EditList                      uint32
	SecurityCookie                uint32
	SEHandlerTable                uint32
	SEHandlerCount                uint32
	GuardCFCheckFunctionPointer   uint32
	Reserved2                     uint32
	GuardCFFunctionTable          uint32
	GuardCFFunctionCount          uint32
	GuardFlags                    uint32
}

type LoadConfigDirectory64

type LoadConfigDirectory64 struct {
	Size                          uint32
	TimeDateStamp                 TimeDateStamp
	MajorVersion                  uint16
	MinorVersion                  uint16
	GlobalFlagsClear              uint32
	GlobalFlagsSet                uint32
	CriticalSectionDefaultTimeout uint32
	DeCommitFreeBlockThreshold    uint64
	DeCommitTotalFreeThreshold    uint64
	LockPrefixTable               uint64
	MaximumAllocationSize         uint64
	VirtualMemoryThreshold        uint64
	ProcessAffinityMask           uint64
	ProcessHeapFlags              uint32
	CSDVersion                    uint16
	Reserved1                     uint16
	EditList                      uint64
	SecurityCookie                uint64
	SEHandlerTable                uint64
	SEHandlerCount                uint64
	GuardCFCheckFunctionPointer   uint64
	Reserved2                     uint64
	GuardCFFunctionTable          uint64
	GuardCFFunctionCount          uint64
	GuardFlags                    uint32
}

type MachineType

type MachineType uint16
const (
	IMAGE_FILE_MACHINE_UNKNOWN   MachineType = 0
	IMAGE_FILE_MACHINE_I386      MachineType = 0x014c
	IMAGE_FILE_MACHINE_R3000     MachineType = 0x0162
	IMAGE_FILE_MACHINE_R4000     MachineType = 0x0166
	IMAGE_FILE_MACHINE_R10000    MachineType = 0x0168
	IMAGE_FILE_MACHINE_WCEMIPSV2 MachineType = 0x0169
	IMAGE_FILE_MACHINE_ALPHA     MachineType = 0x0184
	IMAGE_FILE_MACHINE_SH3       MachineType = 0x01a2
	IMAGE_FILE_MACHINE_SH3DSP    MachineType = 0x01a3
	IMAGE_FILE_MACHINE_SH3E      MachineType = 0x01a4
	IMAGE_FILE_MACHINE_SH4       MachineType = 0x01a6
	IMAGE_FILE_MACHINE_SH5       MachineType = 0x01a8
	IMAGE_FILE_MACHINE_ARM       MachineType = 0x01c0
	IMAGE_FILE_MACHINE_THUMB     MachineType = 0x01c2
	IMAGE_FILE_MACHINE_ARMNT     MachineType = 0x01c4
	IMAGE_FILE_MACHINE_AM33      MachineType = 0x01d3
	IMAGE_FILE_MACHINE_POWERPC   MachineType = 0x01f0
	IMAGE_FILE_MACHINE_POWERPCFP MachineType = 0x01f1
	IMAGE_FILE_MACHINE_IA64      MachineType = 0x0200
	IMAGE_FILE_MACHINE_MIPS16    MachineType = 0x0266
	IMAGE_FILE_MACHINE_ALPHA64   MachineType = 0x0284
	IMAGE_FILE_MACHINE_AXP64     MachineType = 0x0284 // same
	IMAGE_FILE_MACHINE_MIPSFPU   MachineType = 0x0366
	IMAGE_FILE_MACHINE_MIPSFPU16 MachineType = 0x0466
	IMAGE_FILE_MACHINE_TRICORE   MachineType = 0x0520
	IMAGE_FILE_MACHINE_CEF       MachineType = 0x0cef
	IMAGE_FILE_MACHINE_EBC       MachineType = 0x0ebc
	IMAGE_FILE_MACHINE_AMD64     MachineType = 0x8664
	IMAGE_FILE_MACHINE_M32R      MachineType = 0x9041
	IMAGE_FILE_MACHINE_CEE       MachineType = 0xc0ee
)

type NtHeaders

type NtHeaders struct {
	Signature uint32
}

type OptionalHeader

type OptionalHeader struct {
	Magic                       OptionalHeaderMagic
	MajorLinkerVersion          uint8
	MinorLinkerVersion          uint8
	SizeOfCode                  uint32
	SizeOfInitializedData       uint32
	SizeOfUninitializedData     uint32
	AddressOfEntryPoint         uint32
	BaseOfCode                  uint32
	BaseOfData                  uint32
	ImageBase                   uint32
	SectionAlignment            uint32
	FileAlignment               uint32
	MajorOperatingSystemVersion uint16
	MinorOperatingSystemVersion uint16
	MajorImageVersion           uint16
	MinorImageVersion           uint16
	MajorSubsystemVersion       uint16
	MinorSubsystemVersion       uint16
	Reserved1                   uint32
	SizeOfImage                 uint32
	SizeOfHeaders               uint32
	CheckSum                    uint32
	Subsystem                   SubsystemType
	DllCharacteristics          DllCharacteristics
	SizeOfStackReserve          uint32
	SizeOfStackCommit           uint32
	SizeOfHeapReserve           uint32
	SizeOfHeapCommit            uint32
	LoaderFlags                 uint32
	NumberOfRvaAndSizes         uint32
}

type OptionalHeader64

type OptionalHeader64 struct {
	Magic                       OptionalHeaderMagic
	MajorLinkerVersion          uint8
	MinorLinkerVersion          uint8
	SizeOfCode                  uint32
	SizeOfInitializedData       uint32
	SizeOfUninitializedData     uint32
	AddressOfEntryPoint         uint32
	BaseOfCode                  uint32
	ImageBase                   uint64
	SectionAlignment            uint32
	FileAlignment               uint32
	MajorOperatingSystemVersion uint16
	MinorOperatingSystemVersion uint16
	MajorImageVersion           uint16
	MinorImageVersion           uint16
	MajorSubsystemVersion       uint16
	MinorSubsystemVersion       uint16
	Reserved1                   uint32
	SizeOfImage                 uint32
	SizeOfHeaders               uint32
	CheckSum                    uint32
	Subsystem                   uint16
	DllCharacteristics          DllCharacteristics
	SizeOfStackReserve          uint64
	SizeOfStackCommit           uint64
	SizeOfHeapReserve           uint64
	SizeOfHeapCommit            uint64
	LoaderFlags                 uint32
	NumberOfRvaAndSizes         uint32
}

type OptionalHeaderMagic

type OptionalHeaderMagic uint16
const (
	OPTIONAL_HEADER_MAGIC_PE      OptionalHeaderMagic = 0x10b
	OPTIONAL_HEADER_MAGIC_PE_PLUS OptionalHeaderMagic = 0x20b
)

type PE

type PE struct {
	Type                 OptionalHeaderMagic
	DosHeader            DosHeader
	NtHeaders            NtHeaders
	FileHeader           FileHeader
	OptionalHeader       *OptionalHeader
	OptionalHeader64     *OptionalHeader64
	RichHeader           *RichHeader
	DataDirectoryEntries []DataDirectoryEntry
	DataDirectory        map[DirectoryEntryType]interface{}
	Sections             []SectionHeader

	Warnings []string
}

func Load

func Load(filename string) (*PE, error)

func Parse

func Parse(buf []byte) (*PE, error)

type RelocationType

type RelocationType uint16
const (
	IMAGE_REL_BASED_ABSOLUTE       RelocationType = 0
	IMAGE_REL_BASED_HIGH           RelocationType = 1
	IMAGE_REL_BASED_LOW            RelocationType = 2
	IMAGE_REL_BASED_HIGHLOW        RelocationType = 3
	IMAGE_REL_BASED_HIGHADJ        RelocationType = 4
	IMAGE_REL_BASED_MIPS_JMPADDR   RelocationType = 5
	IMAGE_REL_BASED_SECTION        RelocationType = 6
	IMAGE_REL_BASED_REL            RelocationType = 7
	IMAGE_REL_BASED_MIPS_JMPADDR16 RelocationType = 9
	IMAGE_REL_BASED_IA64_IMM64     RelocationType = 9
	IMAGE_REL_BASED_DIR64          RelocationType = 10
	IMAGE_REL_BASED_HIGH3ADJ       RelocationType = 11
)

type ResourceDataEntry

type ResourceDataEntry struct {
	OffsetToData uint32
	Size         uint32
	CodePage     uint32
	Reserved     uint32
}

type ResourceDirecotry

type ResourceDirecotry struct {
	Characteristics      ResourceDirecotryCharacteristics
	TimeDateStamp        TimeDateStamp
	MajorVersion         uint16
	MinorVersion         uint16
	NumberOfNamedEntries uint16
	NumberOfIdEntries    uint16
}

type ResourceDirecotryCharacteristics

type ResourceDirecotryCharacteristics uint32

type ResourceDirectoryEntry

type ResourceDirectoryEntry struct {
	Name         uint32
	OffsetToData uint32
}

type RichHeader

type RichHeader struct {
	Magic1    uint32 // DanS ^ checksum
	Checksums [3]uint32
	Magic2    uint32 // Rich
}

type SectionCharacteristics

type SectionCharacteristics uint32
const (
	IMAGE_SCN_TYPE_REG               SectionCharacteristics = 0x00000000 // reserved
	IMAGE_SCN_TYPE_DSECT             SectionCharacteristics = 0x00000001 // reserved
	IMAGE_SCN_TYPE_NOLOAD            SectionCharacteristics = 0x00000002 // reserved
	IMAGE_SCN_TYPE_GROUP             SectionCharacteristics = 0x00000004 // reserved
	IMAGE_SCN_TYPE_NO_PAD            SectionCharacteristics = 0x00000008 // reserved
	IMAGE_SCN_TYPE_COPY              SectionCharacteristics = 0x00000010 // reserved
	IMAGE_SCN_CNT_CODE               SectionCharacteristics = 0x00000020
	IMAGE_SCN_CNT_INITIALIZED_DATA   SectionCharacteristics = 0x00000040
	IMAGE_SCN_CNT_UNINITIALIZED_DATA SectionCharacteristics = 0x00000080
	IMAGE_SCN_LNK_OTHER              SectionCharacteristics = 0x00000100
	IMAGE_SCN_LNK_INFO               SectionCharacteristics = 0x00000200
	IMAGE_SCN_LNK_OVER               SectionCharacteristics = 0x00000400 // reserved
	IMAGE_SCN_LNK_REMOVE             SectionCharacteristics = 0x00000800
	IMAGE_SCN_LNK_COMDAT             SectionCharacteristics = 0x00001000
	IMAGE_SCN_MEM_PROTECTED          SectionCharacteristics = 0x00004000 // obsolete
	IMAGE_SCN_NO_DEFER_SPEC_EXC      SectionCharacteristics = 0x00004000
	IMAGE_SCN_GPREL                  SectionCharacteristics = 0x00008000
	IMAGE_SCN_MEM_FARDATA            SectionCharacteristics = 0x00008000
	IMAGE_SCN_MEM_SYSHEAP            SectionCharacteristics = 0x00010000 // obsolete
	IMAGE_SCN_MEM_PURGEABLE          SectionCharacteristics = 0x00020000
	IMAGE_SCN_MEM_16BIT              SectionCharacteristics = 0x00020000
	IMAGE_SCN_MEM_LOCKED             SectionCharacteristics = 0x00040000
	IMAGE_SCN_MEM_PRELOAD            SectionCharacteristics = 0x00080000
	IMAGE_SCN_ALIGN_1BYTES           SectionCharacteristics = 0x00100000
	IMAGE_SCN_ALIGN_2BYTES           SectionCharacteristics = 0x00200000
	IMAGE_SCN_ALIGN_4BYTES           SectionCharacteristics = 0x00300000
	IMAGE_SCN_ALIGN_8BYTES           SectionCharacteristics = 0x00400000
	IMAGE_SCN_ALIGN_16BYTES          SectionCharacteristics = 0x00500000 // default alignment
	IMAGE_SCN_ALIGN_32BYTES          SectionCharacteristics = 0x00600000
	IMAGE_SCN_ALIGN_64BYTES          SectionCharacteristics = 0x00700000
	IMAGE_SCN_ALIGN_128BYTES         SectionCharacteristics = 0x00800000
	IMAGE_SCN_ALIGN_256BYTES         SectionCharacteristics = 0x00900000
	IMAGE_SCN_ALIGN_512BYTES         SectionCharacteristics = 0x00A00000
	IMAGE_SCN_ALIGN_1024BYTES        SectionCharacteristics = 0x00B00000
	IMAGE_SCN_ALIGN_2048BYTES        SectionCharacteristics = 0x00C00000
	IMAGE_SCN_ALIGN_4096BYTES        SectionCharacteristics = 0x00D00000
	IMAGE_SCN_ALIGN_8192BYTES        SectionCharacteristics = 0x00E00000
	IMAGE_SCN_ALIGN_MASK             SectionCharacteristics = 0x00F00000
	IMAGE_SCN_LNK_NRELOC_OVFL        SectionCharacteristics = 0x01000000
	IMAGE_SCN_MEM_DISCARDABLE        SectionCharacteristics = 0x02000000
	IMAGE_SCN_MEM_NOT_CACHED         SectionCharacteristics = 0x04000000
	IMAGE_SCN_MEM_NOT_PAGED          SectionCharacteristics = 0x08000000
	IMAGE_SCN_MEM_SHARED             SectionCharacteristics = 0x10000000
	IMAGE_SCN_MEM_EXECUTE            SectionCharacteristics = 0x20000000
	IMAGE_SCN_MEM_READ               SectionCharacteristics = 0x40000000
	IMAGE_SCN_MEM_WRITE              SectionCharacteristics = 0x80000000
)

type SectionHeader

type SectionHeader struct {
	Name [8]byte
	// union
	// {
	//     ULONG PhysicalAddress;
	//     ULONG VirtualSize;
	// } Misc;
	Misc                 uint32
	VirtualAddress       uint32
	SizeOfRawData        uint32
	PointerToRawData     uint32
	PointerToRelocations uint32
	PointerToLinenumbers uint32
	NumberOfRelocations  uint16
	NumberOfLinenumbers  uint16
	Characteristics      SectionCharacteristics
}

type SubsystemType

type SubsystemType uint16
const (
	IMAGE_SUBSYSTEM_UNKNOWN                  SubsystemType = 0
	IMAGE_SUBSYSTEM_NATIVE                   SubsystemType = 1
	IMAGE_SUBSYSTEM_WINDOWS_GUI              SubsystemType = 2
	IMAGE_SUBSYSTEM_WINDOWS_CUI              SubsystemType = 3
	IMAGE_SUBSYSTEM_OS2_CUI                  SubsystemType = 5
	IMAGE_SUBSYSTEM_POSIX_CUI                SubsystemType = 7
	IMAGE_SUBSYSTEM_NATIVE_WINDOWS           SubsystemType = 8
	IMAGE_SUBSYSTEM_WINDOWS_CE_GUI           SubsystemType = 9
	IMAGE_SUBSYSTEM_EFI_APPLICATION          SubsystemType = 10
	IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER  SubsystemType = 11
	IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER       SubsystemType = 12
	IMAGE_SUBSYSTEM_EFI_ROM                  SubsystemType = 13
	IMAGE_SUBSYSTEM_XBOX                     SubsystemType = 14
	IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION SubsystemType = 16
)

type ThunkData

type ThunkData uint32

type ThunkData64

type ThunkData64 uint64

type TimeDateStamp

type TimeDateStamp uint32

func (TimeDateStamp) String

func (ts TimeDateStamp) String() string

type TlsDirectory

type TlsDirectory struct {
	StartAddressOfRawData uint32
	EndAddressOfRawData   uint32
	AddressOfIndex        uint32
	AddressOfCallBacks    uint32
	SizeOfZeroFill        uint32
	Characteristics       TlsDirectoryCharacteristics
}

type TlsDirectory64

type TlsDirectory64 struct {
	StartAddressOfRawData uint64
	EndAddressOfRawData   uint64
	AddressOfIndex        uint64
	AddressOfCallBacks    uint64
	SizeOfZeroFill        uint32
	Characteristics       TlsDirectoryCharacteristics
}

type TlsDirectoryCharacteristics

type TlsDirectoryCharacteristics uint32

type VersionInfo

type VersionInfo struct {
	Length      uint16
	ValueLength uint16
	Type        uint16
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL