Theodosius  v3.0
Jit linker, mapper, obfuscator, and mutator
Classes | Typedefs | Functions | Variables
theo::obf::transform Namespace Reference

this namespace encompasses the code for transforming relocations. More...

Classes

class  add_op_t
 
class  operation_t
 operation_t is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (operation_t::operation_t). More...
 
class  rol_op_t
 
class  ror_op_t
 
class  sub_op_t
 
class  xor_op_t
 

Typedefs

using transform_t = std::function< std::size_t(std::size_t, std::uint32_t)>
 lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value used in transformation). More...
 

Functions

std::vector< std::uint8_t > generate (xed_decoded_inst_t *inst, recomp::reloc_t *reloc, std::uint8_t low, std::uint8_t high)
 generate a sequence of transformations given an instruction that has a relocation in it. More...
 

Variables

std::map< xed_iclass_enum_t, operation_t * > operations
 map of all of the operations and their type. More...
 

Detailed Description

this namespace encompasses the code for transforming relocations.

Typedef Documentation

◆ transform_t

using theo::obf::transform::transform_t = typedef std::function<std::size_t(std::size_t, std::uint32_t)>

lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value used in transformation).

Function Documentation

◆ generate()

std::vector<std::uint8_t> theo::obf::transform::generate ( xed_decoded_inst_t *  inst,
recomp::reloc_t reloc,
std::uint8_t  low,
std::uint8_t  high 
)
inline

generate a sequence of transformations given an instruction that has a relocation in it.

Parameters
instinstruction that has a relocation in it.
relocmeta data relocation object for the instruction.
lowlowest number of transformations to generate.
highhighest number of transformations to generate.
Returns

Variable Documentation

◆ operations

std::map<xed_iclass_enum_t, operation_t*> theo::obf::transform::operations
inline
Initial value:
= {
{XED_ICLASS_ADD, add_op_t::get()},
{XED_ICLASS_SUB, sub_op_t::get()},
{XED_ICLASS_ROL, rol_op_t::get()},
{XED_ICLASS_ROR, ror_op_t::get()},
{XED_ICLASS_XOR, xor_op_t::get()}}

map of all of the operations and their type.