#pragma once #include namespace theo::obf { class next_inst_pass_t : public pass_t { 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)); }; public: static next_inst_pass_t* get(); void run(decomp::symbol_t* sym); private: std::optional has_next_inst_reloc(decomp::symbol_t*); xed_decoded_inst_t m_tmp_inst; std::uint8_t m_type_inst_bytes[9] = {0x48, 0xC7, 0x44, 0x24, 0x08, 0x44, 0x33, 0x22, 0x11}; }; } // namespace theo::obf