-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathSettings.h
More file actions
99 lines (79 loc) · 1.55 KB
/
Copy pathSettings.h
File metadata and controls
99 lines (79 loc) · 1.55 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef __SETTINGS_H__
#define __SETTINGS_H__
#include <vector>
#include <string>
#include <stdint.h>
#define DEFAULT_ANTIDISASM_FREQUENCY 20
enum Architecture
{
ARCH_X86,
ARCH_QUARK,
ARCH_MIPS,
ARCH_ARM,
ARCH_AARCH64,
ARCH_PPC,
};
enum OperatingSystem
{
OS_NONE,
OS_LINUX,
OS_FREEBSD,
OS_MAC,
OS_WINDOWS
};
enum OutputFormat
{
FORMAT_BIN,
FORMAT_ELF,
FORMAT_PE,
FORMAT_MACHO,
FORMAT_LIB
};
enum OptimizationLevel
{
OPTIMIZE_DISABLE,
OPTIMIZE_SIZE,
OPTIMIZE_NORMAL
};
class Variable;
struct Settings
{
std::vector<uint8_t> blacklist;
std::vector<std::string> preservedRegs;
std::string stackRegName, frameRegName, returnRegName, returnHighRegName;
uint32_t stackPointer, framePointer, returnReg, returnHighReg, basePointer;
std::vector<std::string> includeDirs;
std::map<std::string, uint64_t> funcAddrs;
std::map<std::string, uint64_t> funcPtrAddrs;
Architecture architecture;
OperatingSystem os;
OutputFormat format;
OptimizationLevel optimization;
uint32_t preferredBits;
bool bigEndian;
bool gui, forcePebScan, usesUnloadedModule;
bool allowReturn;
bool unsafeStack;
bool execStack;
bool concat;
bool sharedLibrary;
bool pad;
size_t maxLength;
bool stackGrowsUp;
bool encodePointers;
Ref<Variable> encodePointerKey;
bool polymorph, mixedMode;
uint32_t seed;
bool markovChains;
std::string markovFile;
bool antiDisasm;
uint32_t antiDisasmFrequency;
bool positionIndependent;
uint64_t base;
uint64_t dataSectionBase;
uint32_t alignment;
uint32_t stackAlignment;
bool internalDebug;
bool sizeInfo;
};
#endif