diff --git a/src/tests/demo/main.cpp b/src/tests/demo/main.cpp index 66f13a8..579a091 100644 --- a/src/tests/demo/main.cpp +++ b/src/tests/demo/main.cpp @@ -66,7 +66,9 @@ int main(int argc, char* argv[]) { spdlog::info("decomposed {} symbols...", res.value()); auto entry_pnt = t.compose(); + auto winproc = t.resolve("?GetIO@ImGui@@YAAEAUImGuiIO@@XZ"); spdlog::info("entry point address: {:X}", entry_pnt); + spdlog::info("?GetIO@ImGui@@YAAEAUImGuiIO@@XZ: {:X}", winproc); std::getchar(); reinterpret_cast(entry_pnt)(); } \ No newline at end of file diff --git a/src/theo/theo.cpp b/src/theo/theo.cpp index 97d7a30..e5fc55d 100644 --- a/src/theo/theo.cpp +++ b/src/theo/theo.cpp @@ -46,4 +46,10 @@ std::uintptr_t theo_t::compose() { m_recmp.copy_syms(); return m_recmp.resolve(m_entry_sym.data()); } + +std::uintptr_t theo_t::resolve(const std::string&& sym) { + return m_sym_tbl.sym_from_hash(decomp::symbol_t::hash(sym)) + .value() + ->allocated_at(); +} } // namespace theo \ No newline at end of file