\hypertarget{classtheo_1_1obf_1_1transform_1_1operation__t}{}\doxysection{theo\+::obf\+::transform\+::operation\+\_\+t Class Reference} \label{classtheo_1_1obf_1_1transform_1_1operation__t}\index{theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}} \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__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 (\mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_a3876ca1c7904aed54940e1519fc9fdf4}{operation\+\_\+t\+::operation\+\_\+t}}). {\ttfamily \#include $<$operation.\+hpp$>$} Inheritance diagram for theo\+::obf\+::transform\+::operation\+\_\+t\+: % FIG 0 \doxysubsection*{Public Member Functions} \begin{DoxyCompactItemize} \item \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_a3876ca1c7904aed54940e1519fc9fdf4}{operation\+\_\+t}} (\mbox{\hyperlink{namespacetheo_1_1obf_1_1transform_a875984c1ce09aa998fe48cca55270ecc}{transform\+\_\+t}} op, xed\+\_\+iclass\+\_\+enum\+\_\+t \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_a8558c2a8e78ef8da59674396bc76157f}{type}}) \begin{DoxyCompactList}\small\item\em explicit constructor for \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t}{operation\+\_\+t}} \end{DoxyCompactList}\item std\+::vector$<$ std\+::uint8\+\_\+t $>$ \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_a414b1716ec527c26bfcbd5262c21a7a8}{native}} (const xed\+\_\+decoded\+\_\+inst\+\_\+t $\ast$inst, std\+::uint32\+\_\+t imm) \begin{DoxyCompactList}\small\item\em generates a native transform instruction given an existing instruction. it works like so\+: \end{DoxyCompactList}\item xed\+\_\+iclass\+\_\+enum\+\_\+t \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_a91f9b94436d49659aaabb291786b3c7b}{inverse}} () \begin{DoxyCompactList}\small\item\em gets the inverse operation of the current operation. \end{DoxyCompactList}\item \mbox{\hyperlink{namespacetheo_1_1obf_1_1transform_a875984c1ce09aa998fe48cca55270ecc}{transform\+\_\+t}} $\ast$ \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_a307c6d7d48319d28d39d93c1df18680a}{get\+\_\+transform}} () \begin{DoxyCompactList}\small\item\em gets a pointer to the lambda function which contains the transform logic. \end{DoxyCompactList}\item xed\+\_\+iclass\+\_\+enum\+\_\+t \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_a8558c2a8e78ef8da59674396bc76157f}{type}} () \begin{DoxyCompactList}\small\item\em gets the operation type. such as XED\+\_\+\+ICLASS\+\_\+\+ADD, XED\+\_\+\+ICLASS\+\_\+\+SUB, etc... \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection*{Static Public Member Functions} \begin{DoxyCompactItemize} \item static std\+::size\+\_\+t \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_aaa5859bc3c7f95d99d4d726289593488}{random}} (std\+::size\+\_\+t lowest, std\+::size\+\_\+t largest) \begin{DoxyCompactList}\small\item\em generate a random number in a range. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__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 (\mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t_a3876ca1c7904aed54940e1519fc9fdf4}{operation\+\_\+t\+::operation\+\_\+t}}). Definition at line 61 of file operation.\+hpp. \doxysubsection{Constructor \& Destructor Documentation} \mbox{\Hypertarget{classtheo_1_1obf_1_1transform_1_1operation__t_a3876ca1c7904aed54940e1519fc9fdf4}\label{classtheo_1_1obf_1_1transform_1_1operation__t_a3876ca1c7904aed54940e1519fc9fdf4}} \index{theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}!operation\_t@{operation\_t}} \index{operation\_t@{operation\_t}!theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}} \doxysubsubsection{\texorpdfstring{operation\_t()}{operation\_t()}} {\footnotesize\ttfamily theo\+::obf\+::transform\+::operation\+\_\+t\+::operation\+\_\+t (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespacetheo_1_1obf_1_1transform_a875984c1ce09aa998fe48cca55270ecc}{transform\+\_\+t}}}]{op, }\item[{xed\+\_\+iclass\+\_\+enum\+\_\+t}]{type }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}} explicit constructor for \mbox{\hyperlink{classtheo_1_1obf_1_1transform_1_1operation__t}{operation\+\_\+t}} \begin{DoxyParams}{Parameters} {\em op} & lambda function when executed applies transformations.\\ \hline {\em type} & type of transformation, such as XOR, ADD, SUB, etc...\\ \hline \end{DoxyParams} Definition at line 69 of file operation.\+hpp. \doxysubsection{Member Function Documentation} \mbox{\Hypertarget{classtheo_1_1obf_1_1transform_1_1operation__t_a307c6d7d48319d28d39d93c1df18680a}\label{classtheo_1_1obf_1_1transform_1_1operation__t_a307c6d7d48319d28d39d93c1df18680a}} \index{theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}!get\_transform@{get\_transform}} \index{get\_transform@{get\_transform}!theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}} \doxysubsubsection{\texorpdfstring{get\_transform()}{get\_transform()}} {\footnotesize\ttfamily \mbox{\hyperlink{namespacetheo_1_1obf_1_1transform_a875984c1ce09aa998fe48cca55270ecc}{transform\+\_\+t}}$\ast$ theo\+::obf\+::transform\+::operation\+\_\+t\+::get\+\_\+transform (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} gets a pointer to the lambda function which contains the transform logic. \begin{DoxyReturn}{Returns} a pointer to the lambda function which contains the transform logic. \end{DoxyReturn} Definition at line 133 of file operation.\+hpp. \mbox{\Hypertarget{classtheo_1_1obf_1_1transform_1_1operation__t_a91f9b94436d49659aaabb291786b3c7b}\label{classtheo_1_1obf_1_1transform_1_1operation__t_a91f9b94436d49659aaabb291786b3c7b}} \index{theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}!inverse@{inverse}} \index{inverse@{inverse}!theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}} \doxysubsubsection{\texorpdfstring{inverse()}{inverse()}} {\footnotesize\ttfamily xed\+\_\+iclass\+\_\+enum\+\_\+t theo\+::obf\+::transform\+::operation\+\_\+t\+::inverse (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} gets the inverse operation of the current operation. \begin{DoxyReturn}{Returns} the inverse operation of the current operation. \end{DoxyReturn} Definition at line 126 of file operation.\+hpp. \mbox{\Hypertarget{classtheo_1_1obf_1_1transform_1_1operation__t_a414b1716ec527c26bfcbd5262c21a7a8}\label{classtheo_1_1obf_1_1transform_1_1operation__t_a414b1716ec527c26bfcbd5262c21a7a8}} \index{theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}!native@{native}} \index{native@{native}!theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}} \doxysubsubsection{\texorpdfstring{native()}{native()}} {\footnotesize\ttfamily std\+::vector$<$std\+::uint8\+\_\+t$>$ theo\+::obf\+::transform\+::operation\+\_\+t\+::native (\begin{DoxyParamCaption}\item[{const xed\+\_\+decoded\+\_\+inst\+\_\+t $\ast$}]{inst, }\item[{std\+::uint32\+\_\+t}]{imm }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} generates a native transform instruction given an existing instruction. it works like so\+: mov rax, \&Message\+BoxA ; original instruction with relocation ; this function takes the first operand and out of the original ; instruction and uses it to generate a transformation. xor rax, 0x39280928 ; this would be an example output for the xor ;operation. \begin{DoxyParams}{Parameters} {\em inst} & instruction with a relocation to generate a transformation for.\\ \hline {\em imm} & random 32bit number used in the generate transform.\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} returns the bytes of the native instruction that was encoded. \end{DoxyReturn} Definition at line 89 of file operation.\+hpp. \mbox{\Hypertarget{classtheo_1_1obf_1_1transform_1_1operation__t_aaa5859bc3c7f95d99d4d726289593488}\label{classtheo_1_1obf_1_1transform_1_1operation__t_aaa5859bc3c7f95d99d4d726289593488}} \index{theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}!random@{random}} \index{random@{random}!theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}} \doxysubsubsection{\texorpdfstring{random()}{random()}} {\footnotesize\ttfamily static std\+::size\+\_\+t theo\+::obf\+::transform\+::operation\+\_\+t\+::random (\begin{DoxyParamCaption}\item[{std\+::size\+\_\+t}]{lowest, }\item[{std\+::size\+\_\+t}]{largest }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}} generate a random number in a range. \begin{DoxyParams}{Parameters} {\em lowest} & lowest value of the range.\\ \hline {\em largest} & highest value of the range.\\ \hline \end{DoxyParams} \begin{DoxyReturn}{Returns} a random value in a range. \end{DoxyReturn} Definition at line 148 of file operation.\+hpp. Here is the caller graph for this function\+: % FIG 1 \mbox{\Hypertarget{classtheo_1_1obf_1_1transform_1_1operation__t_a8558c2a8e78ef8da59674396bc76157f}\label{classtheo_1_1obf_1_1transform_1_1operation__t_a8558c2a8e78ef8da59674396bc76157f}} \index{theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}!type@{type}} \index{type@{type}!theo::obf::transform::operation\_t@{theo::obf::transform::operation\_t}} \doxysubsubsection{\texorpdfstring{type()}{type()}} {\footnotesize\ttfamily xed\+\_\+iclass\+\_\+enum\+\_\+t theo\+::obf\+::transform\+::operation\+\_\+t\+::type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}} gets the operation type. such as XED\+\_\+\+ICLASS\+\_\+\+ADD, XED\+\_\+\+ICLASS\+\_\+\+SUB, etc... \begin{DoxyReturn}{Returns} the operation type. such as XED\+\_\+\+ICLASS\+\_\+\+ADD, XED\+\_\+\+ICLASS\+\_\+\+SUB, etc... \end{DoxyReturn} Definition at line 140 of file operation.\+hpp. The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize} \item include/obf/transform/\mbox{\hyperlink{operation_8hpp}{operation.\+hpp}}\end{DoxyCompactItemize}