You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Theodosius/doxygen/html/namespacetheo_1_1obf_1_1tra...

246 lines
14 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Theodosius: theo::obf::transform Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Theodosius
&#160;<span id="projectnumber">v3.0</span>
</div>
<div id="projectbrief">Jit linker, mapper, obfuscator, and mutator</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacetheo.html">theo</a></li><li class="navelem"><a class="el" href="namespacetheo_1_1obf.html">obf</a></li><li class="navelem"><a class="el" href="namespacetheo_1_1obf_1_1transform.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle">
<div class="title">theo::obf::transform Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>this namespace encompasses the code for transforming relocations.
<a href="namespacetheo_1_1obf_1_1transform.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtheo_1_1obf_1_1transform_1_1operation__t.html">operation_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classtheo_1_1obf_1_1transform_1_1operation__t.html" title="operation_t is the base class for all types of transformations. classes that inherit this class are s...">operation_t</a> is the base class for all types of transformations. classes that inherit this class are singleton and simply call the super constructor (<a class="el" href="classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" title="explicit constructor for operation_t">operation_t::operation_t</a>). <a href="classtheo_1_1obf_1_1transform_1_1operation__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtheo_1_1obf_1_1transform_1_1ror__op__t.html">ror_op_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classtheo_1_1obf_1_1transform_1_1xor__op__t.html">xor_op_t</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a875984c1ce09aa998fe48cca55270ecc"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc">transform_t</a> = std::function&lt; std::size_t(std::size_t, std::uint32_t)&gt;</td></tr>
<tr class="memdesc:a875984c1ce09aa998fe48cca55270ecc"><td class="mdescLeft">&#160;</td><td class="mdescRight">lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value used in transformation). <a href="namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc">More...</a><br /></td></tr>
<tr class="separator:a875984c1ce09aa998fe48cca55270ecc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a416c6c93ce55a4ab9f70592951d15704"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetheo_1_1obf_1_1transform.html#a416c6c93ce55a4ab9f70592951d15704">generate</a> (xed_decoded_inst_t *inst, <a class="el" href="classtheo_1_1recomp_1_1reloc__t.html">recomp::reloc_t</a> *reloc, std::uint8_t low, std::uint8_t high)</td></tr>
<tr class="memdesc:a416c6c93ce55a4ab9f70592951d15704"><td class="mdescLeft">&#160;</td><td class="mdescRight">generate a sequence of transformations given an instruction that has a relocation in it. <a href="namespacetheo_1_1obf_1_1transform.html#a416c6c93ce55a4ab9f70592951d15704">More...</a><br /></td></tr>
<tr class="separator:a416c6c93ce55a4ab9f70592951d15704"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0"><td class="memItemLeft" align="right" valign="top">std::map&lt; xed_iclass_enum_t, <a class="el" href="classtheo_1_1obf_1_1transform_1_1operation__t.html">operation_t</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0">operations</a></td></tr>
<tr class="memdesc:a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">map of all of the operations and their type. <a href="namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0">More...</a><br /></td></tr>
<tr class="separator:a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>this namespace encompasses the code for transforming relocations. </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a875984c1ce09aa998fe48cca55270ecc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a875984c1ce09aa998fe48cca55270ecc">&#9670;&nbsp;</a></span>transform_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc">theo::obf::transform::transform_t</a> = typedef std::function&lt;std::size_t(std::size_t, std::uint32_t)&gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p>lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value used in transformation). </p>
<p class="definition">Definition at line <a class="el" href="operation_8hpp_source.html#l00054">54</a> of file <a class="el" href="operation_8hpp_source.html">operation.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a416c6c93ce55a4ab9f70592951d15704"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a416c6c93ce55a4ab9f70592951d15704">&#9670;&nbsp;</a></span>generate()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt;std::uint8_t&gt; theo::obf::transform::generate </td>
<td>(</td>
<td class="paramtype">xed_decoded_inst_t *&#160;</td>
<td class="paramname"><em>inst</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classtheo_1_1recomp_1_1reloc__t.html">recomp::reloc_t</a> *&#160;</td>
<td class="paramname"><em>reloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::uint8_t&#160;</td>
<td class="paramname"><em>low</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::uint8_t&#160;</td>
<td class="paramname"><em>high</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>generate a sequence of transformations given an instruction that has a relocation in it. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">inst</td><td>instruction that has a relocation in it.</td></tr>
<tr><td class="paramname">reloc</td><td>meta data relocation object for the instruction.</td></tr>
<tr><td class="paramname">low</td><td>lowest number of transformations to generate.</td></tr>
<tr><td class="paramname">high</td><td>highest number of transformations to generate.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>
<p class="definition">Definition at line <a class="el" href="gen_8hpp_source.html#l00045">45</a> of file <a class="el" href="gen_8hpp_source.html">gen.hpp</a>.</p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="namespacetheo_1_1obf_1_1transform_a416c6c93ce55a4ab9f70592951d15704_cgraph.png" border="0" usemap="#anamespacetheo_1_1obf_1_1transform_a416c6c93ce55a4ab9f70592951d15704_cgraph" alt=""/></div>
</div>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0">&#9670;&nbsp;</a></span>operations</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::map&lt;xed_iclass_enum_t, <a class="el" href="classtheo_1_1obf_1_1transform_1_1operation__t.html">operation_t</a>*&gt; theo::obf::transform::operations</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div>
<div class="line"> {XED_ICLASS_ADD, add_op_t::get()},</div>
<div class="line"> {XED_ICLASS_SUB, sub_op_t::get()},</div>
<div class="line"> {XED_ICLASS_ROL, rol_op_t::get()},</div>
<div class="line"> {XED_ICLASS_ROR, ror_op_t::get()},</div>
<div class="line"> {XED_ICLASS_XOR, xor_op_t::get()}}</div>
</div><!-- fragment -->
<p>map of all of the operations and their type. </p>
<p class="definition">Definition at line <a class="el" href="transform_8hpp_source.html#l00042">42</a> of file <a class="el" href="transform_8hpp_source.html">transform.hpp</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>