<!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=11" / >
< meta name = "generator" content = "Doxygen 1.9.3" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< title > Theodosius: theo::obf::transform::operation_t Class 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 id = "projectrow" >
< td id = "projectlogo" > < img alt = "Logo" src = "../../icon.png" / > < / td >
< td id = "projectalign" >
< div id = "projectname" > Theodosius< span id = "projectnumber" >   v3.0< / span >
< / div >
< div id = "projectbrief" > Jit linker, symbol mapper, and obfuscator< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'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:d3d9a9a6595521f9666a5e94cc830dab83b65699& dn=expat.txt MIT */
$(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 = "../../da/de6/namespacetheo.html" > theo< / a > < / li > < li class = "navelem" > < a class = "el" href = "../../d5/da8/namespacetheo_1_1obf.html" > obf< / a > < / li > < li class = "navelem" > < a class = "el" href = "../../d8/d82/namespacetheo_1_1obf_1_1transform.html" > transform< / a > < / li > < li class = "navelem" > < a class = "el" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html" > operation_t< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "#pub-static-methods" > Static Public Member Functions< / a > < / div >
< div class = "headertitle" > < div class = "title" > theo::obf::transform::operation_t Class Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > < a class = "el" href = "../../d7/de2/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 = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" title = "explicit constructor for operation_t" > operation_t::operation_t< / a > ).
< a href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#details" > More...< / a > < / p >
< p > < code > #include " < a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > " < / code > < / p >
< div class = "dynheader" >
Inheritance diagram for theo::obf::transform::operation_t:< / div >
< div class = "dyncontent" >
< div class = "center" >
< img src = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.png" usemap = "#theo::obf::transform::operation_5Ft_map" alt = "" / >
< map id = "theo::obf::transform::operation_5Ft_map" name = "theo::obf::transform::operation_5Ft_map" >
< area href = "../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html" alt = "theo::obf::transform::add_op_t" shape = "rect" coords = "0,56,188,80" / >
< area href = "../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html" alt = "theo::obf::transform::rol_op_t" shape = "rect" coords = "198,56,386,80" / >
< area href = "../../db/d8f/classtheo_1_1obf_1_1transform_1_1ror__op__t.html" alt = "theo::obf::transform::ror_op_t" shape = "rect" coords = "396,56,584,80" / >
< area href = "../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html" alt = "theo::obf::transform::sub_op_t" shape = "rect" coords = "594,56,782,80" / >
< area href = "../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html" alt = "theo::obf::transform::xor_op_t" shape = "rect" coords = "792,56,980,80" / >
< / map >
< / div > < / div >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "pub-methods" name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a3876ca1c7904aed54940e1519fc9fdf4" > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" > operation_t< / a > (< a class = "el" href = "../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc" > transform_t< / a > op, xed_iclass_enum_t < a class = "el" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f" > type< / a > )< / td > < / tr >
< tr class = "memdesc:a3876ca1c7904aed54940e1519fc9fdf4" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > explicit constructor for < a class = "el" href = "../../d7/de2/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 > < a href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a3876ca1c7904aed54940e1519fc9fdf4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a30cad572f62baf0c10fdc7026d7cba44" > < td class = "memItemLeft" align = "right" valign = "top" > std::vector< std::uint8_t >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a30cad572f62baf0c10fdc7026d7cba44" > native< / a > (const xed_decoded_inst_t *inst, std::uint32_t imm)< / td > < / tr >
< tr class = "memdesc:a30cad572f62baf0c10fdc7026d7cba44" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > generates a native transform instruction given an existing instruction. it works like so: < a href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a30cad572f62baf0c10fdc7026d7cba44" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a30cad572f62baf0c10fdc7026d7cba44" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a91f9b94436d49659aaabb291786b3c7b" > < td class = "memItemLeft" align = "right" valign = "top" > xed_iclass_enum_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a91f9b94436d49659aaabb291786b3c7b" > inverse< / a > ()< / td > < / tr >
< tr class = "memdesc:a91f9b94436d49659aaabb291786b3c7b" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > gets the inverse operation of the current operation. < a href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a91f9b94436d49659aaabb291786b3c7b" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a91f9b94436d49659aaabb291786b3c7b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aed18bfd26da1a198f3b5f81525bcbb66" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc" > transform_t< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aed18bfd26da1a198f3b5f81525bcbb66" > get_transform< / a > ()< / td > < / tr >
< tr class = "memdesc:aed18bfd26da1a198f3b5f81525bcbb66" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > gets a pointer to the lambda function which contains the transform logic. < a href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aed18bfd26da1a198f3b5f81525bcbb66" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:aed18bfd26da1a198f3b5f81525bcbb66" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8558c2a8e78ef8da59674396bc76157f" > < td class = "memItemLeft" align = "right" valign = "top" > xed_iclass_enum_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f" > type< / a > ()< / td > < / tr >
< tr class = "memdesc:a8558c2a8e78ef8da59674396bc76157f" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc... < a href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:a8558c2a8e78ef8da59674396bc76157f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a id = "pub-static-methods" name = "pub-static-methods" > < / a >
Static Public Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:aaa5859bc3c7f95d99d4d726289593488" > < td class = "memItemLeft" align = "right" valign = "top" > static std::size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aaa5859bc3c7f95d99d4d726289593488" > random< / a > (std::size_t lowest, std::size_t largest)< / td > < / tr >
< tr class = "memdesc:aaa5859bc3c7f95d99d4d726289593488" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > generate a random number in a range. < a href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aaa5859bc3c7f95d99d4d726289593488" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:aaa5859bc3c7f95d99d4d726289593488" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > < a class = "el" href = "../../d7/de2/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 = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" title = "explicit constructor for operation_t" > operation_t::operation_t< / a > ). < / p >
< p class = "definition" > Definition at line < a class = "el" href = "../../d5/da4/operation_8hpp_source.html#l00061" > 61< / a > of file < a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > .< / p >
< / div > < h2 class = "groupheader" > Constructor & Destructor Documentation< / h2 >
< a id = "a3876ca1c7904aed54940e1519fc9fdf4" name = "a3876ca1c7904aed54940e1519fc9fdf4" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a3876ca1c7904aed54940e1519fc9fdf4" > ◆ < / a > < / span > operation_t()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > theo::obf::transform::operation_t::operation_t < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc" > transform_t< / a >   < / td >
< td class = "paramname" > < em > op< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > xed_iclass_enum_t  < / td >
< td class = "paramname" > < em > type< / em >   < / 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 class = "mlabel" > explicit< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > explicit constructor for < a class = "el" href = "../../d7/de2/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 > < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > op< / td > < td > lambda function when executed applies transformations.< / td > < / tr >
< tr > < td class = "paramname" > type< / td > < td > type of transformation, such as XOR, ADD, SUB, etc...< / td > < / tr >
< / table >
< / dd >
< / dl >
< p class = "definition" > Definition at line < a class = "el" href = "../../d5/da4/operation_8hpp_source.html#l00069" > 69< / a > of file < a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > .< / p >
< div class = "fragment" > < div class = "line" > < span class = "lineno" > 70< / span > : m_transform(op), m_type(< a class = "code hl_function" href = "../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f" title = "gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc..." > type< / a > ) {}< / div >
< / div > <!-- fragment -->
< / div >
< / div >
< h2 class = "groupheader" > Member Function Documentation< / h2 >
< a id = "aed18bfd26da1a198f3b5f81525bcbb66" name = "aed18bfd26da1a198f3b5f81525bcbb66" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aed18bfd26da1a198f3b5f81525bcbb66" > ◆ < / a > < / span > get_transform()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc" > transform_t< / a > * theo::obf::transform::operation_t::get_transform < / td >
< td > (< / td >
< td class = "paramname" > < / 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 > gets a pointer to the lambda function which contains the transform logic. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > a pointer to the lambda function which contains the transform logic.< / dd > < / dl >
< p class = "definition" > Definition at line < a class = "el" href = "../../d5/da4/operation_8hpp_source.html#l00133" > 133< / a > of file < a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > .< / p >
< div class = "fragment" > < div class = "line" > < span class = "lineno" > 133< / span > { < span class = "keywordflow" > return< / span > & m_transform; }< / div >
< / div > <!-- fragment -->
< / div >
< / div >
< a id = "a91f9b94436d49659aaabb291786b3c7b" name = "a91f9b94436d49659aaabb291786b3c7b" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a91f9b94436d49659aaabb291786b3c7b" > ◆ < / a > < / span > inverse()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > xed_iclass_enum_t theo::obf::transform::operation_t::inverse < / td >
< td > (< / td >
< td class = "paramname" > < / 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 > gets the inverse operation of the current operation. < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > the inverse operation of the current operation.< / dd > < / dl >
< p class = "definition" > Definition at line < a class = "el" href = "../../d5/da4/operation_8hpp_source.html#l00126" > 126< / a > of file < a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > .< / p >
< div class = "fragment" > < div class = "line" > < span class = "lineno" > 126< / span > { < span class = "keywordflow" > return< / span > m_inverse_op[m_type]; }< / div >
< / div > <!-- fragment -->
< / div >
< / div >
< a id = "a30cad572f62baf0c10fdc7026d7cba44" name = "a30cad572f62baf0c10fdc7026d7cba44" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a30cad572f62baf0c10fdc7026d7cba44" > ◆ < / a > < / span > native()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > std::vector< std::uint8_t > theo::obf::transform::operation_t::native < / td >
< td > (< / td >
< td class = "paramtype" > const xed_decoded_inst_t *  < / td >
< td class = "paramname" > < em > inst< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > std::uint32_t  < / td >
< td class = "paramname" > < em > imm< / em >   < / 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 > generates a native transform instruction given an existing instruction. it works like so: < / p >
< p > mov rax, & MessageBoxA ; original instruction with relocation< / p >
< p > ; this function takes the first operand and out of the original ; instruction and uses it to generate a transformation.< / p >
< p > xor rax, 0x39280928 ; this would be an example output for the xor ;operation.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > inst< / td > < td > instruction with a relocation to generate a transformation for.< / td > < / tr >
< tr > < td class = "paramname" > imm< / td > < td > random 32bit number used in the generate transform.< / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > returns the bytes of the native instruction that was encoded.< / dd > < / dl >
< p class = "definition" > Definition at line < a class = "el" href = "../../d5/da4/operation_8hpp_source.html#l00089" > 89< / a > of file < a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > .< / p >
< div class = "fragment" > < div class = "line" > < span class = "lineno" > 90< / span > {< / div >
< div class = "line" > < span class = "lineno" > 91< / span > std::uint32_t inst_len = {};< / div >
< div class = "line" > < span class = "lineno" > 92< / span > std::uint8_t inst_buff[XED_MAX_INSTRUCTION_BYTES];< / div >
< div class = "line" > < span class = "lineno" > 93< / span > < / div >
< div class = "line" > < span class = "lineno" > 94< / span > xed_error_enum_t err;< / div >
< div class = "line" > < span class = "lineno" > 95< / span > xed_encoder_request_init_from_decode((xed_decoded_inst_s*)inst);< / div >
< div class = "line" > < span class = "lineno" > 96< / span > xed_encoder_request_t* req = (xed_encoder_request_t*)inst;< / div >
< div class = "line" > < span class = "lineno" > 97< / span > < / div >
< div class = "line" > < span class = "lineno" > 98< / span > < span class = "keywordflow" > switch< / span > (m_type) {< / div >
< div class = "line" > < span class = "lineno" > 99< / span > < span class = "keywordflow" > case< / span > XED_ICLASS_ROR:< / div >
< div class = "line" > < span class = "lineno" > 100< / span > < span class = "keywordflow" > case< / span > XED_ICLASS_ROL:< / div >
< div class = "line" > < span class = "lineno" > 101< / span > xed_encoder_request_set_uimm0(req, imm, 1);< / div >
< div class = "line" > < span class = "lineno" > 102< / span > < span class = "keywordflow" > break< / span > ;< / div >
< div class = "line" > < span class = "lineno" > 103< / span > < span class = "keywordflow" > default< / span > :< / div >
< div class = "line" > < span class = "lineno" > 104< / span > xed_encoder_request_set_uimm0(req, imm, 4);< / div >
< div class = "line" > < span class = "lineno" > 105< / span > < span class = "keywordflow" > break< / span > ;< / div >
< div class = "line" > < span class = "lineno" > 106< / span > }< / div >
< div class = "line" > < span class = "lineno" > 107< / span > < / div >
< div class = "line" > < span class = "lineno" > 108< / span > xed_encoder_request_set_iclass(req, m_type);< / div >
< div class = "line" > < span class = "lineno" > 109< / span > xed_encoder_request_set_operand_order(req, 1, XED_OPERAND_IMM0);< / div >
< div class = "line" > < span class = "lineno" > 110< / span > < / div >
< div class = "line" > < span class = "lineno" > 111< / span > < span class = "keywordflow" > if< / span > ((err = xed_encode(req, inst_buff, < span class = "keyword" > sizeof< / span > (inst_buff), & inst_len)) !=< / div >
< div class = "line" > < span class = "lineno" > 112< / span > XED_ERROR_NONE) {< / div >
< div class = "line" > < span class = "lineno" > 113< / span > spdlog::error(< span class = "stringliteral" > " failed to encode instruction... reason: {}" < / span > ,< / div >
< div class = "line" > < span class = "lineno" > 114< / span > xed_error_enum_t2str(err));< / div >
< div class = "line" > < span class = "lineno" > 115< / span > < / div >
< div class = "line" > < span class = "lineno" > 116< / span > assert(err == XED_ERROR_NONE);< / div >
< div class = "line" > < span class = "lineno" > 117< / span > }< / div >
< div class = "line" > < span class = "lineno" > 118< / span > < / div >
< div class = "line" > < span class = "lineno" > 119< / span > < span class = "keywordflow" > return< / span > std::vector< std::uint8_t> (inst_buff, inst_buff + inst_len);< / div >
< div class = "line" > < span class = "lineno" > 120< / span > }< / div >
< / div > <!-- fragment -->
< / div >
< / div >
< a id = "aaa5859bc3c7f95d99d4d726289593488" name = "aaa5859bc3c7f95d99d4d726289593488" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#aaa5859bc3c7f95d99d4d726289593488" > ◆ < / a > < / span > random()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > static std::size_t theo::obf::transform::operation_t::random < / td >
< td > (< / td >
< td class = "paramtype" > std::size_t  < / td >
< td class = "paramname" > < em > lowest< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > std::size_t  < / td >
< td class = "paramname" > < em > largest< / em >   < / 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 class = "mlabel" > static< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > generate a random number in a range. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > lowest< / td > < td > lowest value of the range.< / td > < / tr >
< tr > < td class = "paramname" > largest< / td > < td > highest value of the range.< / td > < / tr >
< / table >
< / dd >
< / dl >
< dl class = "section return" > < dt > Returns< / dt > < dd > a random value in a range.< / dd > < / dl >
< p class = "definition" > Definition at line < a class = "el" href = "../../d5/da4/operation_8hpp_source.html#l00148" > 148< / a > of file < a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > .< / p >
< div class = "fragment" > < div class = "line" > < span class = "lineno" > 148< / span > {< / div >
< div class = "line" > < span class = "lineno" > 149< / span > std::random_device rd;< / div >
< div class = "line" > < span class = "lineno" > 150< / span > std::mt19937 gen(rd());< / div >
< div class = "line" > < span class = "lineno" > 151< / span > std::uniform_int_distribution< std::size_t> distr(lowest, largest);< / div >
< div class = "line" > < span class = "lineno" > 152< / span > < span class = "keywordflow" > return< / span > distr(gen);< / div >
< div class = "line" > < span class = "lineno" > 153< / span > }< / div >
< / div > <!-- fragment -->
< p class = "reference" > Referenced by < a class = "el" href = "../../d5/d18/gen_8hpp_source.html#l00045" > theo::obf::transform::generate()< / a > .< / p >
< / div >
< / div >
< a id = "a8558c2a8e78ef8da59674396bc76157f" name = "a8558c2a8e78ef8da59674396bc76157f" > < / a >
< h2 class = "memtitle" > < span class = "permalink" > < a href = "#a8558c2a8e78ef8da59674396bc76157f" > ◆ < / a > < / span > type()< / h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > xed_iclass_enum_t theo::obf::transform::operation_t::type < / td >
< td > (< / td >
< td class = "paramname" > < / 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 > gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc... < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc...< / dd > < / dl >
< p class = "definition" > Definition at line < a class = "el" href = "../../d5/da4/operation_8hpp_source.html#l00140" > 140< / a > of file < a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > .< / p >
< div class = "fragment" > < div class = "line" > < span class = "lineno" > 140< / span > { < span class = "keywordflow" > return< / span > m_type; }< / div >
< / div > <!-- fragment -->
< / div >
< / div >
< hr / > The documentation for this class was generated from the following file:< ul >
< li > include/obf/transform/< a class = "el" href = "../../d5/da4/operation_8hpp_source.html" > operation.hpp< / a > < / li >
< / ul >
< / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
Generated by  < a href = "https://www.doxygen.org/index.html" > < img class = "footer" src = "../../doxygen.svg" width = "104" height = "31" alt = "doxygen" / > < / a > 1.9.3
< / small > < / address >
< / body >
< / html >