i need to rewrite how i get routine bytes since each funtion doesnt

nesscarly get its own section...
3.0
_xeroxz 3 years ago
parent 1c51f37f60
commit a0d35c1d5e

@ -66,7 +66,9 @@ int main(int argc, char* argv[]) {
spdlog::info("decomposed {} symbols...", res.value()); spdlog::info("decomposed {} symbols...", res.value());
auto entry_pnt = t.compose(); auto entry_pnt = t.compose();
auto winproc = t.resolve("?GetIO@ImGui@@YAAEAUImGuiIO@@XZ");
spdlog::info("entry point address: {:X}", entry_pnt); spdlog::info("entry point address: {:X}", entry_pnt);
spdlog::info("?GetIO@ImGui@@YAAEAUImGuiIO@@XZ: {:X}", winproc);
std::getchar(); std::getchar();
reinterpret_cast<void (*)()>(entry_pnt)(); reinterpret_cast<void (*)()>(entry_pnt)();
} }

@ -46,4 +46,10 @@ std::uintptr_t theo_t::compose() {
m_recmp.copy_syms(); m_recmp.copy_syms();
return m_recmp.resolve(m_entry_sym.data()); 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 } // namespace theo
Loading…
Cancel
Save