Theodosius v3.0
Jit linker, symbol mapper, and obfuscator
|
the main class responsible for recomposition More...
#include "recomp.hpp"
Public Member Functions | |
recomp_t (decomp::decomp_t *dcmp, allocator_t alloc, copier_t copy, resolver_t resolve) | |
the explicit constructor for the recomp_t class. More... | |
void | allocate () |
when called, this function allocates space for every symbol. More... | |
void | resolve () |
when called, this function resolves all relocations in every symbol. More... | |
void | copy_syms () |
when called, this function copies symbols into allocations. More... | |
void | allocator (allocator_t alloc) |
setter for the allocater lambda function. More... | |
void | copier (copier_t copy) |
setter for the copier lambda function. More... | |
void | resolver (resolver_t resolve) |
setter for the resolve lambda function. More... | |
std::uintptr_t | resolve (const std::string &&sym) |
resolves the address of a function given its name. More... | |
the main class responsible for recomposition
Definition at line 64 of file recomp.hpp.
|
explicit |
the explicit constructor for the recomp_t class.
dcmp | pointer to a decomp_t class. |
alloc | lambda function which is used to allocate memory for symbols. |
copy | lambda function used to copy bytes into allocations. |
resolve | lambda function used to resolve external symbols. |
Definition at line 34 of file recomp.cpp.
void theo::recomp::recomp_t::allocate | ( | ) |
when called, this function allocates space for every symbol.
Definition at line 40 of file recomp.cpp.
References theo::recomp::symbol_table_t::for_each(), theo::decomp::decomp_t::syms(), and theo::decomp::symbol_t::type().
Referenced by theo::theo_t::compose().
void theo::recomp::recomp_t::allocator | ( | allocator_t | alloc | ) |
setter for the allocater lambda function.
alloc | lambda function which allocates memory for symbols. |
Definition at line 163 of file recomp.cpp.
void theo::recomp::recomp_t::copier | ( | copier_t | copy | ) |
setter for the copier lambda function.
copy | copier lambda function used to copy bytes into allocations made by the allocator. |
Definition at line 167 of file recomp.cpp.
void theo::recomp::recomp_t::copy_syms | ( | ) |
when called, this function copies symbols into allocations.
Definition at line 155 of file recomp.cpp.
References theo::decomp::symbol_t::allocated_at(), and theo::decomp::symbol_t::data().
Referenced by theo::theo_t::compose().
void theo::recomp::recomp_t::resolve | ( | ) |
when called, this function resolves all relocations in every symbol.
Definition at line 92 of file recomp.cpp.
References theo::decomp::symbol_t::data(), theo::decomp::function, theo::recomp::reloc_t::get_transforms(), theo::recomp::reloc_t::hash(), theo::decomp::instruction, theo::recomp::reloc_t::name(), theo::decomp::symbol_t::name(), theo::recomp::reloc_t::offset(), theo::decomp::symbol_t::relocs(), theo::decomp::symbol_t::scn(), theo::decomp::section, and theo::decomp::symbol_t::type().
Referenced by theo::theo_t::compose().
std::uintptr_t theo::recomp::recomp_t::resolve | ( | const std::string && | sym | ) |
resolves the address of a function given its name.
sym | the name of the symbol to resolve the location of. |
Definition at line 175 of file recomp.cpp.
References theo::decomp::symbol_t::hash().
void theo::recomp::recomp_t::resolver | ( | resolver_t | resolve | ) |
setter for the resolve lambda function.
resolve | lambda function to resolve external symbols. |
Definition at line 171 of file recomp.cpp.