Theodosius v3.0
Jit linker, symbol mapper, and obfuscator
Public Member Functions | Static Public Member Functions
theo::obf::engine_t Class Reference

singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. More...

#include "engine.hpp"

Public Member Functions

void add_pass (pass_t *pass)
 add a pass to the engine. the order in which you call this function matters as the underlying data structure that contains the passes is a vector. More...
 
void run (decomp::symbol_t *sym)
 run all the passes on the symbol. this function will only run a pass if the symbol is the same type as the pass requires. More...
 

Static Public Member Functions

static engine_tget ()
 get the singleton object of this class. More...
 

Detailed Description

singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them.

Definition at line 42 of file engine.hpp.

Member Function Documentation

◆ add_pass()

void theo::obf::engine_t::add_pass ( pass_t pass)

add a pass to the engine. the order in which you call this function matters as the underlying data structure that contains the passes is a vector.

Parameters
passa pointer to the pass in which to add to the engine.

Definition at line 39 of file engine.cpp.

39 {
40 passes.push_back(pass);
41}

◆ get()

engine_t * theo::obf::engine_t::get ( )
static

get the singleton object of this class.

Returns
the singleton object of this class.

Definition at line 34 of file engine.cpp.

34 {
35 static engine_t obj;
36 return &obj;
37}

Referenced by theo::theo_t::compose(), and main().

◆ run()

void theo::obf::engine_t::run ( decomp::symbol_t sym)

run all the passes on the symbol. this function will only run a pass if the symbol is the same type as the pass requires.

Parameters
symsymbol to run all passes on.

Definition at line 43 of file engine.cpp.

43 {
44 std::for_each(passes.begin(), passes.end(), [&](pass_t* pass) {
45 if (sym->type() & pass->sym_type())
46 pass->run(sym);
47 });
48}

The documentation for this class was generated from the following files: