Package ghidra.app.util.bin.format.ne
Class InformationBlock
java.lang.Object
ghidra.app.util.bin.format.ne.InformationBlock
A class to represent 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;
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteBorland Operating System Services executablestatic final byteEuropean DOS 4.x executablestatic final byteOS/2 executablestatic final bytePharlap 286 OS/2 executablestatic final bytePharlap 386 Windows executablestatic final byteReserved executable Typestatic final byteUnknown executable typestatic final byteWindows executablestatic final byteWindows 386 executablestatic final byteIs application full screen?static final bytestatic final bytestatic final byteDoes the first segment contain code that loads the application?static final bytestatic final byteIs application compatible with Windows Program Manager?static final byteDoes application use Windows Program Manager?static final bytestatic final bytestatic final bytestatic final bytestatic final bytestatic final byteProgram flags: multiple data segmentsstatic final byteProgram flags: no auto data segmentsstatic final bytestatic final byteProgram flags: single data segmentstatic final byteGangload areastatic final byteProportional fontstatic final byteProtected modestatic final byteSupports long names -
Method Summary
Modifier and TypeMethodDescriptionbyteReturns the application flags.Returns a string representation of the application flags.shortReturns the automatic data segment.intReturns the checksum.shortReturns the offset portion of the entry point.shortReturns the segment portion of the entry point.shortReturns the expected windows version.shortReturns the initial heap size.shortReturns the initial stack size.shortReturns the magic number.shortReturns the minimum code swap size.byteReturns the other flags.Returns a string representation of the other flags.byteReturns the program flags.Returns a string representation of the program flags.shortReturns the revision number.shortReturns the offset portion of the stack pointer.shortReturns the segment portion of the stack pointer.byteReturns the target operating system.Returns a string representation of the target operating system.shortReturns the version number.
-
Field Details
-
FLAGS_PROG_NO_AUTO_DATA
public static final byte FLAGS_PROG_NO_AUTO_DATAProgram flags: no auto data segments- See Also:
-
FLAGS_PROG_SINGLE_DATA
public static final byte FLAGS_PROG_SINGLE_DATAProgram flags: single data segment- See Also:
-
FLAGS_PROG_MULTIPLE_DATA
public static final byte FLAGS_PROG_MULTIPLE_DATAProgram flags: multiple data segments- See Also:
-
FLAGS_PROG_GLOBAL_INIT
public static final byte FLAGS_PROG_GLOBAL_INIT- See Also:
-
FLAGS_PROG_PROTECTED_MODE
public static final byte FLAGS_PROG_PROTECTED_MODE- See Also:
-
FLAGS_PROG_8086
public static final byte FLAGS_PROG_8086- See Also:
-
FLAGS_PROG_80286
public static final byte FLAGS_PROG_80286- See Also:
-
FLAGS_PROG_80386
public static final byte FLAGS_PROG_80386- See Also:
-
FLAGS_PROG_80x87
public static final byte FLAGS_PROG_80x87- See Also:
-
FLAGS_APP_FULL_SCREEN
public static final byte FLAGS_APP_FULL_SCREENIs application full screen?- See Also:
-
FLAGS_APP_WIN_PM_COMPATIBLE
public static final byte FLAGS_APP_WIN_PM_COMPATIBLEIs application compatible with Windows Program Manager?- See Also:
-
FLAGS_APP_WINDOWS_PM
public static final byte FLAGS_APP_WINDOWS_PMDoes application use Windows Program Manager?- See Also:
-
FLAGS_APP_LOAD_CODE
public static final byte FLAGS_APP_LOAD_CODEDoes the first segment contain code that loads the application?- See Also:
-
FLAGS_APP_LINK_ERRS
public static final byte FLAGS_APP_LINK_ERRS- See Also:
-
FLAGS_APP_NONCONFORMING_PROG
public static final byte FLAGS_APP_NONCONFORMING_PROG- See Also:
-
FLAGS_APP_LIBRARY_MODULE
public static final byte FLAGS_APP_LIBRARY_MODULE- See Also:
-
EXETYPE_UNKNOWN
public static final byte EXETYPE_UNKNOWNUnknown executable type- See Also:
-
EXETYPE_OS2
public static final byte EXETYPE_OS2OS/2 executable- See Also:
-
EXETYPE_WINDOWS
public static final byte EXETYPE_WINDOWSWindows executable- See Also:
-
EXETYPE_EUROPEAN_DOS_4
public static final byte EXETYPE_EUROPEAN_DOS_4European DOS 4.x executable- See Also:
-
EXETYPE_RESERVED4
public static final byte EXETYPE_RESERVED4Reserved executable Type- See Also:
-
EXETYPE_WINDOWS_386
public static final byte EXETYPE_WINDOWS_386Windows 386 executable- See Also:
-
EXETYPE_BOSS
public static final byte EXETYPE_BOSSBorland Operating System Services executable- See Also:
-
EXETYPE_PHARLAP_286_OS2
public static final byte EXETYPE_PHARLAP_286_OS2Pharlap 286 OS/2 executable- See Also:
-
EXETYPE_PHARLAP_286_WIN
public static final byte EXETYPE_PHARLAP_286_WINPharlap 386 Windows executable- See Also:
-
OTHER_FLAGS_SUPPORTS_LONG_NAMES
public static final byte OTHER_FLAGS_SUPPORTS_LONG_NAMESSupports long names- See Also:
-
OTHER_FLAGS_PROTECTED_MODE
public static final byte OTHER_FLAGS_PROTECTED_MODEProtected mode- See Also:
-
OTHER_FLAGS_PROPORTIONAL_FONT
public static final byte OTHER_FLAGS_PROPORTIONAL_FONTProportional font- See Also:
-
OTHER_FLAGS_GANGLOAD_AREA
public static final byte OTHER_FLAGS_GANGLOAD_AREAGangload area- See Also:
-
-
Method Details
-
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
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
Returns a string representation of the target operating system.- Returns:
- a string representation of the target operating system
-
getApplicationFlagsAsString
Returns a string representation of the application flags.- Returns:
- a string representation of the application flags
-
getProgramFlagsAsString
Returns a string representation of the program flags.- Returns:
- a string representation of the program flags
-