From b1e74a4466d432829503864891ffb4fec1e3cbfa Mon Sep 17 00:00:00 2001 From: _xeroxz Date: Thu, 7 Apr 2022 17:41:31 -0700 Subject: [PATCH] renamed inst_split to instruction --- include/decomp/symbol.hpp | 2 +- include/obf/passes/jcc_rewrite_pass.hpp | 2 +- include/obf/passes/next_inst_pass.hpp | 2 +- include/obf/passes/reloc_transform_pass.hpp | 2 +- src/theo/decomp/decomp.cpp | 2 +- src/theo/decomp/routine.cpp | 4 ++-- src/theo/recomp/recomp.cpp | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/decomp/symbol.hpp b/include/decomp/symbol.hpp index dd62324..e43401c 100644 --- a/include/decomp/symbol.hpp +++ b/include/decomp/symbol.hpp @@ -6,7 +6,7 @@ #include namespace theo::decomp { -enum sym_type_t { function, inst_split, data, section }; +enum sym_type_t { function, instruction, data, section }; class symbol_t { public: diff --git a/include/obf/passes/jcc_rewrite_pass.hpp b/include/obf/passes/jcc_rewrite_pass.hpp index 4fc9c1b..b8388d0 100644 --- a/include/obf/passes/jcc_rewrite_pass.hpp +++ b/include/obf/passes/jcc_rewrite_pass.hpp @@ -3,7 +3,7 @@ namespace theo::obf { class jcc_rewrite_pass_t : public pass_t { - explicit jcc_rewrite_pass_t() : pass_t(decomp::sym_type_t::inst_split){}; + explicit jcc_rewrite_pass_t() : pass_t(decomp::sym_type_t::instruction){}; public: static jcc_rewrite_pass_t* get(); diff --git a/include/obf/passes/next_inst_pass.hpp b/include/obf/passes/next_inst_pass.hpp index e8d9da7..4e8228d 100644 --- a/include/obf/passes/next_inst_pass.hpp +++ b/include/obf/passes/next_inst_pass.hpp @@ -3,7 +3,7 @@ namespace theo::obf { class next_inst_pass_t : public pass_t { - explicit next_inst_pass_t() : pass_t(decomp::sym_type_t::inst_split) { + explicit next_inst_pass_t() : pass_t(decomp::sym_type_t::instruction) { xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b}; xed_decoded_inst_zero_set_mode(&m_tmp_inst, &istate); xed_decode(&m_tmp_inst, m_type_inst_bytes, sizeof(m_type_inst_bytes)); diff --git a/include/obf/passes/reloc_transform_pass.hpp b/include/obf/passes/reloc_transform_pass.hpp index 6785ee7..de68c4e 100644 --- a/include/obf/passes/reloc_transform_pass.hpp +++ b/include/obf/passes/reloc_transform_pass.hpp @@ -5,7 +5,7 @@ namespace theo::obf { class reloc_transform_pass_t : public pass_t { - explicit reloc_transform_pass_t() : pass_t(decomp::sym_type_t::inst_split){}; + explicit reloc_transform_pass_t() : pass_t(decomp::sym_type_t::instruction){}; public: static reloc_transform_pass_t* get(); diff --git a/src/theo/decomp/decomp.cpp b/src/theo/decomp/decomp.cpp index d8919d5..106180f 100644 --- a/src/theo/decomp/decomp.cpp +++ b/src/theo/decomp/decomp.cpp @@ -53,7 +53,7 @@ std::optional decomp_t::decompose() { auto scn = img->get_section(sym->section_index - 1); auto dcmp_type = scn->name.to_string(img->get_strings()) == INSTR_SPLIT_SECTION_NAME - ? decomp::sym_type_t::inst_split + ? decomp::sym_type_t::instruction : decomp::sym_type_t::function; auto fn_size = scn->size_raw_data; auto fn_bgn = diff --git a/src/theo/decomp/routine.cpp b/src/theo/decomp/routine.cpp index d497e5e..1c14160 100644 --- a/src/theo/decomp/routine.cpp +++ b/src/theo/decomp/routine.cpp @@ -36,7 +36,7 @@ std::vector routine_t::decompose() { m_sym->value, m_data, m_scn, m_sym, relocs, sym_type_t::function)); break; } - case inst_split: { + case instruction: { std::uint32_t offset = 0u; xed_error_enum_t err; @@ -109,7 +109,7 @@ std::vector routine_t::decompose() { result.push_back(decomp::symbol_t(m_img, new_sym_name, offset, inst_bytes, m_scn, m_sym, relocs, - sym_type_t::inst_split)); + sym_type_t::instruction)); // after creating the symbol and dealing with relocs then print the // information we have concluded... diff --git a/src/theo/recomp/recomp.cpp b/src/theo/recomp/recomp.cpp index b3e7fc9..bfb9480 100644 --- a/src/theo/recomp/recomp.cpp +++ b/src/theo/recomp/recomp.cpp @@ -15,7 +15,7 @@ void recomp_t::allocate() { switch (sym.type()) { case decomp::sym_type_t::section: case decomp::sym_type_t::function: - case decomp::sym_type_t::inst_split: { + case decomp::sym_type_t::instruction: { sym.allocated_at(m_allocator(sym.size(), sym.scn()->characteristics)); break; } @@ -95,7 +95,7 @@ void recomp_t::resolve() { reloc.offset()) = allocated_at; break; } - case decomp::sym_type_t::inst_split: { + case decomp::sym_type_t::instruction: { auto& transforms = reloc.get_transforms(); std::for_each( transforms.begin(), transforms.end(),