-
Notifications
You must be signed in to change notification settings - Fork 0
/
libntldd.h.in
80 lines (66 loc) · 2 KB
/
libntldd.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#ifndef __LIBNTLDD_H__
#define __LIBNTLDD_H__
#include <stdint.h>
#include <windows.h>
#define NTLDD_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define NTLDD_VERSION_MINOR @PROJECT_VERSION_MINOR@
struct DepTreeElement;
struct ExportTableItem
{
void * address;
char * name;
WORD ordinal;
char * forward_str;
struct ExportTableItem* forward;
int section_index;
DWORD address_offset;
};
struct ImportTableItem
{
uint64_t orig_address;
uint64_t address;
char * name;
int ordinal;
struct DepTreeElement * dll;
struct ExportTableItem* mapped;
};
struct DepTreeElement
{
uint64_t flags;
char * module;
char * export_module;
char * resolved_module;
void * mapped_address;
struct DepTreeElement ** childs;
uint64_t childs_size;
uint64_t childs_len;
uint64_t imports_len;
uint64_t imports_size;
struct ImportTableItem* imports;
uint64_t exports_len;
struct ExportTableItem* exports;
};
#define DEPTREE_VISITED 0x00000001
#define DEPTREE_UNRESOLVED 0x00000002
#define DEPTREE_PROCESSED 0x00000004
int ClearDepStatus(struct DepTreeElement* self, uint64_t flags);
void AddDep(struct DepTreeElement* parent, struct DepTreeElement* child);
typedef struct SearchPaths_t
{
unsigned count;
char** path;
} SearchPaths;
typedef struct BuildTreeConfig_t
{
int datarelocs;
int functionrelocs;
int recursive;
int on_self;
char *** stack;
uint64_t* stack_len;
uint64_t* stack_size;
int machineType;
SearchPaths* searchPaths;
} BuildTreeConfig;
int BuildDepTree(BuildTreeConfig* cfg, char* name, struct DepTreeElement* root, struct DepTreeElement* self);
#endif /* __LIBNTLDD_H__ */