7 #define DECOMPILER_TYPE_FUNCS 0
8 #define DECOMPILER_TYPE_BLCKS 1
9 #define DECOMPILER_TYPE_UNSET 2
10 #define DECOMPILER_TYPE_ALL 3
12 #define DECOMPILER_MAX_SECTIONS 256
15 using json = nlohmann::json;
22 vector<uint64_t> visited;
24 string sha256(
const char *trait);
25 float entropy(
string trait);
26 vector<char> t2c(
string trait);
29 uint trait_size(
string s);
30 string rtrim(
const std::string &s);
31 string hexdump_be(
const void *data,
size_t size,
bool cont);
32 string hexdump_mem_disp(uint64_t disp);
33 string wildcard_bytes(
string bytes,
string sub_bytes);
34 string wildcard_all(
string bytes);
40 struct Section sections[DECOMPILER_MAX_SECTIONS];
42 bool Setup(cs_arch arch, cs_mode mode);
43 int x86_64(
void *data,
size_t data_size,
size_t data_offset, uint index);
44 void PrintTraits(
bool pretty);
45 void WriteTraits(
char *file_path,
bool pretty);