Rizin
unix-like reverse engineering framework and cli tools
le_specs.h File Reference
#include <rz_types.h>

Go to the source code of this file.

Classes

struct  LE_entry_bundle_header_s
 
struct  LE_fixup_record_header_s
 
struct  LE_object_entry_s
 
struct  LE_object_page_entry_s
 
struct  LE_image_header_s
 

Macros

#define ENTRY_PARAMETER_TYPING_PRESENT   0x80
 
#define ENTRY_EXPORTED   0x01
 
#define ENTRY_PARAM_COUNT_MASK   0xF8
 
#define F_SOURCE_TYPE_MASK   0xF
 
#define F_SOURCE_ALIAS   0x10
 
#define F_SOURCE_LIST   0x20
 
#define F_TARGET_TYPE_MASK   0x3
 
#define F_TARGET_ADDITIVE   0x4
 
#define F_TARGET_CHAIN   0x8
 
#define F_TARGET_OFF32   0x10
 
#define F_TARGET_ADD32   0x20
 
#define F_TARGET_ORD16   0x40
 
#define F_TARGET_ORD8   0x80
 
#define O_READABLE   1
 
#define O_WRITABLE   1 << 1
 
#define O_EXECUTABLE   1 << 2
 
#define O_RESOURCE   1 << 3
 
#define O_DISCARTABLE   1 << 4
 
#define O_SHARED   1 << 5
 
#define O_PRELOAD   1 << 6
 
#define O_INVALID   1 << 7
 
#define O_ZEROED   1 << 8
 
#define O_RESIDENT   1 << 9
 
#define O_CONTIGUOUS   O_RESIDENT | O_ZEROED
 
#define O_LOCKABLE   1 << 10
 
#define O_RESERVED   1 << 11
 
#define O_ALIASED   1 << 12
 
#define O_BIG_BIT   1 << 13
 
#define O_CODE   1 << 14
 
#define O_IO_PRIV   1 << 15
 
#define P_LEGAL   0
 
#define P_ITERATED   1
 
#define P_INVALID   2
 
#define P_ZEROED   3
 
#define P_RANGE   4
 
#define P_COMPRESSED   5
 
#define M_PP_LIB_INIT   1 << 2
 
#define M_SYS_DLL   1 << 3
 
#define M_INTERNAL_FIXUP   1 << 4
 
#define M_EXTERNAL_FIXUP   1 << 5
 
#define M_PM_WINDOWING_INCOMP   1 << 8
 
#define M_PM_WINDOWING_COMPAT   1 << 9
 
#define M_USES_PM_WINDOWING   M_PM_WINDOWING_INCOMP | M_PM_WINDOWING_COMPAT
 
#define M_NOT_LOADABLE   1 << 13
 
#define M_TYPE_MASK   0x38000
 
#define M_TYPE_EXE   0
 
#define M_TYPE_DLL   0x08000
 
#define M_TYPE_PM_DLL   0x10000
 
#define M_TYPE_PDD   0x20000
 
#define M_TYPE_VDD   0x28000
 
#define M_MP_UNSAFE   1 << 19
 
#define M_PP_LIB_TERM   1 << 30
 

Typedefs

typedef struct LE_entry_bundle_header_s LE_entry_bundle_header
 
typedef struct LE_fixup_record_header_s LE_fixup_record_header
 
typedef struct LE_object_entry_s LE_object_entry
 
typedef struct LE_object_page_entry_s LE_object_page_entry
 
typedef struct LE_image_header_s LE_image_header
 

Enumerations

enum  LE_entry_bundle_type {
  UNUSED_ENTRY = 0 , ENTRY16 , CALLGATE , ENTRY32 ,
  FORWARDER
}
 
enum  LE_resource_type {
  LE_RT_POINTER = 1 , LE_RT_BITMAP = 2 , LE_RT_MENU = 3 , LE_RT_DIALOG = 4 ,
  LE_RT_STRING = 5 , LE_RT_FONTDIR = 6 , LE_RT_FONT = 7 , LE_RT_ACCELTABLE = 8 ,
  LE_RT_RCDATA = 9 , LE_RT_MESSAGE = 10 , LE_RT_DLGINCLUDE = 11 , LE_RT_VKEYTBL = 12 ,
  LE_RT_KEYTBL = 13 , LE_RT_CHARTBL = 14 , LE_RT_DISPLAYINFO = 15 , LE_RT_FKASHORT = 16 ,
  LE_RT_FKALONG = 17 , LE_RT_HELPTABLE = 18 , LE_RT_HELPSUBTABLE = 19 , LE_RT_FDDIR = 20 ,
  LE_RT_FD = 21
}
 
enum  LE_fixup_source_type {
  BYTEFIXUP , UNDEFINED1 , SELECTOR16 , POINTER32 ,
  UNDEFINED2 , OFFSET16 , POINTER48 , OFFSET32 ,
  SELFOFFSET32
}
 
enum  LE_fixup_record_type { INTERNAL , IMPORTORD , IMPORTNAME , INTERNALENTRY }
 

Functions

 RZ_PACKED (typedef union LE_entry_bundle_entry_u { RZ_PACKED(struct { ut8 flags;ut16 offset;}) entry_16;RZ_PACKED(struct { ut8 flags;ut16 offset;ut16 callgate_sel;}) callgate;RZ_PACKED(struct { ut8 flags;ut32 offset;}) entry_32;RZ_PACKED(struct { ut8 flags;ut16 import_ord;ut32 offset;}) forwarder;}) LE_entry_bundle_entry
 

Macro Definition Documentation

◆ ENTRY_EXPORTED

#define ENTRY_EXPORTED   0x01

Definition at line 50 of file le_specs.h.

◆ ENTRY_PARAM_COUNT_MASK

#define ENTRY_PARAM_COUNT_MASK   0xF8

Definition at line 51 of file le_specs.h.

◆ ENTRY_PARAMETER_TYPING_PRESENT

#define ENTRY_PARAMETER_TYPING_PRESENT   0x80

Definition at line 42 of file le_specs.h.

◆ F_SOURCE_ALIAS

#define F_SOURCE_ALIAS   0x10

Definition at line 80 of file le_specs.h.

◆ F_SOURCE_LIST

#define F_SOURCE_LIST   0x20

Definition at line 81 of file le_specs.h.

◆ F_SOURCE_TYPE_MASK

#define F_SOURCE_TYPE_MASK   0xF

Definition at line 79 of file le_specs.h.

◆ F_TARGET_ADD32

#define F_TARGET_ADD32   0x20

Definition at line 99 of file le_specs.h.

◆ F_TARGET_ADDITIVE

#define F_TARGET_ADDITIVE   0x4

Definition at line 96 of file le_specs.h.

◆ F_TARGET_CHAIN

#define F_TARGET_CHAIN   0x8

Definition at line 97 of file le_specs.h.

◆ F_TARGET_OFF32

#define F_TARGET_OFF32   0x10

Definition at line 98 of file le_specs.h.

◆ F_TARGET_ORD16

#define F_TARGET_ORD16   0x40

Definition at line 100 of file le_specs.h.

◆ F_TARGET_ORD8

#define F_TARGET_ORD8   0x80

Definition at line 101 of file le_specs.h.

◆ F_TARGET_TYPE_MASK

#define F_TARGET_TYPE_MASK   0x3

Definition at line 95 of file le_specs.h.

◆ M_EXTERNAL_FIXUP

#define M_EXTERNAL_FIXUP   1 << 5

Definition at line 158 of file le_specs.h.

◆ M_INTERNAL_FIXUP

#define M_INTERNAL_FIXUP   1 << 4

Definition at line 157 of file le_specs.h.

◆ M_MP_UNSAFE

#define M_MP_UNSAFE   1 << 19

Definition at line 169 of file le_specs.h.

◆ M_NOT_LOADABLE

#define M_NOT_LOADABLE   1 << 13

Definition at line 162 of file le_specs.h.

◆ M_PM_WINDOWING_COMPAT

#define M_PM_WINDOWING_COMPAT   1 << 9

Definition at line 160 of file le_specs.h.

◆ M_PM_WINDOWING_INCOMP

#define M_PM_WINDOWING_INCOMP   1 << 8

Definition at line 159 of file le_specs.h.

◆ M_PP_LIB_INIT

#define M_PP_LIB_INIT   1 << 2

Definition at line 155 of file le_specs.h.

◆ M_PP_LIB_TERM

#define M_PP_LIB_TERM   1 << 30

Definition at line 170 of file le_specs.h.

◆ M_SYS_DLL

#define M_SYS_DLL   1 << 3

Definition at line 156 of file le_specs.h.

◆ M_TYPE_DLL

#define M_TYPE_DLL   0x08000

Definition at line 165 of file le_specs.h.

◆ M_TYPE_EXE

#define M_TYPE_EXE   0

Definition at line 164 of file le_specs.h.

◆ M_TYPE_MASK

#define M_TYPE_MASK   0x38000

Definition at line 163 of file le_specs.h.

◆ M_TYPE_PDD

#define M_TYPE_PDD   0x20000

Definition at line 167 of file le_specs.h.

◆ M_TYPE_PM_DLL

#define M_TYPE_PM_DLL   0x10000

Definition at line 166 of file le_specs.h.

◆ M_TYPE_VDD

#define M_TYPE_VDD   0x28000

Definition at line 168 of file le_specs.h.

◆ M_USES_PM_WINDOWING

#define M_USES_PM_WINDOWING   M_PM_WINDOWING_INCOMP | M_PM_WINDOWING_COMPAT

Definition at line 161 of file le_specs.h.

◆ O_ALIASED

#define O_ALIASED   1 << 12

Definition at line 128 of file le_specs.h.

◆ O_BIG_BIT

#define O_BIG_BIT   1 << 13

Definition at line 129 of file le_specs.h.

◆ O_CODE

#define O_CODE   1 << 14

Definition at line 130 of file le_specs.h.

◆ O_CONTIGUOUS

#define O_CONTIGUOUS   O_RESIDENT | O_ZEROED

Definition at line 125 of file le_specs.h.

◆ O_DISCARTABLE

#define O_DISCARTABLE   1 << 4

Definition at line 119 of file le_specs.h.

◆ O_EXECUTABLE

#define O_EXECUTABLE   1 << 2

Definition at line 117 of file le_specs.h.

◆ O_INVALID

#define O_INVALID   1 << 7

Definition at line 122 of file le_specs.h.

◆ O_IO_PRIV

#define O_IO_PRIV   1 << 15

Definition at line 131 of file le_specs.h.

◆ O_LOCKABLE

#define O_LOCKABLE   1 << 10

Definition at line 126 of file le_specs.h.

◆ O_PRELOAD

#define O_PRELOAD   1 << 6

Definition at line 121 of file le_specs.h.

◆ O_READABLE

#define O_READABLE   1

Definition at line 115 of file le_specs.h.

◆ O_RESERVED

#define O_RESERVED   1 << 11

Definition at line 127 of file le_specs.h.

◆ O_RESIDENT

#define O_RESIDENT   1 << 9

Definition at line 124 of file le_specs.h.

◆ O_RESOURCE

#define O_RESOURCE   1 << 3

Definition at line 118 of file le_specs.h.

◆ O_SHARED

#define O_SHARED   1 << 5

Definition at line 120 of file le_specs.h.

◆ O_WRITABLE

#define O_WRITABLE   1 << 1

Definition at line 116 of file le_specs.h.

◆ O_ZEROED

#define O_ZEROED   1 << 8

Definition at line 123 of file le_specs.h.

◆ P_COMPRESSED

#define P_COMPRESSED   5

Definition at line 147 of file le_specs.h.

◆ P_INVALID

#define P_INVALID   2

Definition at line 144 of file le_specs.h.

◆ P_ITERATED

#define P_ITERATED   1

Definition at line 143 of file le_specs.h.

◆ P_LEGAL

#define P_LEGAL   0

Definition at line 142 of file le_specs.h.

◆ P_RANGE

#define P_RANGE   4

Definition at line 146 of file le_specs.h.

◆ P_ZEROED

#define P_ZEROED   3

Definition at line 145 of file le_specs.h.

Typedef Documentation

◆ LE_entry_bundle_header

◆ LE_fixup_record_header

◆ LE_image_header

◆ LE_object_entry

◆ LE_object_page_entry

Enumeration Type Documentation

◆ LE_entry_bundle_type

Enumerator
UNUSED_ENTRY 
ENTRY16 
CALLGATE 
ENTRY32 
FORWARDER 

Definition at line 8 of file le_specs.h.

8  {
9  UNUSED_ENTRY = 0,
10  ENTRY16,
11  CALLGATE,
12  ENTRY32,
13  FORWARDER,
LE_entry_bundle_type
Definition: le_specs.h:8
@ CALLGATE
Definition: le_specs.h:11
@ ENTRY32
Definition: le_specs.h:12
@ FORWARDER
Definition: le_specs.h:13
@ ENTRY16
Definition: le_specs.h:10
@ UNUSED_ENTRY
Definition: le_specs.h:9

◆ LE_fixup_record_type

Enumerator
INTERNAL 
IMPORTORD 
IMPORTNAME 
INTERNALENTRY 

Definition at line 103 of file le_specs.h.

103  {
104  INTERNAL,
105  IMPORTORD,
106  IMPORTNAME,
LE_fixup_record_type
Definition: le_specs.h:103
@ IMPORTORD
Definition: le_specs.h:105
@ INTERNALENTRY
Definition: le_specs.h:107
@ IMPORTNAME
Definition: le_specs.h:106
@ INTERNAL
Definition: le_specs.h:104

◆ LE_fixup_source_type

Enumerator
BYTEFIXUP 
UNDEFINED1 
SELECTOR16 
POINTER32 
UNDEFINED2 
OFFSET16 
POINTER48 
OFFSET32 
SELFOFFSET32 

Definition at line 83 of file le_specs.h.

83  {
84  BYTEFIXUP,
85  UNDEFINED1,
86  SELECTOR16,
87  POINTER32, // 16:16
88  UNDEFINED2,
89  OFFSET16,
90  POINTER48, // 16:32
91  OFFSET32,
LE_fixup_source_type
Definition: le_specs.h:83
@ POINTER32
Definition: le_specs.h:87
@ BYTEFIXUP
Definition: le_specs.h:84
@ SELFOFFSET32
Definition: le_specs.h:92
@ SELECTOR16
Definition: le_specs.h:86
@ UNDEFINED1
Definition: le_specs.h:85
@ POINTER48
Definition: le_specs.h:90
@ OFFSET32
Definition: le_specs.h:91
@ UNDEFINED2
Definition: le_specs.h:88
@ OFFSET16
Definition: le_specs.h:89

◆ LE_resource_type

Enumerator
LE_RT_POINTER 
LE_RT_BITMAP 
LE_RT_MENU 
LE_RT_DIALOG 
LE_RT_STRING 
LE_RT_FONTDIR 
LE_RT_FONT 
LE_RT_ACCELTABLE 
LE_RT_RCDATA 
LE_RT_MESSAGE 
LE_RT_DLGINCLUDE 
LE_RT_VKEYTBL 
LE_RT_KEYTBL 
LE_RT_CHARTBL 
LE_RT_DISPLAYINFO 
LE_RT_FKASHORT 
LE_RT_FKALONG 
LE_RT_HELPTABLE 
LE_RT_HELPSUBTABLE 
LE_RT_FDDIR 
LE_RT_FD 

Definition at line 16 of file le_specs.h.

16  {
17  LE_RT_POINTER = 1, /* mouse pointer shape */
18  LE_RT_BITMAP = 2, /* bitmap */
19  LE_RT_MENU = 3, /* menu template */
20  LE_RT_DIALOG = 4, /* dialog template */
21  LE_RT_STRING = 5, /* string tables */
22  LE_RT_FONTDIR = 6, /* font directory */
23  LE_RT_FONT = 7, /* font */
24  LE_RT_ACCELTABLE = 8, /* accelerator tables */
25  LE_RT_RCDATA = 9, /* binary data */
26  LE_RT_MESSAGE = 10, /* error msg tables */
27  LE_RT_DLGINCLUDE = 11, /* dialog include file name */
28  LE_RT_VKEYTBL = 12, /* key to vkey tables */
29  LE_RT_KEYTBL = 13, /* key to UGL tables */
30  LE_RT_CHARTBL = 14, /* glyph to character tables */
31  LE_RT_DISPLAYINFO = 15, /* screen display information */
32  LE_RT_FKASHORT = 16, /* function key area short form */
33  LE_RT_FKALONG = 17, /* function key area long form */
34  LE_RT_HELPTABLE = 18, /* Help table for Cary Help manager */
35  LE_RT_HELPSUBTABLE = 19, /* Help subtable for Cary Help manager */
36  LE_RT_FDDIR = 20, /* DBCS uniq/font driver directory */
37  LE_RT_FD = 21, /* DBCS uniq/font driver */
LE_resource_type
Definition: le_specs.h:16
@ LE_RT_KEYTBL
Definition: le_specs.h:29
@ LE_RT_RCDATA
Definition: le_specs.h:25
@ LE_RT_FKASHORT
Definition: le_specs.h:32
@ LE_RT_FD
Definition: le_specs.h:37
@ LE_RT_BITMAP
Definition: le_specs.h:18
@ LE_RT_VKEYTBL
Definition: le_specs.h:28
@ LE_RT_POINTER
Definition: le_specs.h:17
@ LE_RT_FKALONG
Definition: le_specs.h:33
@ LE_RT_STRING
Definition: le_specs.h:21
@ LE_RT_FDDIR
Definition: le_specs.h:36
@ LE_RT_DISPLAYINFO
Definition: le_specs.h:31
@ LE_RT_CHARTBL
Definition: le_specs.h:30
@ LE_RT_FONT
Definition: le_specs.h:23
@ LE_RT_MENU
Definition: le_specs.h:19
@ LE_RT_HELPSUBTABLE
Definition: le_specs.h:35
@ LE_RT_DIALOG
Definition: le_specs.h:20
@ LE_RT_FONTDIR
Definition: le_specs.h:22
@ LE_RT_DLGINCLUDE
Definition: le_specs.h:27
@ LE_RT_HELPTABLE
Definition: le_specs.h:34
@ LE_RT_MESSAGE
Definition: le_specs.h:26
@ LE_RT_ACCELTABLE
Definition: le_specs.h:24

Function Documentation

◆ RZ_PACKED()

RZ_PACKED ( typedef union LE_entry_bundle_entry_u { RZ_PACKED(struct { ut8 flags;ut16 offset;}) entry_16;RZ_PACKED(struct { ut8 flags;ut16 offset;ut16 callgate_sel;}) callgate;RZ_PACKED(struct { ut8 flags;ut32 offset;}) entry_32;RZ_PACKED(struct { ut8 flags;ut16 import_ord;ut32 offset;}) forwarder;}  )

References flags.