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.
88 lines
11 KiB
88 lines
11 KiB
3 years ago
|
\hypertarget{pass_8hpp_source}{}\doxysection{pass.\+hpp}
|
||
|
\label{pass_8hpp_source}\index{include/obf/pass.hpp@{include/obf/pass.hpp}}
|
||
|
\mbox{\hyperlink{pass_8hpp}{Go to the documentation of this file.}}
|
||
|
\begin{DoxyCode}{0}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00001}00001 \textcolor{comment}{// Copyright (c) 2022, \_xeroxz}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00002}00002 \textcolor{comment}{// All rights reserved.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00003}00003 \textcolor{comment}{//}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00004}00004 \textcolor{comment}{// Redistribution and use in source and binary forms, with or without}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00005}00005 \textcolor{comment}{// modification, are permitted provided that the following conditions are met:}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00006}00006 \textcolor{comment}{//}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00007}00007 \textcolor{comment}{// 1. Redistributions of source code must retain the above copyright notice,}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00008}00008 \textcolor{comment}{// this list of conditions and the following disclaimer.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00009}00009 \textcolor{comment}{//}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00010}00010 \textcolor{comment}{// 2. Redistributions in binary form must reproduce the above copyright notice,}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00011}00011 \textcolor{comment}{// this list of conditions and the following disclaimer in the documentation}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00012}00012 \textcolor{comment}{// and/or other materials provided with the distribution.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00013}00013 \textcolor{comment}{//}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00014}00014 \textcolor{comment}{// 3. Neither the name of the copyright holder nor the names of its}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00015}00015 \textcolor{comment}{// contributors may be used to endorse or promote products derived from}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00016}00016 \textcolor{comment}{// this software without specific prior written permission.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00017}00017 \textcolor{comment}{//}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00018}00018 \textcolor{comment}{// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "{}AS IS"{}}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00019}00019 \textcolor{comment}{// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00020}00020 \textcolor{comment}{// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00021}00021 \textcolor{comment}{// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00022}00022 \textcolor{comment}{// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00023}00023 \textcolor{comment}{// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00024}00024 \textcolor{comment}{// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00025}00025 \textcolor{comment}{// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00026}00026 \textcolor{comment}{// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00027}00027 \textcolor{comment}{// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00028}00028 \textcolor{comment}{// POSSIBILITY OF SUCH DAMAGE.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00029}00029 \textcolor{comment}{//}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00030}00030 }
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00031}00031 \textcolor{preprocessor}{\#pragma once}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00032}00032 \textcolor{preprocessor}{\#include <spdlog/spdlog.h>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00033}00033 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{symbol_8hpp}{decomp/symbol.hpp}}>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00034}00034 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{gen_8hpp}{obf/transform/gen.hpp}}>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00035}00035 }
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00036}\mbox{\hyperlink{pass_8hpp_a3925943d185a09ad9e32ed8637ccb533}{00036}} \textcolor{preprocessor}{\#define XED\_ENCODER}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00037}00037 \textcolor{keyword}{extern} \textcolor{stringliteral}{"{}C"{}} \{}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00038}00038 \textcolor{preprocessor}{\#include <xed-\/decode.h>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00039}00039 \textcolor{preprocessor}{\#include <xed-\/interface.h>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00040}00040 \}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00041}00041 \textcolor{comment}{}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00042}00042 \textcolor{comment}{/// <summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00043}00043 \textcolor{comment}{/// this is the main namespace for obfuscation related things.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00044}00044 \textcolor{comment}{/// </summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00045}00045 \textcolor{comment}{}\textcolor{keyword}{namespace }\mbox{\hyperlink{namespacetheo_1_1obf}{theo::obf}} \{}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00046}00046 \textcolor{comment}{}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00047}00047 \textcolor{comment}{/// <summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00048}00048 \textcolor{comment}{/// the pass\_t class is a base clase for all passes made. you must override the}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00049}00049 \textcolor{comment}{/// pass\_t::run virtual function and declare the logic of your pass there.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00050}00050 \textcolor{comment}{///}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00051}00051 \textcolor{comment}{/// in the constructor of your pass you must call the super constructor (the}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00052}00052 \textcolor{comment}{/// pass\_t constructor) and pass it the type of symbol which you are interesting}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00053}00053 \textcolor{comment}{/// in receiving.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00054}00054 \textcolor{comment}{/// </summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00055}\mbox{\hyperlink{classtheo_1_1obf_1_1pass__t}{00055}} \textcolor{comment}{}\textcolor{keyword}{class }\mbox{\hyperlink{classtheo_1_1obf_1_1pass__t}{pass\_t}} \{}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00056}00056 \textcolor{keyword}{public}:\textcolor{comment}{}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00057}00057 \textcolor{comment}{ /// <summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00058}00058 \textcolor{comment}{ /// the explicit constructor of the pass\_t base class.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00059}00059 \textcolor{comment}{ /// </summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00060}00060 \textcolor{comment}{ /// <param name="{}sym\_type"{}>the type of symbol in which the pass will run on.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00061}00061 \textcolor{comment}{ /// every symbol passed to the virtual "{}run"{} instruction will be of this}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00062}00062 \textcolor{comment}{ /// type.</param>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00063}\mbox{\hyperlink{classtheo_1_1obf_1_1pass__t_abd4ab22cc2822b968267be7f8397d611}{00063}} \textcolor{comment}{} \textcolor{keyword}{explicit} \mbox{\hyperlink{classtheo_1_1obf_1_1pass__t_abd4ab22cc2822b968267be7f8397d611}{pass\_t}}(\mbox{\hyperlink{namespacetheo_1_1decomp_af96177687d0ad683c5897d8fa01135f9}{decomp::sym\_type\_t}} \mbox{\hyperlink{classtheo_1_1obf_1_1pass__t_a46608a6c2dfb8ff657e44be9b50e0dfb}{sym\_type}}) : m\_sym\_type(\mbox{\hyperlink{classtheo_1_1obf_1_1pass__t_a46608a6c2dfb8ff657e44be9b50e0dfb}{sym\_type}})\{\};}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00064}00064 \textcolor{comment}{}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00065}00065 \textcolor{comment}{ /// <summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00066}00066 \textcolor{comment}{ /// virtual method which must be implimented by the pass that inherits this}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00067}00067 \textcolor{comment}{ /// class.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00068}00068 \textcolor{comment}{ /// </summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00069}00069 \textcolor{comment}{ /// <param name="{}sym"{}>a symbol of the same type of m\_sym\_type.</param>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00070}\mbox{\hyperlink{classtheo_1_1obf_1_1pass__t_acfadc013ff0754d66a18baffdb1a61d1}{00070}} \textcolor{comment}{} \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} \mbox{\hyperlink{classtheo_1_1obf_1_1pass__t_acfadc013ff0754d66a18baffdb1a61d1}{run}}(\mbox{\hyperlink{classtheo_1_1decomp_1_1symbol__t}{decomp::symbol\_t}}* sym) = 0;}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00071}00071 \textcolor{comment}{}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00072}00072 \textcolor{comment}{ /// <summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00073}00073 \textcolor{comment}{ /// gets the passes symbol type.}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00074}00074 \textcolor{comment}{ /// </summary>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00075}00075 \textcolor{comment}{ /// <returns>the passes symbol type.</returns>}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00076}\mbox{\hyperlink{classtheo_1_1obf_1_1pass__t_a46608a6c2dfb8ff657e44be9b50e0dfb}{00076}} \textcolor{comment}{} \mbox{\hyperlink{namespacetheo_1_1decomp_af96177687d0ad683c5897d8fa01135f9}{decomp::sym\_type\_t}} \mbox{\hyperlink{classtheo_1_1obf_1_1pass__t_a46608a6c2dfb8ff657e44be9b50e0dfb}{sym\_type}}() \{ \textcolor{keywordflow}{return} m\_sym\_type; \}}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00077}00077 }
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00078}00078 \textcolor{keyword}{private}:}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00079}00079 \mbox{\hyperlink{namespacetheo_1_1decomp_af96177687d0ad683c5897d8fa01135f9}{decomp::sym\_type\_t}} m\_sym\_type;}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00080}00080 \};}
|
||
|
\DoxyCodeLine{\Hypertarget{pass_8hpp_source_l00081}00081 \} \textcolor{comment}{// namespace theo::obf}}
|
||
|
|
||
|
\end{DoxyCode}
|