Package ghidra.app.util.bin.format.ne
Class InformationBlock
- java.lang.Object
-
- ghidra.app.util.bin.format.ne.InformationBlock
-
public class InformationBlock extends java.lang.Object
A class to respresent the Information Block defined in the Windows new-style executable.
...as defined in WINNT.H
typedef struct _IMAGE_OS2_HEADER { // OS/2 .EXE header WORD ne_magic; // Magic number CHAR ne_ver; // Version number CHAR ne_rev; // Revision number WORD ne_enttab; // Offset of Entry Table WORD ne_cbenttab; // Number of bytes in Entry Table LONG ne_crc; // Checksum of whole file WORD ne_flags; // Flag word WORD ne_autodata; // Automatic data segment number WORD ne_heap; // Initial heap allocation WORD ne_stack; // Initial stack allocation LONG ne_csip; // Initial CS:IP setting LONG ne_sssp; // Initial SS:SP setting WORD ne_cseg; // Count of file segments WORD ne_cmod; // Entries in Module Reference Table WORD ne_cbnrestab; // Size of non-resident name table WORD ne_segtab; // Offset of Segment Table WORD ne_rsrctab; // Offset of Resource Table WORD ne_restab; // Offset of resident name table WORD ne_modtab; // Offset of Module Reference Table WORD ne_imptab; // Offset of Imported Names Table LONG ne_nrestab; // Offset of Non-resident Names Table WORD ne_cmovent; // Count of movable entries WORD ne_align; // Segment alignment shift count WORD ne_cres; // Count of resource segments BYTE ne_exetyp; // Target Operating system BYTE ne_flagsothers; // Other .EXE flags WORD ne_pretthunks; // offset to return thunks WORD ne_psegrefbytes; // offset to segment ref. bytes WORD ne_swaparea; // Minimum code swap area size WORD ne_expver; // Expected Windows version number } IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER;
-
-
Field Summary
Fields Modifier and Type Field Description static byte
EXETYPE_BOSS
Borland Operating System Services executablestatic byte
EXETYPE_EUROPEAN_DOS_4
European DOS 4.x executablestatic byte
EXETYPE_OS2
OS/2 executablestatic byte
EXETYPE_PHARLAP_286_OS2
Pharlap 286 OS/2 executablestatic byte
EXETYPE_PHARLAP_286_WIN
Pharlap 386 Windows executablestatic byte
EXETYPE_RESERVED4
Reserved executable Typestatic byte
EXETYPE_UNKNOWN
Unknown executable typestatic byte
EXETYPE_WINDOWS
Windows executablestatic byte
EXETYPE_WINDOWS_386
Windows 386 executablestatic byte
FLAGS_APP_FULL_SCREEN
Is application full screen?static byte
FLAGS_APP_LIBRARY_MODULE
static byte
FLAGS_APP_LINK_ERRS
static byte
FLAGS_APP_LOAD_CODE
static byte
FLAGS_APP_NONCONFORMING_PROG
static byte
FLAGS_APP_OS2
Is application designed for OS/2?static byte
FLAGS_APP_WIN_PM_COMPATIBLE
Is application compatible with Windows Program Manager?static byte
FLAGS_APP_WINDOWS_PM
Does application use Windows Program Manager?static byte
FLAGS_PROG_80286
static byte
FLAGS_PROG_80386
static byte
FLAGS_PROG_8086
static byte
FLAGS_PROG_80x87
static byte
FLAGS_PROG_GLOBAL_INIT
static byte
FLAGS_PROG_MULTIPLE_DATA
Program flags: multiple data segmentsstatic byte
FLAGS_PROG_NO_AUTO_DATA
Program flags: no auto data segmentsstatic byte
FLAGS_PROG_PROTECTED_MODE
static byte
FLAGS_PROG_SINGLE_DATA
Program flags: single data segmentstatic byte
OTHER_FLAGS_GANGLOAD_AREA
Gangload areastatic byte
OTHER_FLAGS_PROPORTIONAL_FONT
Proportional fontstatic byte
OTHER_FLAGS_PROTECTED_MODE
Protected modestatic byte
OTHER_FLAGS_SUPPORTS_LONG_NAMES
Supports long names
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte
getApplicationFlags()
Returns the application flags.java.lang.String
getApplicationFlagsAsString()
Returns a string represention of the application flags.short
getAutomaticDataSegment()
Returns the automatic data segment.int
getChecksum()
Returns the checksum.short
getEntryPointOffset()
Returns the offset portion of the entry point.short
getEntryPointSegment()
Returns the segment portion of the entry point.short
getExpectedWindowsVersion()
Returns the expected windows version.short
getInitialHeapSize()
Returns the initial heap size.short
getInitialStackSize()
Returns the initial stack size.short
getMagicNumber()
Returns the magic number.short
getMinCodeSwapSize()
Returns the minimum code swap size.byte
getOtherFlags()
Returns the other flags.java.lang.String
getOtherFlagsAsString()
Returns a string representation of the other flags.byte
getProgramFlags()
Returns the program flags.java.lang.String
getProgramFlagsAsString()
Returns a string represention of the program flags.short
getRevision()
Returns the revision number.short
getStackPointerOffset()
Returns the offset portion of the stack pointer.short
getStackPointerSegment()
Returns the segment portion of the stack pointer.byte
getTargetOpSys()
Returns the target operating system.java.lang.String
getTargetOpSysAsString()
Returns a string represention of the target operating system.short
getVersion()
Returns the version number.
-
-
-
Field Detail
-
FLAGS_PROG_NO_AUTO_DATA
public static final byte FLAGS_PROG_NO_AUTO_DATA
Program flags: no auto data segments- See Also:
- Constant Field Values
-
FLAGS_PROG_SINGLE_DATA
public static final byte FLAGS_PROG_SINGLE_DATA
Program flags: single data segment- See Also:
- Constant Field Values
-
FLAGS_PROG_MULTIPLE_DATA
public static final byte FLAGS_PROG_MULTIPLE_DATA
Program flags: multiple data segments- See Also:
- Constant Field Values
-
FLAGS_PROG_GLOBAL_INIT
public static final byte FLAGS_PROG_GLOBAL_INIT
- See Also:
- Constant Field Values
-
FLAGS_PROG_PROTECTED_MODE
public static final byte FLAGS_PROG_PROTECTED_MODE
- See Also:
- Constant Field Values
-
FLAGS_PROG_8086
public static final byte FLAGS_PROG_8086
- See Also:
- Constant Field Values
-
FLAGS_PROG_80286
public static final byte FLAGS_PROG_80286
- See Also:
- Constant Field Values
-
FLAGS_PROG_80386
public static final byte FLAGS_PROG_80386
- See Also:
- Constant Field Values
-
FLAGS_PROG_80x87
public static final byte FLAGS_PROG_80x87
- See Also:
- Constant Field Values
-
FLAGS_APP_FULL_SCREEN
public static final byte FLAGS_APP_FULL_SCREEN
Is application full screen?- See Also:
- Constant Field Values
-
FLAGS_APP_WIN_PM_COMPATIBLE
public static final byte FLAGS_APP_WIN_PM_COMPATIBLE
Is application compatible with Windows Program Manager?- See Also:
- Constant Field Values
-
FLAGS_APP_WINDOWS_PM
public static final byte FLAGS_APP_WINDOWS_PM
Does application use Windows Program Manager?- See Also:
- Constant Field Values
-
FLAGS_APP_OS2
public static final byte FLAGS_APP_OS2
Is application designed for OS/2?- See Also:
- Constant Field Values
-
FLAGS_APP_LOAD_CODE
public static final byte FLAGS_APP_LOAD_CODE
- See Also:
- Constant Field Values
-
FLAGS_APP_LINK_ERRS
public static final byte FLAGS_APP_LINK_ERRS
- See Also:
- Constant Field Values
-
FLAGS_APP_NONCONFORMING_PROG
public static final byte FLAGS_APP_NONCONFORMING_PROG
- See Also:
- Constant Field Values
-
FLAGS_APP_LIBRARY_MODULE
public static final byte FLAGS_APP_LIBRARY_MODULE
- See Also:
- Constant Field Values
-
EXETYPE_UNKNOWN
public static final byte EXETYPE_UNKNOWN
Unknown executable type- See Also:
- Constant Field Values
-
EXETYPE_OS2
public static final byte EXETYPE_OS2
OS/2 executable- See Also:
- Constant Field Values
-
EXETYPE_WINDOWS
public static final byte EXETYPE_WINDOWS
Windows executable- See Also:
- Constant Field Values
-
EXETYPE_EUROPEAN_DOS_4
public static final byte EXETYPE_EUROPEAN_DOS_4
European DOS 4.x executable- See Also:
- Constant Field Values
-
EXETYPE_RESERVED4
public static final byte EXETYPE_RESERVED4
Reserved executable Type- See Also:
- Constant Field Values
-
EXETYPE_WINDOWS_386
public static final byte EXETYPE_WINDOWS_386
Windows 386 executable- See Also:
- Constant Field Values
-
EXETYPE_BOSS
public static final byte EXETYPE_BOSS
Borland Operating System Services executable- See Also:
- Constant Field Values
-
EXETYPE_PHARLAP_286_OS2
public static final byte EXETYPE_PHARLAP_286_OS2
Pharlap 286 OS/2 executable- See Also:
- Constant Field Values
-
EXETYPE_PHARLAP_286_WIN
public static final byte EXETYPE_PHARLAP_286_WIN
Pharlap 386 Windows executable- See Also:
- Constant Field Values
-
OTHER_FLAGS_SUPPORTS_LONG_NAMES
public static final byte OTHER_FLAGS_SUPPORTS_LONG_NAMES
Supports long names- See Also:
- Constant Field Values
-
OTHER_FLAGS_PROTECTED_MODE
public static final byte OTHER_FLAGS_PROTECTED_MODE
Protected mode- See Also:
- Constant Field Values
-
OTHER_FLAGS_PROPORTIONAL_FONT
public static final byte OTHER_FLAGS_PROPORTIONAL_FONT
Proportional font- See Also:
- Constant Field Values
-
OTHER_FLAGS_GANGLOAD_AREA
public static final byte OTHER_FLAGS_GANGLOAD_AREA
Gangload area- See Also:
- Constant Field Values
-
-
Method Detail
-
getMagicNumber
public short getMagicNumber()
Returns the magic number.- Returns:
- the magic number
-
getVersion
public short getVersion()
Returns the version number.- Returns:
- the version number
-
getRevision
public short getRevision()
Returns the revision number.- Returns:
- the revision number
-
getChecksum
public int getChecksum()
Returns the checksum.- Returns:
- the checksum
-
getInitialHeapSize
public short getInitialHeapSize()
Returns the initial heap size.- Returns:
- the initial heap size
-
getInitialStackSize
public short getInitialStackSize()
Returns the initial stack size.- Returns:
- the initial stack size
-
getTargetOpSys
public byte getTargetOpSys()
Returns the target operating system.- Returns:
- the target operating system
-
getMinCodeSwapSize
public short getMinCodeSwapSize()
Returns the minimum code swap size.- Returns:
- the minimum code swap size
-
getExpectedWindowsVersion
public short getExpectedWindowsVersion()
Returns the expected windows version.- Returns:
- the expected windows version
-
getAutomaticDataSegment
public short getAutomaticDataSegment()
Returns the automatic data segment.- Returns:
- the automatic data segment
-
getOtherFlags
public byte getOtherFlags()
Returns the other flags.- Returns:
- the other flags
-
getOtherFlagsAsString
public java.lang.String getOtherFlagsAsString()
Returns a string representation of the other flags.- Returns:
- a string representation of the other flags
-
getProgramFlags
public byte getProgramFlags()
Returns the program flags.- Returns:
- the program flags
-
getApplicationFlags
public byte getApplicationFlags()
Returns the application flags.- Returns:
- the application flags
-
getEntryPointSegment
public short getEntryPointSegment()
Returns the segment portion of the entry point.- Returns:
- the segment portion of the entry point
-
getEntryPointOffset
public short getEntryPointOffset()
Returns the offset portion of the entry point.- Returns:
- the offset portion of the entry point
-
getStackPointerSegment
public short getStackPointerSegment()
Returns the segment portion of the stack pointer.- Returns:
- the segment portion of the stack pointer
-
getStackPointerOffset
public short getStackPointerOffset()
Returns the offset portion of the stack pointer.- Returns:
- the offset portion of the stack pointer
-
getTargetOpSysAsString
public java.lang.String getTargetOpSysAsString()
Returns a string represention of the target operating system.- Returns:
- a string represention of the target operating system
-
getApplicationFlagsAsString
public java.lang.String getApplicationFlagsAsString()
Returns a string represention of the application flags.- Returns:
- a string represention of the application flags
-
getProgramFlagsAsString
public java.lang.String getProgramFlagsAsString()
Returns a string represention of the program flags.- Returns:
- a string represention of the program flags
-
-