|
|
|
@ -52,7 +52,9 @@ typedef struct _obfuscator_t
|
|
|
|
|
xed_address_width_enum_t addr_width;
|
|
|
|
|
}obfuscator_t, *pobfuscator_t;
|
|
|
|
|
|
|
|
|
|
typedef void* (*FnAllocateMem)(unsigned long size);
|
|
|
|
|
typedef void* (*FnAllocateMem)(uint32_t size);
|
|
|
|
|
|
|
|
|
|
typedef void (*FnMemCopy)(void* dest, void* src, uint32_t size);
|
|
|
|
|
|
|
|
|
|
//snickers
|
|
|
|
|
void obf_one_time_please();
|
|
|
|
@ -69,18 +71,17 @@ void obf_replace_rel_jmps(pobfuscator_t obf);
|
|
|
|
|
//replaces address in the abs jmp stub with the right address of the given label.
|
|
|
|
|
bool obf_resolve_abs_addresses(pobfuscator_t obf);
|
|
|
|
|
|
|
|
|
|
//return number of bytes needed to store given group
|
|
|
|
|
size_t obf_get_group_size(pobfuscator_t obf, int group_id);
|
|
|
|
|
|
|
|
|
|
//copy group to whever u want it to go
|
|
|
|
|
void obf_copy_group_to_buffer(pobfuscator_t obf, void* buffer, int group_id);
|
|
|
|
|
|
|
|
|
|
//generate all the labels after loaded from buffa
|
|
|
|
|
bool obf_gen_all_labels(pobfuscator_t obf);
|
|
|
|
|
|
|
|
|
|
//walk backwards or forwards until placing label
|
|
|
|
|
bool obf_gen_label(pobfuscator_t obf, pcode_link_t start, int32_t delta);
|
|
|
|
|
|
|
|
|
|
//allocate buffers for all groups
|
|
|
|
|
bool obf_allocate_group_buffers(pobfuscator_t obf, FnAllocateMem AllocMem);
|
|
|
|
|
|
|
|
|
|
//copy all instructions from each group into allocated buffers
|
|
|
|
|
bool obf_copy_groups_into_buffers(pobfuscator_t obf, FnMemCopy MemCopy);
|
|
|
|
|
|
|
|
|
|
void obf_dbg_print_code(pobfuscator_t obf);
|
|
|
|
|
|
|
|
|
|