//#include "Obfuscator.h" // //#include "xed/xed-interface.h" // //int main() //{ // xed_decoded_inst_t instruction; // // return 1; //} //#pragma comment(lib, "xed.lib") #include "Obfuscator.h" int main(int argc, char** argv) { unsigned char buffer[] = { 0x48, 0x33, 0xC0, 0x48, 0x33, 0xC0, 0xEB, 0x08, 0x48, 0x33, 0xC0, 0x7E, 0x03, 0x48, 0x33, 0xC0, 0x48, 0x33, 0xC0, 0x48, 0x33, 0xC0, 0x48, 0x33, 0xC0, 0xEB, 0x08, 0x48, 0x33, 0xC0, 0x7E, 0x03, 0x48, 0x33, 0xC0, 0x48, 0x33, 0xC0 };//{ 0x48, 0x33, 0xC0, 0x48, 0x33, 0xC0, 0xEB, 0xFB, 0x48, 0x33, 0xC0, 0x7E, 0xF6, 0xC3 }; unsigned int buffer_size = sizeof(buffer); obfuscator_t obf; obf_one_time_please(); obf_init_from_buffer(&obf, buffer, buffer_size); obf_gen_all_labels(&obf); obf_replace_rel_jmps(&obf); obf_create_groups(&obf, 10); obf_resolve_abs_addresses(&obf); printf("\n\n"); obf_dbg_print_code(&obf); printf("%u is num of groups.\n", obf.groups.size()); /*for (int i = 0; i < obf.groups.size(); i++) { printf("\nprinting group %d \n", i); obf_dbg_print_group(&obf, i); }*/ system("pause"); }