Compare commits

..

6 Commits
master ... 2.0

@ -1,5 +1,18 @@
---
BasedOnStyle: Chromium
BasedOnStyle: Microsoft
AlignAfterOpenBracket: Align
AllowAllArgumentsOnNextLine: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'true'
AllowShortIfStatementsOnASingleLine: Never
BreakBeforeBraces: Allman
IndentWidth: '4'
Language: Cpp
NamespaceIndentation: All
SpacesInAngles: 'true'
SpacesInCStyleCastParentheses: 'true'
SpacesInContainerLiterals: 'true'
SpacesInParentheses: 'true'
SpacesInSquareBrackets: 'true'
UseTab: Never
...

3
.gitattributes vendored

@ -1,3 +0,0 @@
dependencies/llvm-obfuscator.rar filter=lfs diff=lfs merge=lfs -text
dependencies/dependencies.rar filter=lfs diff=lfs merge=lfs -text
resources/clang.zip filter=lfs diff=lfs merge=lfs -text

390
.gitignore vendored

@ -1,2 +1,388 @@
*.exe
build/
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Nuget personal access tokens and Credentials
nuget.config
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
.idea/
*.sln.iml

12
.gitmodules vendored

@ -1,15 +1,15 @@
[submodule "dependencies/linux-pe"]
path = dependencies/linux-pe
url = https://github.com/can1357/linux-pe.git
[submodule "dependencies/googletest"]
path = dependencies/googletest
url = https://github.com/google/googletest.git
[submodule "dependencies/xtils"]
path = dependencies/xtils
url = https://githacks.org/_xeroxz/xtils.git
[submodule "dependencies/xed"]
path = dependencies/xed
url = https://github.com/intelxed/xed.git
[submodule "dependencies/cli-parser"]
path = dependencies/cli-parser
url = https://githacks.org/_xeroxz/cli-parser.git
[submodule "dependencies/mbuild"]
path = dependencies/mbuild
url = https://github.com/intelxed/mbuild.git
[submodule "dependencies/spdlog"]
path = dependencies/spdlog
url = https://github.com/gabime/spdlog.git

@ -1,124 +0,0 @@
# This file is automatically generated from cmake.toml - DO NOT EDIT
# See https://github.com/build-cpp/cmkr for more information
cmake_minimum_required(VERSION 3.15)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "In-tree builds are not supported. Run CMake from a separate directory: cmake -B build")
endif()
# Regenerate CMakeLists.txt automatically in the root project
set(CMKR_ROOT_PROJECT OFF)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(CMKR_ROOT_PROJECT ON)
# Bootstrap cmkr
include(cmkr.cmake OPTIONAL RESULT_VARIABLE CMKR_INCLUDE_RESULT)
if(CMKR_INCLUDE_RESULT)
cmkr()
endif()
# Enable folder support
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
# Create a configure-time dependency on cmake.toml to improve IDE support
if(CMKR_ROOT_PROJECT)
configure_file(cmake.toml cmake.toml COPYONLY)
endif()
project(Theodosius)
# dependencies
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/dependencies")
else()
set(CMAKE_FOLDER dependencies)
endif()
add_subdirectory(dependencies)
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
# examples
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/examples")
else()
set(CMAKE_FOLDER examples)
endif()
add_subdirectory(examples)
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
# Target Theodosius
set(CMKR_TARGET Theodosius)
set(Theodosius_SOURCES "")
list(APPEND Theodosius_SOURCES
"include/decomp/decomp.hpp"
"include/decomp/routine.hpp"
"include/decomp/symbol.hpp"
"include/obf/engine.hpp"
"include/obf/pass.hpp"
"include/obf/passes/func_split_pass.hpp"
"include/obf/passes/jcc_rewrite_pass.hpp"
"include/obf/passes/next_inst_pass.hpp"
"include/obf/passes/reloc_transform_pass.hpp"
"include/obf/transform/add_op.hpp"
"include/obf/transform/gen.hpp"
"include/obf/transform/operation.hpp"
"include/obf/transform/rol_op.hpp"
"include/obf/transform/ror_op.hpp"
"include/obf/transform/sub_op.hpp"
"include/obf/transform/transform.hpp"
"include/obf/transform/xor_op.hpp"
"include/recomp/recomp.hpp"
"include/recomp/reloc.hpp"
"include/recomp/symbol_table.hpp"
"include/theo.hpp"
"src/decomp/decomp.cpp"
"src/decomp/routine.cpp"
"src/decomp/symbol.cpp"
"src/obf/engine.cpp"
"src/obf/passes/func_split_pass.cpp"
"src/obf/passes/jcc_rewrite_pass.cpp"
"src/obf/passes/next_inst_pass.cpp"
"src/obf/passes/reloc_transform_pass.cpp"
"src/recomp/recomp.cpp"
"src/recomp/symbol_table.cpp"
"src/theo.cpp"
)
list(APPEND Theodosius_SOURCES
cmake.toml
)
set(CMKR_SOURCES ${Theodosius_SOURCES})
add_library(Theodosius STATIC)
if(Theodosius_SOURCES)
target_sources(Theodosius PRIVATE ${Theodosius_SOURCES})
endif()
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${Theodosius_SOURCES})
target_compile_definitions(Theodosius PUBLIC
NOMINMAX
)
target_compile_features(Theodosius PUBLIC
cxx_std_20
)
target_include_directories(Theodosius PUBLIC
include
)
target_link_libraries(Theodosius PUBLIC
linux-pe
spdlog
xed
)
unset(CMKR_TARGET)
unset(CMKR_SOURCES)

2705
Doxyfile

File diff suppressed because it is too large Load Diff

@ -1,27 +0,0 @@
Copyright (c) 2022, _xeroxz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@ -1,171 +1 @@
<div align="center">
<div>
<img src="https://git.back.engineering/_xeroxz/Theodosius/raw/commit/27dd04e97b23c2afc799200292a966728992bfae/doxygen/icon.png"/>
</div>
</div>
# Theodosius - Jit linker, Mapper, Mutator, and Obfuscator
Theodosius (Theo for short) is a jit linker created for obfuscation. The project is extremely modular in design and supports both kernel and usermode projects.
Theo works with static libraries rather than completely compiled binaries. This allows it to easily position, obfuscate, and scatter symbols anywhere as the project takes the place of the linker.
[Doxygen for this project can be found here](https://docs.back.engineering/theo/)
### Table Of Contents
* [Theodosius - Jit linker, Mapper, Mutator, and Obfuscator](https://githacks.org/_xeroxz/theodosius#theodosius-jit-linker-mapper-mutator-and-obfuscator)
* [Credit And Dependencies](https://githacks.org/_xeroxz/theodosius#credit-and-dependencies)
* [Linking - Dynamic And Static](https://githacks.org/_xeroxz/theodosius#linking-dynamic-and-static)
* [What Is A Linker](https://githacks.org/_xeroxz/theodosius#what-is-a-linker)
* [Object Files](https://githacks.org/_xeroxz/theodosius#object-files)
* [Static Linking](https://githacks.org/_xeroxz/theodosius#static-linking)
* [Dynamic Linking](https://githacks.org/_xeroxz/theodosius#dynamic-linking)
* [Usage - Using Theodosius](https://githacks.org/_xeroxz/theodosius#usage-using-theodosius)
* [Integrating Clang](https://githacks.org/_xeroxz/theodosius#integrating-clang)
* [Requirements](https://githacks.org/_xeroxz/theodosius#requirements)
* [RIP Relative Addressing](https://githacks.org/_xeroxz/theodosius#rip-relative-addressing)
* [License - BSD 3-Clause](https://githacks.org/_xeroxz/theodosius#bsd-3-clause-license)
### Credit And Dependencies
* [BTBD](https://github.com/btbd) - Huge thanks for providing suggestions and bouncing ideas back and forth.
* [SMAP](https://github.com/btbd/smap) - scatter mapper, this project is heavily influenced by SMAP.
* [XED](https://github.com/intelxed/xed)
* [spdlog](https://github.com/gabime/spdlog)
* [linux-pe](https://github.com/can1357/linux-pe)
* [cmkr](https://github.com/build-cpp/cmkr)
### Building
Download and install cmake on your system, then execute the following command in the root dir of this project:
* `cmake -B build`
Then navigate into `dependencies/xed/` and run `python3 mfile.py`. Building XED can be tricky on windows, I suggest you use the visual studios console since it has env vars to everything needed to build XED. linux seems to build it just fine...
## Linking - Dynamic And Static
#### What Is A Linker
A linker is a program which takes object files produces by a compiler and generates a final executable native to the operating system. A linker interfaces with not only object files but also static libraries, "lib" files. What is a "lib" file? Well a lib file is just an archive of obj's. You can invision it as a zip/rar without any compression, just concatination of said object files.
Theo is a jit linker, which means it will link objs together and map them into memory all at once. For usability however, instead of handling object files, Theo can parse entire lib files and extract the objects out of the lib.
#### Object Files
If you define a c++ file called "main.cpp" the compiler will generate an object file by the name of "main.obj". When you refer to data or code defined in another c/c++ file, the linker uses a symbol table to resolve the address of said code/data. In this situation I am the linker and I resolve all of your symbols :).
#### Static Linking
Static linking is when the linker links entire routines not created by you, into your code. Say `memcpy` (if its not inlined), will be staticlly linked with the CRT. Static linking also allows for your code to be more independant as all the code you need you bring with you. However, with Theo, you cannot link static libraries which are not compiled with `mcmodel=large`. Theo supports actual static linking, in other words, using multiple static libraries at the same time.
#### Dynamic Linking
Dynamic linking is when external symbols are resolved at runtime. This is done by imports and exports in DLL's (dynamiclly linked libraries). Theo supports "dynamic linking", or in better terms, linking against exported routines. You can see examples of this inside of both usermode and kernelmode examples.
# Usage - Using Theodosius
## Integrating Clang
For integration with visual studios please open install [llvm2019](https://marketplace.visualstudio.com/items?itemName=MarekAniola.mangh-llvm2019) extension, or [llvm2017](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain) extension. Once installed, create or open a visual studio project which you want to use with LLVM-Obfuscator and Theo. Open ***Properties*** --> ***Configuration Properties*** ---> ***General***, then set ***Platform Toolset*** to ***LLVM***.
Once LLVM is selected, under the ***LLVM*** tab change the clang-cl location to the place where you extracted [clang-cl.rar](https://githacks.org/_xeroxz/theodosius/-/blob/cc9496ccceba3d1f0916859ddb2583be9362c908/resources/clang-cl.rar). Finally under ***Additional Compiler Options*** (same LLVM tab), set the following: `-Xclang -std=c++1z -Xclang -mcode-model -Xclang large -Xclang -fno-jump-tables -mllvm -split -mllvm -split_num=4 -mllvm -sub_loop=4`.
Please refer to the [LLVM-Obfuscator Wiki](https://github.com/obfuscator-llvm/obfuscator/wiki) for more information on commandline arguments.
#### Requirements
* No SEH support, do not add `__try/__except` in your code.
* No CFG (control flow guard) support. Please disable this in C/C++ ---> Code Generation ---> Control Flow Guard
* No Stack Security Check Support. Please disablel this in C/C++ ---> Code Generation ---> Security Check (/GS-)
* Your project must be set to produce a .lib file.
* Your project must not link with other static libraries which are not compiled with `-Xclang -mcmodel-large`.
* Project must be compiled with the following flags
* `-Xclang -mcmodel=large`, removes RIP relative addressing besides JCC's.
* `-Xclang -fno-jump-tables`, removes jump tables created by switch cases.
* `/Zc:threadSafeInit-`, static will not use TLS (thread local storage).
## RIP Relative Addressing
In order to allow for a routine to be scattered throughout a 64bit address space, RIP relative addressing must not be used. In order to facilitate this, a very special version
of clang-cl is used which can use `mcmodel=large`. This will generate instructions which do not use RIP relative addressing when referencing symbols outside of the routine in which the
instruction itself resides. The only exception to this is JCC instructions, (besides call) also known as branching instructions. Take this c++ code for an example:
```cpp
ObfuscateRoutine
extern "C" int ModuleEntry()
{
MessageBoxA(0, "Demo", "Hello From Obfuscated Routine!", 0);
UsermodeMutateDemo();
UsermodeNoObfuscation();
}
```
This c++ function, compiled by clang-cl with `mcmodel=large`, will generate a routine with the following instructions:
```
0x00: ; void UsermodeNoObfuscation(void)
0x00: public ?UsermodeNoObfuscation@@YAXXZ
0x00: ?UsermodeNoObfuscation@@YAXXZ proc near ; CODE XREF: ModuleEntry+42↓p
0x00: var_4 = dword ptr -4
0x00: 48 83 EC 28 sub rsp, 28h
0x04: C7 44 24 24 00 00 00 00 mov [rsp+28h+var_4], 0
0x0C: loc_C:
0x0C: 83 7C 24 24 05 cmp [rsp+28h+var_4], 5
0x11: 0F 83 38 00 00 00 jnb loc_4F
0x17: 31 C0 xor eax, eax
0x19: 48 BA 28 01 00 00 00 00 00 00 mov rdx, offset ??_C@_04DKDMNOEB@Demo?$AA@ ; "Demo"
0x23: 49 B8 00 01 00 00 00 00 00 00 mov r8, offset ??_C@_0CD@JEJKPGNA@Hello?5... ; "Hello From Non-Obfuscated Routine!"
0x2D: 48 B8 A0 01 00 00 00 00 00 00 mov rax, offset MessageBoxA
0x37: 45 31 C9 xor r9d, r9d ; uType
0x3A: 44 89 C9 mov ecx, r9d ; hWnd
0x3D: FF D0 call rax ; MessageBoxA
0x3F: 8B 44 24 24 mov eax, [rsp+28h+var_4]
0x43: 83 C0 01 add eax, 1
0x46: 89 44 24 24 mov [rsp+28h+var_4], eax
0x4A: E9 BD FF FF FF jmp loc_C
0x4F: loc_4F:
0x4F: 48 83 C4 28 add rsp, 28h
0x53: C3 retn
0x53: ?UsermodeNoObfuscation@@YAXXZ endp
```
As you can see from the code above, (sorry for the terrible syntax highlighting), references to strings and calls to functions are done by first loading the address of the symbol into a register and then interfacing with the symbol.
```
0x2D: 48 B8 A0 01 00 00 00 00 00 00 mov rax, offset MessageBoxA
; ...
0x3D: FF D0 call rax ; MessageBoxA
```
Each of these instructions can be anywhere in virtual memory and it would not effect code execution one bit.
# BSD 3-Clause License
Copyright (c) 2022, _xeroxz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Theodosius v2.0

@ -1,14 +0,0 @@
[project]
name = "Theodosius"
[subdir.dependencies]
[subdir.examples]
[target.Theodosius]
type = "static"
sources = ["include/**.hpp", "src/**.cpp"]
include-directories = ["include"]
compile-features = ["cxx_std_20"]
compile-definitions = ["NOMINMAX"]
link-libraries = ["linux-pe", "spdlog", "xed"]

@ -1,236 +0,0 @@
include_guard()
# Change these defaults to point to your infrastructure if desired
set(CMKR_REPO "https://github.com/build-cpp/cmkr" CACHE STRING "cmkr git repository" FORCE)
set(CMKR_TAG "v0.2.12" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE)
set(CMKR_COMMIT_HASH "" CACHE STRING "cmkr git commit hash (optional)" FORCE)
# To bootstrap/generate a cmkr project: cmake -P cmkr.cmake
if(CMAKE_SCRIPT_MODE_FILE)
set(CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}/build")
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_BINARY_DIR}")
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}")
endif()
# Set these from the command line to customize for development/debugging purposes
set(CMKR_EXECUTABLE "" CACHE FILEPATH "cmkr executable")
set(CMKR_SKIP_GENERATION OFF CACHE BOOL "skip automatic cmkr generation")
set(CMKR_BUILD_TYPE "Debug" CACHE STRING "cmkr build configuration")
mark_as_advanced(CMKR_REPO CMKR_TAG CMKR_COMMIT_HASH CMKR_EXECUTABLE CMKR_SKIP_GENERATION CMKR_BUILD_TYPE)
# Disable cmkr if generation is disabled
if(DEFINED ENV{CI} OR CMKR_SKIP_GENERATION OR CMKR_BUILD_SKIP_GENERATION)
message(STATUS "[cmkr] Skipping automatic cmkr generation")
unset(CMKR_BUILD_SKIP_GENERATION CACHE)
macro(cmkr)
endmacro()
return()
endif()
# Disable cmkr if no cmake.toml file is found
if(NOT CMAKE_SCRIPT_MODE_FILE AND NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml")
message(AUTHOR_WARNING "[cmkr] Not found: ${CMAKE_CURRENT_SOURCE_DIR}/cmake.toml")
macro(cmkr)
endmacro()
return()
endif()
# Convert a Windows native path to CMake path
if(CMKR_EXECUTABLE MATCHES "\\\\")
string(REPLACE "\\" "/" CMKR_EXECUTABLE_CMAKE "${CMKR_EXECUTABLE}")
set(CMKR_EXECUTABLE "${CMKR_EXECUTABLE_CMAKE}" CACHE FILEPATH "" FORCE)
unset(CMKR_EXECUTABLE_CMAKE)
endif()
# Helper macro to execute a process (COMMAND_ERROR_IS_FATAL ANY is 3.19 and higher)
function(cmkr_exec)
execute_process(COMMAND ${ARGV} RESULT_VARIABLE CMKR_EXEC_RESULT)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "cmkr_exec(${ARGV}) failed (exit code ${CMKR_EXEC_RESULT})")
endif()
endfunction()
# Windows-specific hack (CMAKE_EXECUTABLE_PREFIX is not set at the moment)
if(WIN32)
set(CMKR_EXECUTABLE_NAME "cmkr.exe")
else()
set(CMKR_EXECUTABLE_NAME "cmkr")
endif()
# Use cached cmkr if found
if(DEFINED ENV{CMKR_CACHE} AND EXISTS "$ENV{CMKR_CACHE}")
set(CMKR_DIRECTORY_PREFIX "$ENV{CMKR_CACHE}")
string(REPLACE "\\" "/" CMKR_DIRECTORY_PREFIX "${CMKR_DIRECTORY_PREFIX}")
if(NOT CMKR_DIRECTORY_PREFIX MATCHES "\\/$")
set(CMKR_DIRECTORY_PREFIX "${CMKR_DIRECTORY_PREFIX}/")
endif()
# Build in release mode for the cache
set(CMKR_BUILD_TYPE "Release")
else()
set(CMKR_DIRECTORY_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/_cmkr_")
endif()
set(CMKR_DIRECTORY "${CMKR_DIRECTORY_PREFIX}${CMKR_TAG}")
set(CMKR_CACHED_EXECUTABLE "${CMKR_DIRECTORY}/bin/${CMKR_EXECUTABLE_NAME}")
# Handle upgrading logic
if(CMKR_EXECUTABLE AND NOT CMKR_CACHED_EXECUTABLE STREQUAL CMKR_EXECUTABLE)
if(CMKR_EXECUTABLE MATCHES "^${CMAKE_CURRENT_BINARY_DIR}/_cmkr")
if(DEFINED ENV{CMKR_CACHE} AND EXISTS "$ENV{CMKR_CACHE}")
message(AUTHOR_WARNING "[cmkr] Switching to cached cmkr: '${CMKR_CACHED_EXECUTABLE}'")
if(EXISTS "${CMKR_CACHED_EXECUTABLE}")
set(CMKR_EXECUTABLE "${CMKR_CACHED_EXECUTABLE}" CACHE FILEPATH "Full path to cmkr executable" FORCE)
else()
unset(CMKR_EXECUTABLE CACHE)
endif()
else()
message(AUTHOR_WARNING "[cmkr] Upgrading '${CMKR_EXECUTABLE}' to '${CMKR_CACHED_EXECUTABLE}'")
unset(CMKR_EXECUTABLE CACHE)
endif()
elseif(DEFINED ENV{CMKR_CACHE} AND EXISTS "$ENV{CMKR_CACHE}" AND CMKR_EXECUTABLE MATCHES "^${CMKR_DIRECTORY_PREFIX}")
message(AUTHOR_WARNING "[cmkr] Upgrading cached '${CMKR_EXECUTABLE}' to '${CMKR_CACHED_EXECUTABLE}'")
unset(CMKR_EXECUTABLE CACHE)
endif()
endif()
if(CMKR_EXECUTABLE AND EXISTS "${CMKR_EXECUTABLE}")
message(VERBOSE "[cmkr] Found cmkr: '${CMKR_EXECUTABLE}'")
elseif(CMKR_EXECUTABLE AND NOT CMKR_EXECUTABLE STREQUAL CMKR_CACHED_EXECUTABLE)
message(FATAL_ERROR "[cmkr] '${CMKR_EXECUTABLE}' not found")
elseif(NOT CMKR_EXECUTABLE AND EXISTS "${CMKR_CACHED_EXECUTABLE}")
set(CMKR_EXECUTABLE "${CMKR_CACHED_EXECUTABLE}" CACHE FILEPATH "Full path to cmkr executable" FORCE)
message(STATUS "[cmkr] Found cached cmkr: '${CMKR_EXECUTABLE}'")
else()
set(CMKR_EXECUTABLE "${CMKR_CACHED_EXECUTABLE}" CACHE FILEPATH "Full path to cmkr executable" FORCE)
message(VERBOSE "[cmkr] Bootstrapping '${CMKR_EXECUTABLE}'")
message(STATUS "[cmkr] Fetching cmkr...")
if(EXISTS "${CMKR_DIRECTORY}")
cmkr_exec("${CMAKE_COMMAND}" -E rm -rf "${CMKR_DIRECTORY}")
endif()
find_package(Git QUIET REQUIRED)
cmkr_exec("${GIT_EXECUTABLE}"
clone
--config advice.detachedHead=false
--branch ${CMKR_TAG}
--depth 1
${CMKR_REPO}
"${CMKR_DIRECTORY}"
)
if(CMKR_COMMIT_HASH)
execute_process(
COMMAND "${GIT_EXECUTABLE}" checkout -q "${CMKR_COMMIT_HASH}"
RESULT_VARIABLE CMKR_EXEC_RESULT
WORKING_DIRECTORY "${CMKR_DIRECTORY}"
)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "Tag '${CMKR_TAG}' hash is not '${CMKR_COMMIT_HASH}'")
endif()
endif()
message(STATUS "[cmkr] Building cmkr (using system compiler)...")
cmkr_exec("${CMAKE_COMMAND}"
--no-warn-unused-cli
"${CMKR_DIRECTORY}"
"-B${CMKR_DIRECTORY}/build"
"-DCMAKE_BUILD_TYPE=${CMKR_BUILD_TYPE}"
"-DCMAKE_UNITY_BUILD=ON"
"-DCMAKE_INSTALL_PREFIX=${CMKR_DIRECTORY}"
"-DCMKR_GENERATE_DOCUMENTATION=OFF"
)
cmkr_exec("${CMAKE_COMMAND}"
--build "${CMKR_DIRECTORY}/build"
--config "${CMKR_BUILD_TYPE}"
--parallel
)
cmkr_exec("${CMAKE_COMMAND}"
--install "${CMKR_DIRECTORY}/build"
--config "${CMKR_BUILD_TYPE}"
--prefix "${CMKR_DIRECTORY}"
--component cmkr
)
if(NOT EXISTS ${CMKR_EXECUTABLE})
message(FATAL_ERROR "[cmkr] Failed to bootstrap '${CMKR_EXECUTABLE}'")
endif()
cmkr_exec("${CMKR_EXECUTABLE}" version)
message(STATUS "[cmkr] Bootstrapped ${CMKR_EXECUTABLE}")
endif()
execute_process(COMMAND "${CMKR_EXECUTABLE}" version
RESULT_VARIABLE CMKR_EXEC_RESULT
)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "[cmkr] Failed to get version, try clearing the cache and rebuilding")
endif()
# Use cmkr.cmake as a script
if(CMAKE_SCRIPT_MODE_FILE)
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/cmake.toml")
execute_process(COMMAND "${CMKR_EXECUTABLE}" init
RESULT_VARIABLE CMKR_EXEC_RESULT
)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "[cmkr] Failed to bootstrap cmkr project. Please report an issue: https://github.com/build-cpp/cmkr/issues/new")
else()
message(STATUS "[cmkr] Modify cmake.toml and then configure using: cmake -B build")
endif()
else()
execute_process(COMMAND "${CMKR_EXECUTABLE}" gen
RESULT_VARIABLE CMKR_EXEC_RESULT
)
if(NOT CMKR_EXEC_RESULT EQUAL 0)
message(FATAL_ERROR "[cmkr] Failed to generate project.")
else()
message(STATUS "[cmkr] Configure using: cmake -B build")
endif()
endif()
endif()
# This is the macro that contains black magic
macro(cmkr)
# When this macro is called from the generated file, fake some internal CMake variables
get_source_file_property(CMKR_CURRENT_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}" CMKR_CURRENT_LIST_FILE)
if(CMKR_CURRENT_LIST_FILE)
set(CMAKE_CURRENT_LIST_FILE "${CMKR_CURRENT_LIST_FILE}")
get_filename_component(CMAKE_CURRENT_LIST_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
endif()
# File-based include guard (include_guard is not documented to work)
get_source_file_property(CMKR_INCLUDE_GUARD "${CMAKE_CURRENT_LIST_FILE}" CMKR_INCLUDE_GUARD)
if(NOT CMKR_INCLUDE_GUARD)
set_source_files_properties("${CMAKE_CURRENT_LIST_FILE}" PROPERTIES CMKR_INCLUDE_GUARD TRUE)
file(SHA256 "${CMAKE_CURRENT_LIST_FILE}" CMKR_LIST_FILE_SHA256_PRE)
# Generate CMakeLists.txt
cmkr_exec("${CMKR_EXECUTABLE}" gen
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)
file(SHA256 "${CMAKE_CURRENT_LIST_FILE}" CMKR_LIST_FILE_SHA256_POST)
# Delete the temporary file if it was left for some reason
set(CMKR_TEMP_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CMakerLists.txt")
if(EXISTS "${CMKR_TEMP_FILE}")
file(REMOVE "${CMKR_TEMP_FILE}")
endif()
if(NOT CMKR_LIST_FILE_SHA256_PRE STREQUAL CMKR_LIST_FILE_SHA256_POST)
# Copy the now-generated CMakeLists.txt to CMakerLists.txt
# This is done because you cannot include() a file you are currently in
configure_file(CMakeLists.txt "${CMKR_TEMP_FILE}" COPYONLY)
# Add the macro required for the hack at the start of the cmkr macro
set_source_files_properties("${CMKR_TEMP_FILE}" PROPERTIES
CMKR_CURRENT_LIST_FILE "${CMAKE_CURRENT_LIST_FILE}"
)
# 'Execute' the newly-generated CMakeLists.txt
include("${CMKR_TEMP_FILE}")
# Delete the generated file
file(REMOVE "${CMKR_TEMP_FILE}")
# Do not execute the rest of the original CMakeLists.txt
return()
endif()
# Resume executing the unmodified CMakeLists.txt
endif()
endmacro()

@ -1,58 +0,0 @@
# This file is automatically generated from cmake.toml - DO NOT EDIT
# See https://github.com/build-cpp/cmkr for more information
# Create a configure-time dependency on cmake.toml to improve IDE support
if(CMKR_ROOT_PROJECT)
configure_file(cmake.toml cmake.toml COPYONLY)
endif()
# spdlog
set(CMKR_CMAKE_FOLDER ${CMAKE_FOLDER})
if(CMAKE_FOLDER)
set(CMAKE_FOLDER "${CMAKE_FOLDER}/spdlog")
else()
set(CMAKE_FOLDER spdlog)
endif()
add_subdirectory(spdlog)
set(CMAKE_FOLDER ${CMKR_CMAKE_FOLDER})
# Target linux-pe
set(CMKR_TARGET linux-pe)
set(linux-pe_SOURCES "")
set(CMKR_SOURCES ${linux-pe_SOURCES})
add_library(linux-pe INTERFACE)
if(linux-pe_SOURCES)
target_sources(linux-pe INTERFACE ${linux-pe_SOURCES})
endif()
target_include_directories(linux-pe INTERFACE
"linux-pe/includes/"
)
unset(CMKR_TARGET)
unset(CMKR_SOURCES)
# Target xed
set(CMKR_TARGET xed)
set(xed_SOURCES "")
set(CMKR_SOURCES ${xed_SOURCES})
add_library(xed INTERFACE)
if(xed_SOURCES)
target_sources(xed INTERFACE ${xed_SOURCES})
endif()
target_include_directories(xed INTERFACE
"xed/obj/wkit/include/xed"
)
target_link_libraries(xed INTERFACE xed.lib)
target_link_libraries(xed INTERFACE xed-ild.lib)
target_link_directories(xed INTERFACE xed/obj/wkit/lib/)
unset(CMKR_TARGET)
unset(CMKR_SOURCES)

@ -0,0 +1 @@
Subproject commit 1aedaf8bb7f383f54b7cd498767611535526da85

@ -1,14 +0,0 @@
[target.linux-pe]
type = "interface"
include-directories = ["linux-pe/includes/"]
[subdir.spdlog]
[target.xed]
type = "interface"
include-directories = ["xed/obj/wkit/include/xed"]
cmake-after = """
target_link_libraries(xed INTERFACE xed.lib)
target_link_libraries(xed INTERFACE xed-ild.lib)
target_link_directories(xed INTERFACE xed/obj/wkit/lib/)
"""

@ -1 +0,0 @@
Subproject commit af29db7ec28d6df1c7f0f745186884091e602e07

@ -1 +1 @@
Subproject commit 4f83eae434696201f5075d65b11bf8329c6d218a
Subproject commit db2b7af6e6beae1bc391ff8f8e5c97b963dc3258

@ -1 +0,0 @@
Subproject commit fc51c095bae108490bf62c3345a5e3b37a5e7630

2
dependencies/xed vendored

@ -1 +1 @@
Subproject commit d57a3bd0a8ad7a1f0c6e2a1b58060d9014021098
Subproject commit 428712c28e831573579b7f749db63d3a58dcdbd9

@ -0,0 +1 @@
Subproject commit fdcafdbbcb3f34c33b9cffb2be569b9aa5f42a57

@ -1,104 +0,0 @@
<!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: Data Structures</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">&#160;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&amp;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&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- 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 class="header">
<div class="headertitle"><div class="title">Data Structures</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span><span onclick="javascript:toggleLevel(4);">4</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="da/de6/namespacetheo.html" target="_self">theo</a></td><td class="desc">The outer most encompassing namespace of this project. </td></tr>
<tr id="row_0_0_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="d9/dbd/namespacetheo_1_1decomp.html" target="_self">decomp</a></td><td class="desc">the namespace that contains all of the decomposition related code. </td></tr>
<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d0e/classtheo_1_1decomp_1_1decomp__t.html" target="_self">decomp_t</a></td><td class="desc">the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files. </td></tr>
<tr id="row_0_0_1_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/db4/classtheo_1_1decomp_1_1routine__t.html" target="_self">routine_t</a></td><td class="desc">the routine class which is responsible for creating symbols for routines. if the routine is located inside a section with the name ".split" it will break functions into instruction symbols. </td></tr>
<tr id="row_0_0_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" target="_self">symbol_t</a></td><td class="desc"><a class="el" href="d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">symbol_t</a> is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down) </td></tr>
<tr id="row_0_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_1_" class="arrow" onclick="toggleFolder('0_1_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="d5/da8/namespacetheo_1_1obf.html" target="_self">obf</a></td><td class="desc">this is the main namespace for obfuscation related things. </td></tr>
<tr id="row_0_1_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span id="arr_0_1_0_" class="arrow" onclick="toggleFolder('0_1_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="d8/d82/namespacetheo_1_1obf_1_1transform.html" target="_self">transform</a></td><td class="desc">this namespace encompasses the code for transforming relocations. </td></tr>
<tr id="row_0_1_0_0_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html" target="_self">add_op_t</a></td><td class="desc"></td></tr>
<tr id="row_0_1_0_1_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html" target="_self">operation_t</a></td><td class="desc"><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>). </td></tr>
<tr id="row_0_1_0_2_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html" target="_self">rol_op_t</a></td><td class="desc"></td></tr>
<tr id="row_0_1_0_3_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d8f/classtheo_1_1obf_1_1transform_1_1ror__op__t.html" target="_self">ror_op_t</a></td><td class="desc"></td></tr>
<tr id="row_0_1_0_4_"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html" target="_self">sub_op_t</a></td><td class="desc"></td></tr>
<tr id="row_0_1_0_5_" class="even"><td class="entry"><span style="width:64px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html" target="_self">xor_op_t</a></td><td class="desc"></td></tr>
<tr id="row_0_1_1_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/d18/classtheo_1_1obf_1_1engine__t.html" target="_self">engine_t</a></td><td class="desc">singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. </td></tr>
<tr id="row_0_1_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html" target="_self">hello_world_pass_t</a></td><td class="desc">hello world pass example of how to inherit <a class="el" href="d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a>. </td></tr>
<tr id="row_0_1_3_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html" target="_self">jcc_rewrite_pass_t</a></td><td class="desc">jcc rewrite pass which rewrites rip relative jcc's so that they are position independent </td></tr>
<tr id="row_0_1_4_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html" target="_self">next_inst_pass_t</a></td><td class="desc">This pass is used to generate transformations and jmp code to change RIP to the next instruction </td></tr>
<tr id="row_0_1_5_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d4/dad/classtheo_1_1obf_1_1pass__t.html" target="_self">pass_t</a></td><td class="desc">the <a class="el" href="d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> class is a base clase for all passes made. you must override the <a class="el" href="d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1" title="virtual method which must be implimented by the pass that inherits this class.">pass_t::run</a> virtual function and declare the logic of your pass there </td></tr>
<tr id="row_0_1_6_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html" target="_self">reloc_transform_pass_t</a></td><td class="desc">this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol </td></tr>
<tr id="row_0_2_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_2_" class="arrow" onclick="toggleFolder('0_2_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="da/dbd/namespacetheo_1_1recomp.html" target="_self">recomp</a></td><td class="desc">this namespace encompasses all recomposition related code. </td></tr>
<tr id="row_0_2_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d5/d05/classtheo_1_1recomp_1_1recomp__t.html" target="_self">recomp_t</a></td><td class="desc">the main class responsible for recomposition </td></tr>
<tr id="row_0_2_1_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/d37/classtheo_1_1recomp_1_1reloc__t.html" target="_self">reloc_t</a></td><td class="desc">meta data about a relocation for a symbol </td></tr>
<tr id="row_0_2_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d77/classtheo_1_1recomp_1_1symbol__table__t.html" target="_self">symbol_table_t</a></td><td class="desc">this class is a high level wrapper for a hashmap that contains <a class="el" href="d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a> values. the symbol values are references by a hashcode. </td></tr>
<tr id="row_0_3_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="d9/dbc/classtheo_1_1theo__t.html" target="_self">theo_t</a></td><td class="desc">the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp </td></tr>
</table>
</div><!-- directory -->
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

@ -1,115 +0,0 @@
<!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: Data Structure Index</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">&#160;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&amp;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&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- 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 class="header">
<div class="headertitle"><div class="title">Data Structure Index</div></div>
</div><!--header-->
<div class="contents">
<div class="qindex"><a class="qindex" href="#letter_A">A</a>&#160;|&#160;<a class="qindex" href="#letter_D">D</a>&#160;|&#160;<a class="qindex" href="#letter_E">E</a>&#160;|&#160;<a class="qindex" href="#letter_H">H</a>&#160;|&#160;<a class="qindex" href="#letter_J">J</a>&#160;|&#160;<a class="qindex" href="#letter_N">N</a>&#160;|&#160;<a class="qindex" href="#letter_O">O</a>&#160;|&#160;<a class="qindex" href="#letter_P">P</a>&#160;|&#160;<a class="qindex" href="#letter_R">R</a>&#160;|&#160;<a class="qindex" href="#letter_S">S</a>&#160;|&#160;<a class="qindex" href="#letter_T">T</a>&#160;|&#160;<a class="qindex" href="#letter_X">X</a></div>
<div class="classindex">
<dl class="classindex even">
<dt class="alphachar"><a id="letter_A" name="letter_A">A</a></dt>
<dd><a class="el" href="d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a> (<a class="el" href="d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a>)</dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_D" name="letter_D">D</a></dt>
<dd><a class="el" href="d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">decomp_t</a> (<a class="el" href="d9/dbd/namespacetheo_1_1decomp.html">theo::decomp</a>)</dd></dl>
<dl class="classindex even">
<dt class="alphachar"><a id="letter_E" name="letter_E">E</a></dt>
<dd><a class="el" href="d9/d18/classtheo_1_1obf_1_1engine__t.html">engine_t</a> (<a class="el" href="d5/da8/namespacetheo_1_1obf.html">theo::obf</a>)</dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_H" name="letter_H">H</a></dt>
<dd><a class="el" href="d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">hello_world_pass_t</a> (<a class="el" href="d5/da8/namespacetheo_1_1obf.html">theo::obf</a>)</dd></dl>
<dl class="classindex even">
<dt class="alphachar"><a id="letter_J" name="letter_J">J</a></dt>
<dd><a class="el" href="d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">jcc_rewrite_pass_t</a> (<a class="el" href="d5/da8/namespacetheo_1_1obf.html">theo::obf</a>)</dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_N" name="letter_N">N</a></dt>
<dd><a class="el" href="d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">next_inst_pass_t</a> (<a class="el" href="d5/da8/namespacetheo_1_1obf.html">theo::obf</a>)</dd></dl>
<dl class="classindex even">
<dt class="alphachar"><a id="letter_O" name="letter_O">O</a></dt>
<dd><a class="el" href="d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">operation_t</a> (<a class="el" href="d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a>)</dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_P" name="letter_P">P</a></dt>
<dd><a class="el" href="d4/dad/classtheo_1_1obf_1_1pass__t.html">pass_t</a> (<a class="el" href="d5/da8/namespacetheo_1_1obf.html">theo::obf</a>)</dd></dl>
<dl class="classindex even">
<dt class="alphachar"><a id="letter_R" name="letter_R">R</a></dt>
<dd><a class="el" href="d5/d05/classtheo_1_1recomp_1_1recomp__t.html">recomp_t</a> (<a class="el" href="da/dbd/namespacetheo_1_1recomp.html">theo::recomp</a>)</dd><dd><a class="el" href="dd/d37/classtheo_1_1recomp_1_1reloc__t.html">reloc_t</a> (<a class="el" href="da/dbd/namespacetheo_1_1recomp.html">theo::recomp</a>)</dd><dd><a class="el" href="dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html">reloc_transform_pass_t</a> (<a class="el" href="d5/da8/namespacetheo_1_1obf.html">theo::obf</a>)</dd><dd><a class="el" href="d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a> (<a class="el" href="d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a>)</dd><dd><a class="el" href="db/d8f/classtheo_1_1obf_1_1transform_1_1ror__op__t.html">ror_op_t</a> (<a class="el" href="d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a>)</dd><dd><a class="el" href="df/db4/classtheo_1_1decomp_1_1routine__t.html">routine_t</a> (<a class="el" href="d9/dbd/namespacetheo_1_1decomp.html">theo::decomp</a>)</dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_S" name="letter_S">S</a></dt>
<dd><a class="el" href="d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a> (<a class="el" href="d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a>)</dd><dd><a class="el" href="d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">symbol_t</a> (<a class="el" href="d9/dbd/namespacetheo_1_1decomp.html">theo::decomp</a>)</dd><dd><a class="el" href="db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">symbol_table_t</a> (<a class="el" href="da/dbd/namespacetheo_1_1recomp.html">theo::recomp</a>)</dd></dl>
<dl class="classindex even">
<dt class="alphachar"><a id="letter_T" name="letter_T">T</a></dt>
<dd><a class="el" href="d9/dbc/classtheo_1_1theo__t.html">theo_t</a> (<a class="el" href="da/de6/namespacetheo.html">theo</a>)</dd></dl>
<dl class="classindex odd">
<dt class="alphachar"><a id="letter_X" name="letter_X">X</a></dt>
<dd><a class="el" href="da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">xor_op_t</a> (<a class="el" href="d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a>)</dd></dl>
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

@ -1,86 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::pass_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a>(decomp::sym_type_t sym_type)</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">run</a>(decomp::symbol_t *sym)=0</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">pure virtual</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>()</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,76 +0,0 @@
<!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: examples/demo/Demo Example Using Theo.md File 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">&#160;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&amp;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&amp;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><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">examples/demo/Demo Example Using Theo.md File Reference</div></div>
</div><!--header-->
<div class="contents">
</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.3
</small></address>
</body>
</html>

@ -1,107 +0,0 @@
<!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: include/recomp/symbol_table.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_d92462d752f7a277bbc0245a347b2579.html">recomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">symbol_table.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;functional&gt;</code><br />
<code>#include &lt;map&gt;</code><br />
<code>#include &lt;optional&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d6/d62/symbol_8hpp_source.html">decomp/symbol.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d0/d5e/symbol__table_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">this class is a high level wrapper for a hashmap that contains <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a> values. the symbol values are references by a hashcode. <a href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:da/dbd/namespacetheo_1_1recomp"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html">theo::recomp</a></td></tr>
<tr class="memdesc:da/dbd/namespacetheo_1_1recomp"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses all recomposition related code. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,185 +0,0 @@
<!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: include/recomp/symbol_table.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_d92462d752f7a277bbc0245a347b2579.html">recomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">symbol_table.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d0/d5e/symbol__table_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;algorithm&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include &lt;optional&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor">#include &lt;<a class="code" href="../../d6/d62/symbol_8hpp.html">decomp/symbol.hpp</a>&gt;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../da/dbd/namespacetheo_1_1recomp.html" title="this namespace encompasses all recomposition related code.">theo::recomp</a> {<span class="comment"></span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">/// this class is a high level wrapper for a hashmap that contains</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">/// decomp::symbol_t values. the symbol values are references by a hashcode.</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html"> 45</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html" title="this class is a high level wrapper for a hashmap that contains decomp::symbol_t values....">symbol_table_t</a> {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">public</span>:<span class="comment"></span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment"> /// default constructor. does nothing.</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ad06d4004c0cb454b1ffe7e2ae2ccedf5"> 50</a></span><span class="comment"></span> <a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ad06d4004c0cb454b1ffe7e2ae2ccedf5" title="default constructor. does nothing.">symbol_table_t</a>() {}</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment"></span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment"> /// this constructor will populate the m_table private field with symbols.</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment"> /// &lt;param name=&quot;syms&quot;&gt;vector of decomp::symbol_t&lt;/param&gt;</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment"></span> <a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ad06d4004c0cb454b1ffe7e2ae2ccedf5" title="default constructor. does nothing.">symbol_table_t</a>(<span class="keyword">const</span> std::vector&lt;decomp::symbol_t&gt;&amp;&amp; syms);</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment"></span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment"> /// add symbol to m_table</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment"> /// &lt;param name=&quot;sym&quot;&gt;symbol to be added.&lt;/param&gt;</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af9caf2d4d97b2498aa624c3750a7a601" title="add symbol to m_table">put_symbol</a>(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>&amp; sym);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment"></span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment"> /// add a vector of symbol to m_table</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment"> /// &lt;param name=&quot;syms&quot;&gt;&lt;/param&gt;</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ae7c35d9336f67d3175910c028e0b9b3e" title="add a vector of symbol to m_table">put_symbols</a>(std::vector&lt;decomp::symbol_t&gt;&amp; syms);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment"></span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment"> /// returns an optional pointer to a symbol from the symbol table given the</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// symbols hash (hash of its name) the hash is produced by</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> /// theo::decomp::symbol_t::hash</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"> /// &lt;param name=&quot;hash&quot;&gt;hashcode of the symbol to get from the symbol</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment"> /// table...&lt;/param&gt; &lt;returns&gt;returns an optional pointer to a</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="comment"> /// theo::decomp::symbol_t&lt;/returns&gt;</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="comment"></span> std::optional&lt;decomp::symbol_t*&gt; <a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a308c0dbcc4d569467e0986b32ef30db5" title="returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its nam...">sym_from_hash</a>(std::size_t hash);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="comment"></span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="comment"> /// returns an optional pointer to a symbol given its allocation location.</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="comment"> /// &lt;param name=&quot;allocated_at&quot;&gt;the address where the symbol is allocated</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"> /// at.&lt;/param&gt; &lt;returns&gt;returns an optional pointer to a</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="comment"> /// theo::decomp::symbol_t&lt;/returns&gt;</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="comment"></span> std::optional&lt;decomp::symbol_t*&gt; <a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#abaea9fd899d87b09d60c2b815624e2d2" title="returns an optional pointer to a symbol given its allocation location.">sym_from_alloc</a>(std::uintptr_t allocated_at);</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment"></span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="comment"> /// this function is a wrapper function that allows you to get at each entry</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment"> /// in the symbol table by reference.</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment"> /// &lt;param name=&quot;fn&quot;&gt;a callback function that will be called for each</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="comment"> /// symbol&lt;/param&gt;</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d" title="this function is a wrapper function that allows you to get at each entry in the symbol table by refer...">for_each</a>(<a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">std::function</a>&lt;<span class="keywordtype">void</span>(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>&amp; sym)&gt; fn);</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="comment"></span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="comment"> /// returns the size of the symbol table.</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> /// &lt;returns&gt;returns the size of the symbol table.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"></span> std::uint32_t <a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af57c0495a442ea86af0f9cca4521631e" title="returns the size of the symbol table.">size</a>();</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> std::map&lt;std::size_t, decomp::symbol_t&gt; m_table;</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span>};</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span>} <span class="comment">// namespace theo::recomp</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,104 +0,0 @@
<!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: include/obf/transform/xor_op.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">xor_op.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d5/da4/operation_8hpp_source.html">obf/transform/operation.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d0/da4/xor__op_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">theo::obf::transform::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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a></td></tr>
<tr class="memdesc:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses the code for transforming relocations. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,127 +0,0 @@
<!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: include/obf/transform/xor_op.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">xor_op.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d0/da4/xor__op_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d5/da4/operation_8hpp.html">obf/transform/operation.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html" title="this namespace encompasses the code for transforming relocations.">theo::obf::transform</a> {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html"> 35</a></span><span class="keyword">class </span><a class="code hl_class" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">xor_op_t</a> : <span class="keyword">public</span> <a class="code hl_class" 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> {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">explicit</span> <a class="code hl_class" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">xor_op_t</a>()</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> : <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" title="explicit constructor for operation_t">operation_t</a>([&amp;](std::size_t val,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> std::uint32_t imm) -&gt; std::size_t { <span class="keywordflow">return</span> val ^ imm; },</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> XED_ICLASS_XOR) {}</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html#adaca6aff562bd3f37176b569a898f8b4"> 42</a></span> <span class="keyword">static</span> <a class="code hl_class" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">xor_op_t</a>* <a class="code hl_function" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html#adaca6aff562bd3f37176b569a898f8b4">get</a>() {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">static</span> <a class="code hl_class" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">xor_op_t</a> obj;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>};</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>} <span class="comment">// namespace theo::obf::transform</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,104 +0,0 @@
<!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: include/recomp/reloc.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_d92462d752f7a277bbc0245a347b2579.html">recomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">reloc.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;cstddef&gt;</code><br />
<code>#include &lt;cstdint&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d6/deb/transform_8hpp_source.html">obf/transform/transform.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d1/d82/reloc_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">meta data about a relocation for a symbol <a href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:da/dbd/namespacetheo_1_1recomp"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html">theo::recomp</a></td></tr>
<tr class="memdesc:da/dbd/namespacetheo_1_1recomp"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses all recomposition related code. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,192 +0,0 @@
<!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: include/recomp/reloc.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_d92462d752f7a277bbc0245a347b2579.html">recomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">reloc.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d1/d82/reloc_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;cstddef&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;<a class="code" href="../../d6/deb/transform_8hpp.html">obf/transform/transform.hpp</a>&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../da/dbd/namespacetheo_1_1recomp.html" title="this namespace encompasses all recomposition related code.">theo::recomp</a> {</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment"></span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">/// meta data about a relocation for a symbol</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html"> 41</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html" title="meta data about a relocation for a symbol">reloc_t</a> {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keyword">public</span>:<span class="comment"></span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment"> /// explicit constructor for this class.</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment"> /// &lt;param name=&quot;offset&quot;&gt;offset into the symbol data where the relocation is</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment"> /// at. all relocations are assumed to be linear virtual addresses of the</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment"> /// symbol.&lt;/param&gt;</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment"> /// &lt;param name=&quot;hash&quot;&gt;hash of the symbol to which the relocation is</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment"> /// of.&lt;/param&gt; &lt;param name=&quot;sym_name&quot;&gt;the name of the symbol to which the</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment"> /// relocation is of.&lt;/param&gt;</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a7cb1cf1c58a6f3cdf7ae326d65948548"> 52</a></span><span class="comment"></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a7cb1cf1c58a6f3cdf7ae326d65948548" title="explicit constructor for this class.">reloc_t</a>(std::uint32_t <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a537836fcea3326e4269375a1486f0323" title="returns the offset into the symbol to which the relocation will be applied. the offset is in bytes....">offset</a>,</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> std::size_t <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#aa340b2c2d5d1ac7f96a1dbee39f25461" title="returns the hash of the relocation symbol.">hash</a>,</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> <span class="keyword">const</span> std::string&amp;&amp; sym_name)</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> : m_offset(<a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a537836fcea3326e4269375a1486f0323" title="returns the offset into the symbol to which the relocation will be applied. the offset is in bytes....">offset</a>), m_hash(<a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#aa340b2c2d5d1ac7f96a1dbee39f25461" title="returns the hash of the relocation symbol.">hash</a>), m_sym_name(sym_name) {}</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment"></span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment"> /// returns the hash of the relocation symbol.</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment"> /// &lt;returns&gt;hash of the relocation symbol&lt;/returns&gt;</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#aa340b2c2d5d1ac7f96a1dbee39f25461"> 61</a></span><span class="comment"></span> std::size_t <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#aa340b2c2d5d1ac7f96a1dbee39f25461" title="returns the hash of the relocation symbol.">hash</a>() { <span class="keywordflow">return</span> m_hash; }</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment"></span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment"> /// returns the name of the relocation symbol.</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment"> /// &lt;returns&gt;returns the name of the relocation symbol.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#aa181755df50bc566b164072b21788fec"> 67</a></span><span class="comment"></span> std::string <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#aa181755df50bc566b164072b21788fec" title="returns the name of the relocation symbol.">name</a>() { <span class="keywordflow">return</span> m_sym_name; }</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"></span> </div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="comment"> /// returns the offset into the symbol to which the relocation will be</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment"> /// applied. the offset is in bytes. zero based.</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> /// &lt;returns&gt;returns the offset into the symbol to which the relocation will</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// be applied. the offset is in bytes. zero based.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a537836fcea3326e4269375a1486f0323"> 75</a></span><span class="comment"></span> std::uint32_t <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a537836fcea3326e4269375a1486f0323" title="returns the offset into the symbol to which the relocation will be applied. the offset is in bytes....">offset</a>() { <span class="keywordflow">return</span> m_offset; }</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment"></span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="comment"> /// sets the offset to which the relocation gets applied too.</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="comment"> /// &lt;param name=&quot;offset&quot;&gt;offset to which the relocation gets applied</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="comment"> /// too.&lt;/param&gt;</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a99e65270ace1ff4f080bd4040c8a43dd"> 82</a></span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a99e65270ace1ff4f080bd4040c8a43dd" title="sets the offset to which the relocation gets applied too.">offset</a>(std::uint32_t <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a537836fcea3326e4269375a1486f0323" title="returns the offset into the symbol to which the relocation will be applied. the offset is in bytes....">offset</a>) { m_offset = <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a99e65270ace1ff4f080bd4040c8a43dd" title="sets the offset to which the relocation gets applied too.">offset</a>; }</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="comment"></span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="comment"> /// adds a transformation to be applied to the relocation prior to writing it</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="comment"> /// into the symbol.</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"> /// &lt;param name=&quot;entry&quot;&gt;a pair containing a lambda function that when executed</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="comment"> /// transforms a relocation. the second value in the pair is a random value</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment"> /// which is passed to the lambda.&lt;/param&gt;</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"><a class="line" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#ab5214a9ff9135672e25f40406c37fb10"> 91</a></span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#ab5214a9ff9135672e25f40406c37fb10" title="adds a transformation to be applied to the relocation prior to writing it into the symbol.">add_transform</a>(</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> std::pair&lt;obf::transform::transform_t*, std::uint32_t&gt; entry) {</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> m_transforms.push_back(entry);</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> }</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="comment"></span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="comment"> /// gets the vector of transformation.</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> /// &lt;returns&gt;returns the vector of transformations.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"></span> std::vector&lt;std::pair&lt;obf::transform::transform_t*, std::uint32_t&gt;&gt;&amp;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#af8abfa7a4f1052308a233629faf39a78"> 101</a></span> <a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#af8abfa7a4f1052308a233629faf39a78" title="gets the vector of transformation.">get_transforms</a>() {</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">return</span> m_transforms;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> }</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> std::vector&lt;std::pair&lt;obf::transform::transform_t*, std::uint32_t&gt;&gt;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> m_transforms;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> std::string m_sym_name;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> std::size_t m_hash;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> std::uint32_t m_offset;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span>};</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>} <span class="comment">// namespace theo::recomp</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,86 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">engine_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::engine_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">theo::obf::engine_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a8ffc963a133653fa3a0875798d0d3426">add_pass</a>(pass_t *pass)</td><td class="entry"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">theo::obf::engine_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a58715f5c3ade824a65e602aba570040e">get</a>()</td><td class="entry"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">theo::obf::engine_t</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a7acfdbe9c229cf1f351cec610ab193d3">run</a>(decomp::symbol_t *sym)</td><td class="entry"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">theo::obf::engine_t</a></td><td class="entry"></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,87 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d9/dbd/namespacetheo_1_1decomp.html">decomp</a></li><li class="navelem"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html">routine_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::decomp::routine_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html">theo::decomp::routine_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#a605a2be669a10a5a45325a5dca04401a">data</a>()</td><td class="entry"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html">theo::decomp::routine_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#a1f790bd144badc71d6c4942cac8fc4e8">decompose</a>()</td><td class="entry"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html">theo::decomp::routine_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#ab9f0693c5ec50954d953b28bebe4426b">routine_t</a>(coff::symbol_t *sym, coff::image_t *img, coff::section_header_t *scn, std::vector&lt; std::uint8_t &gt; &amp;fn, sym_type_t dcmp_type)</td><td class="entry"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html">theo::decomp::routine_t</a></td><td class="entry"><span class="mlabel">explicit</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#ad3a75cb97abbcd9b282772401b256f36">scn</a>()</td><td class="entry"><a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html">theo::decomp::routine_t</a></td><td class="entry"></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,104 +0,0 @@
<!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: include/obf/transform/add_op.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">add_op.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d5/da4/operation_8hpp_source.html">obf/transform/operation.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d1/def/add__op_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">theo::obf::transform::add_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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a></td></tr>
<tr class="memdesc:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses the code for transforming relocations. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,127 +0,0 @@
<!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: include/obf/transform/add_op.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">add_op.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d1/def/add__op_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d5/da4/operation_8hpp.html">obf/transform/operation.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html"> 34</a></span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html" title="this namespace encompasses the code for transforming relocations.">theo::obf::transform</a> {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html"> 35</a></span><span class="keyword">class </span><a class="code hl_class" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a> : <span class="keyword">public</span> <a class="code hl_class" 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> {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">explicit</span> <a class="code hl_class" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a>()</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> : <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" title="explicit constructor for operation_t">operation_t</a>([&amp;](std::size_t val,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> std::uint32_t imm) -&gt; std::size_t { <span class="keywordflow">return</span> val + imm; },</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> XED_ICLASS_ADD) {}</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html#a73d8d592c092482231fb5321ded6e83b"> 42</a></span> <span class="keyword">static</span> <a class="code hl_class" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a>* <a class="code hl_function" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html#a73d8d592c092482231fb5321ded6e83b">get</a>() {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">static</span> <a class="code hl_class" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a> obj;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>};</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>} <span class="comment">// namespace theo::obf::transform</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,141 +0,0 @@
<!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: include/theo.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle"><div class="title">theo.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;spdlog/spdlog.h&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d2/d96/decomp_8hpp_source.html">decomp/decomp.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../de/d46/engine_8hpp_source.html">obf/engine.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d4/d4a/recomp_8hpp_source.html">recomp/recomp.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html">recomp/symbol_table.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d2/df9/jcc__rewrite__pass_8hpp_source.html">obf/passes/jcc_rewrite_pass.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d5/d54/next__inst__pass_8hpp_source.html">obf/passes/next_inst_pass.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../de/d64/reloc__transform__pass_8hpp_source.html">obf/passes/reloc_transform_pass.hpp</a>&gt;</code><br />
<code>#include &lt;optional&gt;</code><br />
<code>#include &lt;tuple&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;xed-decode.h&gt;</code><br />
<code>#include &lt;xed-interface.h&gt;</code><br />
</div>
<p><a href="../../d2/d24/theo_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d9/dbc/classtheo_1_1theo__t.html">theo::theo_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge that connects all three: decomp, obf, recomp. <a href="../../d9/dbc/classtheo_1_1theo__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></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 id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a3925943d185a09ad9e32ed8637ccb533"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d24/theo_8hpp.html#a3925943d185a09ad9e32ed8637ccb533">XED_ENCODER</a></td></tr>
<tr class="separator:a3925943d185a09ad9e32ed8637ccb533"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a66efe2c63e06764fb2d9a378c688c680"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html#a66efe2c63e06764fb2d9a378c688c680">theo::lnk_fns_t</a> = std::tuple&lt; recomp::allocator_t, recomp::copier_t, recomp::resolver_t &gt;</td></tr>
<tr class="memdesc:a66efe2c63e06764fb2d9a378c688c680"><td class="mdescLeft">&#160;</td><td class="mdescRight">tuple of functions used by theo to allocate, copy, and resolve symbols. <a href="../../da/de6/namespacetheo.html#a66efe2c63e06764fb2d9a378c688c680">More...</a><br /></td></tr>
<tr class="separator:a66efe2c63e06764fb2d9a378c688c680"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a3925943d185a09ad9e32ed8637ccb533" name="a3925943d185a09ad9e32ed8637ccb533"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3925943d185a09ad9e32ed8637ccb533">&#9670;&nbsp;</a></span>XED_ENCODER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define XED_ENCODER</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d2/d24/theo_8hpp_source.html#l00046">46</a> of file <a class="el" href="../../d2/d24/theo_8hpp_source.html">theo.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.3
</small></address>
</body>
</html>

@ -1,190 +0,0 @@
<!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: include/theo.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d2/d24/theo_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;spdlog/spdlog.h&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;<a class="code" href="../../d2/d96/decomp_8hpp.html">decomp/decomp.hpp</a>&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;<a class="code" href="../../de/d46/engine_8hpp.html">obf/engine.hpp</a>&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include &lt;<a class="code" href="../../d4/d4a/recomp_8hpp.html">recomp/recomp.hpp</a>&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include &lt;<a class="code" href="../../d0/d5e/symbol__table_8hpp.html">recomp/symbol_table.hpp</a>&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor">#include &lt;<a class="code" href="../../d2/df9/jcc__rewrite__pass_8hpp.html">obf/passes/jcc_rewrite_pass.hpp</a>&gt;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="preprocessor">#include &lt;<a class="code" href="../../d5/d54/next__inst__pass_8hpp.html">obf/passes/next_inst_pass.hpp</a>&gt;</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor">#include &lt;<a class="code" href="../../de/d64/reloc__transform__pass_8hpp.html">obf/passes/reloc_transform_pass.hpp</a>&gt;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="preprocessor">#include &lt;optional&gt;</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="preprocessor">#include &lt;tuple&gt;</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="../../d2/d24/theo_8hpp.html#a3925943d185a09ad9e32ed8637ccb533"> 46</a></span><span class="preprocessor">#define XED_ENCODER</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="preprocessor">#include &lt;xed-decode.h&gt;</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="preprocessor">#include &lt;xed-interface.h&gt;</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span>}</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment"></span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">/// The outer most encompassing namespace of this project.</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment"></span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../da/de6/namespacetheo.html" title="The outer most encompassing namespace of this project.">theo</a> {</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment"></span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">/// tuple of functions used by theo to allocate, copy, and resolve symbols.</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="../../da/de6/namespacetheo.html#a66efe2c63e06764fb2d9a378c688c680"> 60</a></span><span class="comment"></span><span class="keyword">using</span> <a class="code hl_typedef" href="../../da/de6/namespacetheo.html#a66efe2c63e06764fb2d9a378c688c680" title="tuple of functions used by theo to allocate, copy, and resolve symbols.">lnk_fns_t</a> =</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> std::tuple&lt;recomp::allocator_t, recomp::copier_t, recomp::resolver_t&gt;;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment"></span> </div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment">/// the main class which encapsulates a symbol table, decomp, and recomp</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment">/// objects. This class is a bridge that connects all three: decomp, obf,</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment">/// recomp.</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment">///</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment">/// You will create an object of this type when using theo.</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="../../d9/dbc/classtheo_1_1theo__t.html"> 70</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../d9/dbc/classtheo_1_1theo__t.html" title="the main class which encapsulates a symbol table, decomp, and recomp objects. This class is a bridge ...">theo_t</a> {</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keyword">public</span>:<span class="comment"></span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> /// explicit constructor for theo class.</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"> /// &lt;param name=&quot;lib&quot;&gt;a vector of bytes consisting of a lib&lt;/param&gt;</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment"> /// &lt;param name=&quot;lnkr_fns&quot;&gt;&lt;/param&gt;</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="comment"> /// &lt;param name=&quot;entry_sym&quot;&gt;the name of the function which will be used as the</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="comment"> /// entry point&lt;/param&gt;</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="comment"></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../d9/dbc/classtheo_1_1theo__t.html#a0a9ae3322261b97cf1dc47c908ef3c6d" title="explicit constructor for theo class.">theo_t</a>(std::vector&lt;std::uint8_t&gt;&amp; lib,</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> <a class="code hl_typedef" href="../../da/de6/namespacetheo.html#a66efe2c63e06764fb2d9a378c688c680" title="tuple of functions used by theo to allocate, copy, and resolve symbols.">lnk_fns_t</a> lnkr_fns,</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keyword">const</span> std::string&amp;&amp; entry_sym);</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="comment"></span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"> /// decomposes the lib file and return the number of symbols that are used.</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="comment"> /// &lt;returns&gt;optional amount of symbols that are used. no value if</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment"> /// decomposition fails.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"></span> std::optional&lt;std::uint32_t&gt; <a class="code hl_function" href="../../d9/dbc/classtheo_1_1theo__t.html#a66257ff5d9825483d85e58384a12760a" title="decomposes the lib file and return the number of symbols that are used.">decompose</a>();</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="comment"></span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment"> /// compose the decomposed module. This will run obfuscation passes, the map</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment"> /// and resolve symbols to each other.</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="comment"> /// &lt;returns&gt;returns the address of the entry point symbol&lt;/returns&gt;</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="comment"></span> std::uintptr_t <a class="code hl_function" href="../../d9/dbc/classtheo_1_1theo__t.html#a39e067dd71f82b437c6a418d41e38b27" title="compose the decomposed module. This will run obfuscation passes, the map and resolve symbols to each ...">compose</a>();</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="comment"></span> </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> /// given the name of a symbol, it returns the address of where its mapped.</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"> /// &lt;param name=&quot;sym&quot;&gt;the name of the symbol&lt;/param&gt;</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="comment"> /// &lt;returns&gt;the address of the symbol&lt;/returns&gt;</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"></span> std::uintptr_t <a class="code hl_function" href="../../d9/dbc/classtheo_1_1theo__t.html#a97c52bda4b07a456ff1ea6f3c1cdbe24" title="given the name of a symbol, it returns the address of where its mapped.">resolve</a>(<span class="keyword">const</span> std::string&amp;&amp; sym);</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> std::string m_entry_sym;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_class" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html" title="the main decomposition class which is responsible for breaking down lib file into coff files,...">decomp::decomp_t</a> m_dcmp;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_class" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html" title="the main class responsible for recomposition">recomp::recomp_t</a> m_recmp;</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <a class="code hl_class" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html" title="this class is a high level wrapper for a hashmap that contains decomp::symbol_t values....">recomp::symbol_table_t</a> m_sym_tbl;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span>};</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span>} <span class="comment">// namespace theo</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,92 +0,0 @@
<!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: src/theo.cpp File 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">&#160;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&amp;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&amp;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="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">theo.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d2/d24/theo_8hpp_source.html">theo.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d2/d26/theo_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,155 +0,0 @@
<!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: src/theo.cpp Source File</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">&#160;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&amp;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&amp;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="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d2/d26/theo_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include &lt;<a class="code" href="../../d2/d24/theo_8hpp.html">theo.hpp</a>&gt;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../da/de6/namespacetheo.html" title="The outer most encompassing namespace of this project.">theo</a> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../d9/dbc/classtheo_1_1theo__t.html#a0a9ae3322261b97cf1dc47c908ef3c6d"> 34</a></span><a class="code hl_function" href="../../d9/dbc/classtheo_1_1theo__t.html#a0a9ae3322261b97cf1dc47c908ef3c6d" title="explicit constructor for theo class.">theo_t::theo_t</a>(std::vector&lt;std::uint8_t&gt;&amp; lib,</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <a class="code hl_typedef" href="../../da/de6/namespacetheo.html#a66efe2c63e06764fb2d9a378c688c680" title="tuple of functions used by theo to allocate, copy, and resolve symbols.">lnk_fns_t</a> lnkr_fns,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">const</span> std::string&amp;&amp; entry_sym)</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> : m_dcmp(lib, &amp;m_sym_tbl),</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> m_recmp(&amp;m_dcmp, {}, {}, {}),</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> m_entry_sym(entry_sym) {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> m_recmp.<a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a0da9a904b0057c14190218592aff0f07" title="setter for the allocater lambda function.">allocator</a>(std::get&lt;0&gt;(lnkr_fns));</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> m_recmp.<a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#aa6fecf752d4c5bc211e164d8496724b1" title="setter for the copier lambda function.">copier</a>(std::get&lt;1&gt;(lnkr_fns));</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> m_recmp.<a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a1be6d0cdb57565c31b138248c8b2d470" title="setter for the resolve lambda function.">resolver</a>(std::get&lt;2&gt;(lnkr_fns));</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="../../d9/dbc/classtheo_1_1theo__t.html#a66257ff5d9825483d85e58384a12760a"> 45</a></span>std::optional&lt;std::uint32_t&gt; <a class="code hl_function" href="../../d9/dbc/classtheo_1_1theo__t.html#a66257ff5d9825483d85e58384a12760a" title="decomposes the lib file and return the number of symbols that are used.">theo_t::decompose</a>() {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">auto</span> res = m_dcmp.<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#ae23353a4293aa30969b6d3fa37359469" title="decomposes (extracts) the symbols used. this function determines all used symbols given the entry poi...">decompose</a>(m_entry_sym);</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keywordflow">if</span> (!res.has_value()) {</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> spdlog::error(<span class="stringliteral">&quot;failed to decompose...\n&quot;</span>);</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keywordflow">return</span> {};</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> }</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> spdlog::info(<span class="stringliteral">&quot;decompose successful... {} symbols&quot;</span>, res.value()-&gt;size());</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">return</span> res.value()-&gt;size();</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>}</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="../../d9/dbc/classtheo_1_1theo__t.html#a39e067dd71f82b437c6a418d41e38b27"> 56</a></span>std::uintptr_t <a class="code hl_function" href="../../d9/dbc/classtheo_1_1theo__t.html#a39e067dd71f82b437c6a418d41e38b27" title="compose the decomposed module. This will run obfuscation passes, the map and resolve symbols to each ...">theo_t::compose</a>() {</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// run obfuscation engine on all symbols...</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <span class="comment">//</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <span class="keyword">auto</span> engine = <a class="code hl_function" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a58715f5c3ade824a65e602aba570040e" title="get the singleton object of this class.">obf::engine_t::get</a>();</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> m_sym_tbl.<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d" title="this function is a wrapper function that allows you to get at each entry in the symbol table by refer...">for_each</a>([&amp;](<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>&amp; sym) { engine-&gt;run(&amp;sym); });</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> m_recmp.<a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a78502665e218d3addca9b1e5e3875f39" title="when called, this function allocates space for every symbol.">allocate</a>();</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> m_recmp.<a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094" title="when called, this function resolves all relocations in every symbol.">resolve</a>();</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> m_recmp.<a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a080d88f122d12faf2e328c9bdd10be6e" title="when called, this function copies symbols into allocations.">copy_syms</a>();</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">return</span> m_recmp.<a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094" title="when called, this function resolves all relocations in every symbol.">resolve</a>(m_entry_sym.data());</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span>}</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="../../d9/dbc/classtheo_1_1theo__t.html#a97c52bda4b07a456ff1ea6f3c1cdbe24"> 68</a></span>std::uintptr_t <a class="code hl_function" href="../../d9/dbc/classtheo_1_1theo__t.html#a97c52bda4b07a456ff1ea6f3c1cdbe24" title="given the name of a symbol, it returns the address of where its mapped.">theo_t::resolve</a>(<span class="keyword">const</span> std::string&amp;&amp; sym) {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">auto</span> val = m_sym_tbl.<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a308c0dbcc4d569467e0986b32ef30db5" title="returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its nam...">sym_from_hash</a>(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">decomp::symbol_t::hash</a>(sym));</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">if</span> (!val.has_value())</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="keywordflow">return</span> {};</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">return</span> val.value()-&gt;allocated_at();</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>}</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span>} <span class="comment">// namespace theo</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,119 +0,0 @@
<!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: include/decomp/decomp.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_2ff93ba14c434dbcd5d31be832ec37b1.html">decomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle"><div class="title">decomp.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;spdlog/spdlog.h&gt;</code><br />
<code>#include &lt;cstdint&gt;</code><br />
<code>#include &lt;linuxpe&gt;</code><br />
<code>#include &lt;optional&gt;</code><br />
<code>#include &lt;set&gt;</code><br />
<code>#include &lt;tuple&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;<a class="el" href="../../de/df5/routine_8hpp_source.html">decomp/routine.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html">recomp/symbol_table.hpp</a>&gt;</code><br />
<code>#include &lt;coff/archive.hpp&gt;</code><br />
<code>#include &lt;coff/image.hpp&gt;</code><br />
</div>
<p><a href="../../d2/d96/decomp_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files. <a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d9/dbd/namespacetheo_1_1decomp"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html">theo::decomp</a></td></tr>
<tr class="memdesc:d9/dbd/namespacetheo_1_1decomp"><td class="mdescLeft">&#160;</td><td class="mdescRight">the namespace that contains all of the decomposition related code. <br /></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 id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:abbf09e1f7eb9e42057ff9c9e8be41266"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#abbf09e1f7eb9e42057ff9c9e8be41266">theo::decomp::sym_data_t</a> = std::tuple&lt; coff::image_t *, coff::symbol_t *, std::uint32_t &gt;</td></tr>
<tr class="memdesc:abbf09e1f7eb9e42057ff9c9e8be41266"><td class="mdescLeft">&#160;</td><td class="mdescRight">meta symbol data. consists of the coff image which contains the coff symbol, the coff symbol itself, and the size (if any) of the symbol. <a href="../../d9/dbd/namespacetheo_1_1decomp.html#abbf09e1f7eb9e42057ff9c9e8be41266">More...</a><br /></td></tr>
<tr class="separator:abbf09e1f7eb9e42057ff9c9e8be41266"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,229 +0,0 @@
<!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: include/decomp/decomp.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_2ff93ba14c434dbcd5d31be832ec37b1.html">decomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">decomp.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d2/d96/decomp_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;spdlog/spdlog.h&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;linuxpe&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include &lt;optional&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include &lt;set&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#include &lt;tuple&gt;</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor">#include &lt;<a class="code" href="../../de/df5/routine_8hpp.html">decomp/routine.hpp</a>&gt;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor">#include &lt;<a class="code" href="../../d0/d5e/symbol__table_8hpp.html">recomp/symbol_table.hpp</a>&gt;</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="preprocessor">#include &lt;coff/archive.hpp&gt;</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor">#include &lt;coff/image.hpp&gt;</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment"></span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">/// the namespace that contains all of the decomposition related code.</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="../../da/de6/namespacetheo.html"> 49</a></span><span class="comment"></span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d9/dbd/namespacetheo_1_1decomp.html" title="the namespace that contains all of the decomposition related code.">theo::decomp</a> {</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment"></span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/// meta symbol data. consists of the coff image which contains the coff symbol,</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">/// the coff symbol itself, and the size (if any) of the symbol.</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="../../d9/dbd/namespacetheo_1_1decomp.html#abbf09e1f7eb9e42057ff9c9e8be41266"> 55</a></span><span class="comment"></span><span class="keyword">using</span> <a class="code hl_typedef" href="../../d9/dbd/namespacetheo_1_1decomp.html#abbf09e1f7eb9e42057ff9c9e8be41266" title="meta symbol data. consists of the coff image which contains the coff symbol, the coff symbol itself,...">sym_data_t</a> = std::tuple&lt;coff::image_t*, coff::symbol_t*, std::uint32_t&gt;;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment"></span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">/// the main decomposition class which is responsible for breaking down lib file</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">/// into coff files, and extracted used symbols from the coff files.</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html"> 61</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html" title="the main decomposition class which is responsible for breaking down lib file into coff files,...">decomp_t</a> {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">public</span>:<span class="comment"></span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment"> /// the explicit constructor for decomp_t</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment"> /// &lt;param name=&quot;lib&quot;&gt;vector of bytes containing the lib file.&lt;/param&gt;</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment"> /// &lt;param name=&quot;syms&quot;&gt;symbol table that gets populated and managed by this</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"> /// class.&lt;/param&gt;</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment"></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a35cfac16bd918d576b29e04388690d68" title="the explicit constructor for decomp_t">decomp_t</a>(std::vector&lt;std::uint8_t&gt;&amp; <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2" title="gets a vector of bytes consisting of the lib file.">lib</a>,</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <a class="code hl_class" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html" title="this class is a high level wrapper for a hashmap that contains decomp::symbol_t values....">recomp::symbol_table_t</a>* <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment"></span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> /// gets all of the routine objects.</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"> /// &lt;returns&gt;vector of routine objects.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment"></span> std::vector&lt;routine_t&gt; <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a79c965ec0a996a936faae7f54b0e055e" title="gets all of the routine objects.">rtns</a>();</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="comment"></span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="comment"> /// gets a vector of bytes consisting of the lib file.</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="comment"> /// &lt;returns&gt;a vector of bytes consisting of the lib file.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="comment"></span> std::vector&lt;std::uint8_t&gt; <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2" title="gets a vector of bytes consisting of the lib file.">lib</a>();</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="comment"></span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="comment"> /// gets all the obj files as a vector of a vector of bytes.</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment"> /// &lt;returns&gt;all the obj files as a vector of a vector of bytes.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"></span> std::vector&lt;std::vector&lt;std::uint8_t&gt;&gt; <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a81ae70b313a9ef24ea5d8f404699baef" title="gets all the obj files as a vector of a vector of bytes.">objs</a>();</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="comment"></span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment"> /// gets the symbol table.</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="comment"> /// &lt;returns&gt;the symbol table.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="comment"></span> <a class="code hl_class" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html" title="this class is a high level wrapper for a hashmap that contains decomp::symbol_t values....">recomp::symbol_table_t</a>* <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>();</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="comment"></span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="comment"> /// gets the section hash table section header --&gt; hash of the section header</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> /// ptr.</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"> /// &lt;returns&gt;the section hash table section header --&gt; hash of the section</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="comment"> /// header ptr.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"></span> std::map&lt;coff::section_header_t*, std::size_t&gt;&amp; <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a860dddc3a5d12231b685dbaa12a0db06" title="gets the section hash table section header --&gt; hash of the section header ptr.">scn_hash_tbl</a>();</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="comment"></span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="comment"> /// decomposes (extracts) the symbols used. this function determines all used</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="comment"> /// symbols given the entry point.</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="comment"> /// &lt;param name=&quot;entry_sym&quot;&gt;the entry point symbol name.&lt;/param&gt;</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment"> /// &lt;returns&gt;returns an optional pointer to the symbol table. no value in the</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="comment"> /// optional object on failure.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="comment"></span> std::optional&lt;recomp::symbol_table_t*&gt; <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#ae23353a4293aa30969b6d3fa37359469" title="decomposes (extracts) the symbols used. this function determines all used symbols given the entry poi...">decompose</a>(std::string&amp; entry_sym);</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keyword">private</span>:<span class="comment"></span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="comment"> /// extracts used symbols from coff files.</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="comment"> /// &lt;param name=&quot;entry_sym&quot;&gt;the entry point symbol name&lt;/param&gt;</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="comment"> /// &lt;returns&gt;number of symbols used&lt;/returns&gt;</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="comment"></span> std::uint32_t ext_used_syms(<span class="keyword">const</span> std::string&amp;&amp; entry_sym);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="comment"></span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="comment"> /// get symbol meta data by name.</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="comment"> /// &lt;param name=&quot;name&quot;&gt;symbol name&lt;/param&gt;</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><span class="comment"> /// &lt;returns&gt;optional symbol meta data if it exists.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span><span class="comment"></span> std::optional&lt;sym_data_t&gt; get_symbol(<span class="keyword">const</span> std::string_view&amp; name);</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span><span class="comment"></span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="comment"> /// the next symbol in the section.</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="comment"> /// &lt;param name=&quot;img&quot;&gt;coff image that contains the symbol.&lt;/param&gt;</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span><span class="comment"> /// &lt;param name=&quot;hdr&quot;&gt;coff section header of the section that contains the</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span><span class="comment"> /// symbol.&lt;/param&gt;</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="comment"> /// &lt;param name=&quot;s&quot;&gt;symbol in which to get the next one of.&lt;/param&gt;</span></div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="comment"> /// &lt;returns&gt;offset into the section where the next symbol is at.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="comment"></span> std::uint32_t next_sym(coff::image_t* img,</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> coff::section_header_t* hdr,</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> coff::symbol_t* s);</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> <span class="keyword">const</span> std::vector&lt;std::uint8_t&gt; m_lib;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> std::vector&lt;std::vector&lt;std::uint8_t&gt;&gt; m_objs;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> std::vector&lt;routine_t&gt; m_rtns;</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> std::set&lt;sym_data_t&gt; m_used_syms;</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> std::set&lt;coff::image_t*&gt; m_processed_objs;</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> std::map&lt;coff::section_header_t*, std::size_t&gt; m_scn_hash_tbl;</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> std::map&lt;std::size_t, std::vector&lt;sym_data_t&gt;&gt; m_lookup_tbl;</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> <a class="code hl_class" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html" title="this class is a high level wrapper for a hashmap that contains decomp::symbol_t values....">recomp::symbol_table_t</a>* m_syms;</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span>};</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span>} <span class="comment">// namespace theo::decomp</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,95 +0,0 @@
<!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: src/decomp/routine.cpp File 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">&#160;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&amp;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&amp;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="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_1a96c2bb8e6464c69de5f985611044b4.html">decomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">routine.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../de/df5/routine_8hpp_source.html">decomp/routine.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d2/dbb/routine_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d9/dbd/namespacetheo_1_1decomp"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html">theo::decomp</a></td></tr>
<tr class="memdesc:d9/dbd/namespacetheo_1_1decomp"><td class="mdescLeft">&#160;</td><td class="mdescRight">the namespace that contains all of the decomposition related code. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,255 +0,0 @@
<!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: src/decomp/routine.cpp Source File</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">&#160;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&amp;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&amp;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="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_1a96c2bb8e6464c69de5f985611044b4.html">decomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">routine.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d2/dbb/routine_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include &lt;<a class="code" href="../../de/df5/routine_8hpp.html">decomp/routine.hpp</a>&gt;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d9/dbd/namespacetheo_1_1decomp.html" title="the namespace that contains all of the decomposition related code.">theo::decomp</a> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#ab9f0693c5ec50954d953b28bebe4426b"> 34</a></span><a class="code hl_function" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#ab9f0693c5ec50954d953b28bebe4426b" title="the explicit constructor for routine_t.">routine_t::routine_t</a>(coff::symbol_t* sym,</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> coff::image_t* img,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> coff::section_header_t* scn,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> std::vector&lt;std::uint8_t&gt;&amp; fn,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> <a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">sym_type_t</a> dcmp_type)</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> : m_img(img), m_scn(scn), m_data(fn), m_dcmp_type(dcmp_type), m_sym(sym) {}</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#a1f790bd144badc71d6c4942cac8fc4e8"> 41</a></span>std::vector&lt;decomp::symbol_t&gt; <a class="code hl_function" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#a1f790bd144badc71d6c4942cac8fc4e8" title="decompose the function into symbol(s).">routine_t::decompose</a>() {</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> std::vector&lt;decomp::symbol_t&gt; result;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">switch</span> (m_dcmp_type) {</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">function</a>: {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> std::vector&lt;recomp::reloc_t&gt; relocs;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">auto</span> scn_relocs = <span class="keyword">reinterpret_cast&lt;</span>coff::reloc_t*<span class="keyword">&gt;</span>(</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> m_scn-&gt;ptr_relocs + <span class="keyword">reinterpret_cast&lt;</span>std::uint8_t*<span class="keyword">&gt;</span>(m_img));</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> idx = 0u; idx &lt; m_scn-&gt;num_relocs; ++idx) {</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">auto</span> scn_reloc = &amp;scn_relocs[idx];</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="comment">// if the reloc is in the current function...</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">if</span> (scn_reloc-&gt;virtual_address &gt;= m_sym-&gt;value &amp;&amp;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> scn_reloc-&gt;virtual_address &lt; m_sym-&gt;value + m_data.size()) {</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">auto</span> sym_reloc = m_img-&gt;get_symbol(scn_relocs[idx].symbol_index);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">auto</span> sym_name = <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">symbol_t::name</a>(m_img, sym_reloc);</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">auto</span> sym_hash = <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">decomp::symbol_t::hash</a>(sym_name.data());</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> relocs.push_back(</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> <a class="code hl_class" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html" title="meta data about a relocation for a symbol">recomp::reloc_t</a>(scn_reloc-&gt;virtual_address - m_sym-&gt;value,</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> sym_hash, sym_name.data()));</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> }</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> }</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> result.push_back(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>(</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> m_img, <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">symbol_t::name</a>(m_img, m_sym).<a class="code hl_function" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#a605a2be669a10a5a45325a5dca04401a" title="gets the function bytes.">data</a>(), m_sym-&gt;value, m_data,</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> m_scn, m_sym, relocs, <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">sym_type_t::function</a>));</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> }</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9">instruction</a>: {</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> std::uint32_t offset = {};</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> xed_error_enum_t err;</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> xed_decoded_inst_t instr;</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b};</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> xed_decoded_inst_zero_set_mode(&amp;instr, &amp;istate);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="comment">// keep looping over the section, lower the number of bytes each time...</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="comment">//</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="keywordflow">while</span> ((err = xed_decode(&amp;instr, m_data.data() + offset,</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> m_data.size() - offset)) == XED_ERROR_NONE) {</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="comment">// symbol name is of the format: symbol@instroffset, I.E: main@11...</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> <span class="comment">//</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <span class="keyword">auto</span> new_sym_name = <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">symbol_t::name</a>(m_img, m_sym);</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="comment">// first instruction doesnt need the @offset...</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="comment">//</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">if</span> (offset)</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> new_sym_name.append(<span class="stringliteral">&quot;@&quot;</span>).append(std::to_string(offset));</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> std::vector&lt;recomp::reloc_t&gt; relocs;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keyword">auto</span> scn_relocs = <span class="keyword">reinterpret_cast&lt;</span>coff::reloc_t*<span class="keyword">&gt;</span>(</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> m_scn-&gt;ptr_relocs + <span class="keyword">reinterpret_cast&lt;</span>std::uint8_t*<span class="keyword">&gt;</span>(m_img));</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// find if this instruction has a relocation or not...</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> <span class="comment">// if so, return the reloc_t...</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="comment">//</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keyword">auto</span> reloc = std::find_if(</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> scn_relocs, scn_relocs + m_scn-&gt;num_relocs,</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> [&amp;](coff::reloc_t reloc) {</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> return reloc.virtual_address &gt;= m_sym-&gt;value + offset &amp;&amp;</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> reloc.virtual_address &lt;</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> m_sym-&gt;value + offset +</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> xed_decoded_inst_get_length(&amp;instr);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> });</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <span class="comment">// if there is indeed a reloc for this instruction...</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="comment">//</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keywordflow">if</span> (reloc != scn_relocs + m_scn-&gt;num_relocs) {</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keyword">auto</span> sym_reloc = m_img-&gt;get_symbol(reloc-&gt;symbol_index);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> <span class="keyword">auto</span> sym_name = <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">symbol_t::name</a>(m_img, sym_reloc);</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keyword">auto</span> sym_hash = <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">decomp::symbol_t::hash</a>(sym_name.data());</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> <span class="keyword">auto</span> reloc_offset = reloc-&gt;virtual_address - m_sym-&gt;value - offset;</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> relocs.push_back(</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> <a class="code hl_class" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html" title="meta data about a relocation for a symbol">recomp::reloc_t</a>(reloc_offset, sym_hash, sym_name.data()));</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> }</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> <span class="comment">// add a reloc to the next instruction...</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="comment">// note that the offset is ZERO... comp_t will understand that</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> <span class="comment">// relocs with offset ZERO means the next instructions...</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="comment">//</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <span class="keyword">auto</span> next_inst_sym =</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">symbol_t::name</a>(m_img, m_sym)</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> .append(<span class="stringliteral">&quot;@&quot;</span>)</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> .append(std::to_string(offset +</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> xed_decoded_inst_get_length(&amp;instr)));</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> relocs.push_back(<a class="code hl_class" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html" title="meta data about a relocation for a symbol">recomp::reloc_t</a>(</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> 0, <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">decomp::symbol_t::hash</a>(next_inst_sym), next_inst_sym.data()));</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> </div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> <span class="comment">// get the instructions bytes</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> <span class="comment">//</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span> std::vector&lt;std::uint8_t&gt; inst_bytes(</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span> m_data.data() + offset,</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> m_data.data() + offset + xed_decoded_inst_get_length(&amp;instr));</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> result.push_back(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>(m_img, new_sym_name, offset,</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span> inst_bytes, m_scn, m_sym, relocs,</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9">sym_type_t::instruction</a>));</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="comment">// after creating the symbol and dealing with relocs then print the</span></div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="comment">// information we have concluded...</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span> <span class="comment">//</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> <span class="keywordtype">char</span> buff[255];</div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span> offset += xed_decoded_inst_get_length(&amp;instr);</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> xed_format_context(XED_SYNTAX_INTEL, &amp;instr, buff, <span class="keyword">sizeof</span> buff, NULL,</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span> NULL, NULL);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> spdlog::info(<span class="stringliteral">&quot;{}: {}&quot;</span>, new_sym_name, buff);</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <span class="comment">// need to set this so that instr can be used to decode again...</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> xed_decoded_inst_zero_set_mode(&amp;instr, &amp;istate);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> }</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="comment">// remove the relocation to the next symbol from the last instruction</span></div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="comment">//</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <span class="keyword">auto</span>&amp; last_inst = result.back();</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> <span class="keyword">auto</span>&amp; last_inst_relocs = last_inst.relocs();</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> last_inst_relocs.erase(last_inst_relocs.end() - 1);</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> }</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> }</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> </div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> <span class="keywordflow">return</span> result;</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span>}</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> </div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#ad3a75cb97abbcd9b282772401b256f36"> 168</a></span>coff::section_header_t* <a class="code hl_function" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#ad3a75cb97abbcd9b282772401b256f36" title="gets the section header of the section in which the symbol is located in.">routine_t::scn</a>() {</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> <span class="keywordflow">return</span> m_scn;</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span>}</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> </div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#a605a2be669a10a5a45325a5dca04401a"> 172</a></span>std::vector&lt;std::uint8_t&gt; <a class="code hl_function" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html#a605a2be669a10a5a45325a5dca04401a" title="gets the function bytes.">routine_t::data</a>() {</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="keywordflow">return</span> m_data;</div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span>}</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span>} <span class="comment">// namespace theo::decomp</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,91 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../da/dbd/namespacetheo_1_1recomp.html">recomp</a></li><li class="navelem"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">symbol_table_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::recomp::symbol_table_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d">for_each</a>(std::function&lt; void(decomp::symbol_t &amp;sym)&gt; fn)</td><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af9caf2d4d97b2498aa624c3750a7a601">put_symbol</a>(decomp::symbol_t &amp;sym)</td><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ae7c35d9336f67d3175910c028e0b9b3e">put_symbols</a>(std::vector&lt; decomp::symbol_t &gt; &amp;syms)</td><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af57c0495a442ea86af0f9cca4521631e">size</a>()</td><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#abaea9fd899d87b09d60c2b815624e2d2">sym_from_alloc</a>(std::uintptr_t allocated_at)</td><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a308c0dbcc4d569467e0986b32ef30db5">sym_from_hash</a>(std::size_t hash)</td><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ad06d4004c0cb454b1ffe7e2ae2ccedf5">symbol_table_t</a>()</td><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#ab7dfbb8369463ce3d74ad656115cf4d5">symbol_table_t</a>(const std::vector&lt; decomp::symbol_t &gt; &amp;&amp;syms)</td><td class="entry"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">theo::recomp::symbol_table_t</a></td><td class="entry"></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,102 +0,0 @@
<!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: include/obf/passes/jcc_rewrite_pass.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_13fb3109ea9f625158dab961edf6214d.html">passes</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">jcc_rewrite_pass.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d8/d5a/pass_8hpp_source.html">obf/pass.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d2/df9/jcc__rewrite__pass_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">theo::obf::jcc_rewrite_pass_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">jcc rewrite pass which rewrites rip relative jcc's so that they are position independent. <a href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,148 +0,0 @@
<!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: include/obf/passes/jcc_rewrite_pass.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_13fb3109ea9f625158dab961edf6214d.html">passes</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">jcc_rewrite_pass.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d2/df9/jcc__rewrite__pass_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d8/d5a/pass_8hpp.html">obf/pass.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d5/da8/namespacetheo_1_1obf.html" title="this is the main namespace for obfuscation related things.">theo::obf</a> {<span class="comment"></span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="comment">/// jcc rewrite pass which rewrites rip relative jcc&#39;s so that they are position</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">/// independent.</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">///</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">/// given the following code:</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">///</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">/// jnz label1</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">/// ; other code goes here</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">/// label1:</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">/// ; more code here</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment">///</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">/// the jnz instruction will be rewritten so that the following code is</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">/// generated:</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">///</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment">/// jnz br2</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment">/// br1:</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">/// jmp [rip] ; address after this instruction contains the address</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/// ; of the instruction after the jcc.</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">/// br2:</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">/// jmp [rip] ; address after this instruction contains the address of where</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment">/// ; branch 2 is located.</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment">///</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment">/// its important to note that other passes will encrypt (transform) the address</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">/// of the next instruction. There is actually no jmp [rip] either, push/ret is</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">/// used.</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html"> 61</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html" title="jcc rewrite pass which rewrites rip relative jcc&#39;s so that they are position independent.">jcc_rewrite_pass_t</a> : <span class="keyword">public</span> <a class="code hl_class" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">explicit</span> <a class="code hl_class" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html" title="jcc rewrite pass which rewrites rip relative jcc&#39;s so that they are position independent.">jcc_rewrite_pass_t</a>() : <a class="code hl_function" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611" title="the explicit constructor of the pass_t base class.">pass_t</a>(<a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9">decomp::sym_type_t::instruction</a>) {}</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">static</span> <a class="code hl_class" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html" title="jcc rewrite pass which rewrites rip relative jcc&#39;s so that they are position independent.">jcc_rewrite_pass_t</a>* <a class="code hl_function" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#afc17278f751fe3f5868c988faffb3c92">get</a>();</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#a5a93eb0945025ef3caefed8c63b65b23" title="virtual method which must be implimented by the pass that inherits this class.">run</a>(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>* sym);</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span>};</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>} <span class="comment">// namespace theo::obf</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,89 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="headertitle"><div class="title">theo::obf::transform::operation_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aed18bfd26da1a198f3b5f81525bcbb66">get_transform</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a91f9b94436d49659aaabb291786b3c7b">inverse</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><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><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4">operation_t</a>(transform_t op, xed_iclass_enum_t type)</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><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><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f">type</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,90 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../da/dbd/namespacetheo_1_1recomp.html">recomp</a></li><li class="navelem"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">reloc_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::recomp::reloc_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#ab5214a9ff9135672e25f40406c37fb10">add_transform</a>(std::pair&lt; obf::transform::transform_t *, std::uint32_t &gt; entry)</td><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#af8abfa7a4f1052308a233629faf39a78">get_transforms</a>()</td><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#aa340b2c2d5d1ac7f96a1dbee39f25461">hash</a>()</td><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#aa181755df50bc566b164072b21788fec">name</a>()</td><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a537836fcea3326e4269375a1486f0323">offset</a>()</td><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a99e65270ace1ff4f080bd4040c8a43dd">offset</a>(std::uint32_t offset)</td><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#a7cb1cf1c58a6f3cdf7ae326d65948548">reloc_t</a>(std::uint32_t offset, std::size_t hash, const std::string &amp;&amp;sym_name)</td><td class="entry"><a class="el" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html">theo::recomp::reloc_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,87 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html">reloc_transform_pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::reloc_transform_pass_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html">theo::obf::reloc_transform_pass_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html#a89aa46da5f721057cd8cf5189207d464">get</a>()</td><td class="entry"><a class="el" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html">theo::obf::reloc_transform_pass_t</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a>(decomp::sym_type_t sym_type)</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html#a24e122f6be18a88ea1809252ab3ec0b9">run</a>(decomp::symbol_t *sym)</td><td class="entry"><a class="el" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html">theo::obf::reloc_transform_pass_t</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>()</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,87 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">next_inst_pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::next_inst_pass_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">theo::obf::next_inst_pass_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#a964e6f5291ccba0442519f2563b3a2e9">get</a>()</td><td class="entry"><a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">theo::obf::next_inst_pass_t</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a>(decomp::sym_type_t sym_type)</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#ae4cbba78b14c2b9da794386e4d92f40f">run</a>(decomp::symbol_t *sym)</td><td class="entry"><a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">theo::obf::next_inst_pass_t</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>()</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,117 +0,0 @@
<!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: include/recomp/recomp.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_d92462d752f7a277bbc0245a347b2579.html">recomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle"><div class="title">recomp.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d2/d96/decomp_8hpp_source.html">decomp/decomp.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../de/d46/engine_8hpp_source.html">obf/engine.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d0/d5e/symbol__table_8hpp_source.html">recomp/symbol_table.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d4/d4a/recomp_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html">theo::recomp::recomp_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">the main class responsible for recomposition <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:da/dbd/namespacetheo_1_1recomp"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html">theo::recomp</a></td></tr>
<tr class="memdesc:da/dbd/namespacetheo_1_1recomp"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses all recomposition related code. <br /></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 id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a7364f8c94855a2a871a9d6e1057989f3"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3">theo::recomp::resolver_t</a> = std::function&lt; std::uintptr_t(std::string)&gt;</td></tr>
<tr class="memdesc:a7364f8c94855a2a871a9d6e1057989f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">a function which is called by <a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html" title="the main class responsible for recomposition">recomp_t</a> to resolve external symbols <a href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3">More...</a><br /></td></tr>
<tr class="separator:a7364f8c94855a2a871a9d6e1057989f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a604e81450773453df676c3b573651adc"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc">theo::recomp::copier_t</a> = std::function&lt; void(std::uintptr_t, void *, std::uint32_t)&gt;</td></tr>
<tr class="memdesc:a604e81450773453df676c3b573651adc"><td class="mdescLeft">&#160;</td><td class="mdescRight">a function which is called by <a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html" title="the main class responsible for recomposition">recomp_t</a> to copy symbols into memory. <a href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc">More...</a><br /></td></tr>
<tr class="separator:a604e81450773453df676c3b573651adc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96995cb0c5291dce945760c3d8f55241"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241">theo::recomp::allocator_t</a> = std::function&lt; std::uintptr_t(std::uint32_t, coff::section_characteristics_t)&gt;</td></tr>
<tr class="memdesc:a96995cb0c5291dce945760c3d8f55241"><td class="mdescLeft">&#160;</td><td class="mdescRight">a function which is called to allocate space for a symbol. <a href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241">More...</a><br /></td></tr>
<tr class="separator:a96995cb0c5291dce945760c3d8f55241"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,207 +0,0 @@
<!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: include/recomp/recomp.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_d92462d752f7a277bbc0245a347b2579.html">recomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">recomp.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d4/d4a/recomp_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d2/d96/decomp_8hpp.html">decomp/decomp.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;<a class="code" href="../../de/d46/engine_8hpp.html">obf/engine.hpp</a>&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;<a class="code" href="../../d0/d5e/symbol__table_8hpp.html">recomp/symbol_table.hpp</a>&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="comment"></span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">/// this namespace encompasses all recomposition related code.</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="../../da/dbd/namespacetheo_1_1recomp.html"> 39</a></span><span class="comment"></span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../da/dbd/namespacetheo_1_1recomp.html" title="this namespace encompasses all recomposition related code.">theo::recomp</a> {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment"></span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">/// a function which is called by recomp_t to resolve external symbols</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3"> 44</a></span><span class="comment"></span><span class="keyword">using</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3" title="a function which is called by recomp_t to resolve external symbols">resolver_t</a> = <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">std::function</a>&lt;std::uintptr_t(std::string)&gt;;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment"></span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">/// a function which is called by recomp_t to copy symbols into memory.</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc"> 49</a></span><span class="comment"></span><span class="keyword">using</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc" title="a function which is called by recomp_t to copy symbols into memory.">copier_t</a> = <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">std::function</a>&lt;void(std::uintptr_t, <span class="keywordtype">void</span>*, std::uint32_t)&gt;;</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment"></span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/// a function which is called to allocate space for a symbol.</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">///</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">/// the first param is the size of the symbol, the second param is the</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment">/// characteristics of the section which the symbol is allocated in.</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241"> 57</a></span><span class="comment"></span><span class="keyword">using</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241" title="a function which is called to allocate space for a symbol.">allocator_t</a> =</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">std::function</a>&lt;std::uintptr_t(std::uint32_t,</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> coff::section_characteristics_t)&gt;;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment"></span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment">/// the main class responsible for recomposition</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html"> 64</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html" title="the main class responsible for recomposition">recomp_t</a> {</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keyword">public</span>:<span class="comment"></span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment"> /// the explicit constructor for the recomp_t class.</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment"> /// &lt;param name=&quot;dcmp&quot;&gt;pointer to a decomp_t class.&lt;/param&gt;</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="comment"> /// &lt;param name=&quot;alloc&quot;&gt;lambda function which is used to allocate memory for</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment"> /// symbols.&lt;/param&gt; &lt;param name=&quot;copy&quot;&gt;lambda function used to copy bytes</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// into allocations.&lt;/param&gt; &lt;param name=&quot;resolve&quot;&gt;lambda function used to</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> /// resolve external symbols.&lt;/param&gt;</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#ac5f04297153c2e445330e5cc103e8589" title="the explicit constructor for the recomp_t class.">recomp_t</a>(<a class="code hl_class" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html" title="the main decomposition class which is responsible for breaking down lib file into coff files,...">decomp::decomp_t</a>* dcmp,</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241" title="a function which is called to allocate space for a symbol.">allocator_t</a> alloc,</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc" title="a function which is called by recomp_t to copy symbols into memory.">copier_t</a> copy,</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3" title="a function which is called by recomp_t to resolve external symbols">resolver_t</a> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094" title="when called, this function resolves all relocations in every symbol.">resolve</a>);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="comment"></span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="comment"> /// when called, this function allocates space for every symbol.</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a78502665e218d3addca9b1e5e3875f39" title="when called, this function allocates space for every symbol.">allocate</a>();</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="comment"></span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="comment"> /// when called, this function resolves all relocations in every symbol.</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094" title="when called, this function resolves all relocations in every symbol.">resolve</a>();</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"></span> </div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment"> /// when called, this function copies symbols into allocations.</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a080d88f122d12faf2e328c9bdd10be6e" title="when called, this function copies symbols into allocations.">copy_syms</a>();</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="comment"></span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="comment"> /// setter for the allocater lambda function.</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="comment"> /// &lt;param name=&quot;alloc&quot;&gt;lambda function which allocates memory for</span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> /// symbols.&lt;/param&gt;</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a0da9a904b0057c14190218592aff0f07" title="setter for the allocater lambda function.">allocator</a>(<a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241" title="a function which is called to allocate space for a symbol.">allocator_t</a> alloc);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"></span> </div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"> /// setter for the copier lambda function.</span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment"> /// &lt;param name=&quot;copy&quot;&gt;copier lambda function used to copy bytes into</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="comment"> /// allocations made by the allocator.&lt;/param&gt;</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#aa6fecf752d4c5bc211e164d8496724b1" title="setter for the copier lambda function.">copier</a>(<a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc" title="a function which is called by recomp_t to copy symbols into memory.">copier_t</a> copy);</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="comment"></span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment"> /// setter for the resolve lambda function.</span></div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="comment"> /// &lt;param name=&quot;resolve&quot;&gt;lambda function to resolve external symbols.&lt;/param&gt;</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a1be6d0cdb57565c31b138248c8b2d470" title="setter for the resolve lambda function.">resolver</a>(<a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3" title="a function which is called by recomp_t to resolve external symbols">resolver_t</a> <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094" title="when called, this function resolves all relocations in every symbol.">resolve</a>);</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="comment"></span> </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="comment"> /// resolves the address of a function given its name.</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="comment"> /// &lt;param name=&quot;sym&quot;&gt;the name of the symbol to resolve the location</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="comment"> /// of.&lt;/param&gt; &lt;returns&gt;the address of the symbol.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="comment"></span> std::uintptr_t <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094" title="when called, this function resolves all relocations in every symbol.">resolve</a>(<span class="keyword">const</span> std::string&amp;&amp; sym);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> <a class="code hl_class" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html" title="the main decomposition class which is responsible for breaking down lib file into coff files,...">decomp::decomp_t</a>* m_dcmp;</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3" title="a function which is called by recomp_t to resolve external symbols">resolver_t</a> m_resolver;</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc" title="a function which is called by recomp_t to copy symbols into memory.">copier_t</a> m_copier;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span> <a class="code hl_typedef" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241" title="a function which is called to allocate space for a symbol.">allocator_t</a> m_allocator;</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>};</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span>} <span class="comment">// namespace theo::recomp</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,90 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d9/dbd/namespacetheo_1_1decomp.html">decomp</a></li><li class="navelem"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">decomp_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::decomp::decomp_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a35cfac16bd918d576b29e04388690d68">decomp_t</a>(std::vector&lt; std::uint8_t &gt; &amp;lib, recomp::symbol_table_t *syms)</td><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a></td><td class="entry"><span class="mlabel">explicit</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#ae23353a4293aa30969b6d3fa37359469">decompose</a>(std::string &amp;entry_sym)</td><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2">lib</a>()</td><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a81ae70b313a9ef24ea5d8f404699baef">objs</a>()</td><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a79c965ec0a996a936faae7f54b0e055e">rtns</a>()</td><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a860dddc3a5d12231b685dbaa12a0db06">scn_hash_tbl</a>()</td><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120">syms</a>()</td><td class="entry"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">theo::decomp::decomp_t</a></td><td class="entry"></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,226 +0,0 @@
<!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::pass_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">&#160;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&amp;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&amp;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="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::obf::pass_t Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">
<p>the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> class is a base clase for all passes made. you must override the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1" title="virtual method which must be implimented by the pass that inherits this class.">pass_t::run</a> virtual function and declare the logic of your pass there.
<a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#details">More...</a></p>
<p><code>#include &quot;<a class="el" href="../../d8/d5a/pass_8hpp_source.html">pass.hpp</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for theo::obf::pass_t:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d4/dad/classtheo_1_1obf_1_1pass__t.png" usemap="#theo::obf::pass_5Ft_map" alt=""/>
<map id="theo::obf::pass_5Ft_map" name="theo::obf::pass_5Ft_map">
<area href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html" title="hello world pass example of how to inherit pass_t." alt="theo::obf::hello_world_pass_t" shape="rect" coords="0,56,198,80"/>
<area href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html" title="jcc rewrite pass which rewrites rip relative jcc&#39;s so that they are position independent." alt="theo::obf::jcc_rewrite_pass_t" shape="rect" coords="208,56,406,80"/>
<area href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html" title="This pass is used to generate transformations and jmp code to change RIP to the next instruction." alt="theo::obf::next_inst_pass_t" shape="rect" coords="416,56,614,80"/>
<area href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html" title="this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead..." alt="theo::obf::reloc_transform_pass_t" shape="rect" coords="624,56,822,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:abd4ab22cc2822b968267be7f8397d611"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a> (<a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a> <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>)</td></tr>
<tr class="memdesc:abd4ab22cc2822b968267be7f8397d611"><td class="mdescLeft">&#160;</td><td class="mdescRight">the explicit constructor of the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> base class. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">More...</a><br /></td></tr>
<tr class="separator:abd4ab22cc2822b968267be7f8397d611"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfadc013ff0754d66a18baffdb1a61d1"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">run</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *sym)=0</td></tr>
<tr class="memdesc:acfadc013ff0754d66a18baffdb1a61d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual method which must be implimented by the pass that inherits this class. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">More...</a><br /></td></tr>
<tr class="separator:acfadc013ff0754d66a18baffdb1a61d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46608a6c2dfb8ff657e44be9b50e0dfb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a> ()</td></tr>
<tr class="memdesc:a46608a6c2dfb8ff657e44be9b50e0dfb"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the passes symbol type. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">More...</a><br /></td></tr>
<tr class="separator:a46608a6c2dfb8ff657e44be9b50e0dfb"><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 >the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> class is a base clase for all passes made. you must override the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1" title="virtual method which must be implimented by the pass that inherits this class.">pass_t::run</a> virtual function and declare the logic of your pass there. </p>
<p >in the constructor of your pass you must call the super constructor (the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> constructor) and pass it the type of symbol which you are interesting in receiving. </p>
<p class="definition">Definition at line <a class="el" href="../../d8/d5a/pass_8hpp_source.html#l00055">55</a> of file <a class="el" href="../../d8/d5a/pass_8hpp_source.html">pass.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="abd4ab22cc2822b968267be7f8397d611" name="abd4ab22cc2822b968267be7f8397d611"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd4ab22cc2822b968267be7f8397d611">&#9670;&nbsp;</a></span>pass_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::pass_t::pass_t </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a>&#160;</td>
<td class="paramname"><em>sym_type</em></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>the explicit constructor of the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> base class. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sym_type</td><td>the type of symbol in which the pass will run on. every symbol passed to the virtual "run" instruction will be of this type.</td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../d8/d5a/pass_8hpp_source.html#l00063">63</a> of file <a class="el" href="../../d8/d5a/pass_8hpp_source.html">pass.hpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 63</span>: m_sym_type(<a class="code hl_function" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb" title="gets the passes symbol type.">sym_type</a>){};</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="acfadc013ff0754d66a18baffdb1a61d1" name="acfadc013ff0754d66a18baffdb1a61d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfadc013ff0754d66a18baffdb1a61d1">&#9670;&nbsp;</a></span>run()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void theo::obf::pass_t::run </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *&#160;</td>
<td class="paramname"><em>sym</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>virtual method which must be implimented by the pass that inherits this class. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sym</td><td>a symbol of the same type of m_sym_type.</td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html#a0d2d95f93ac083e157b2f12a8a56f1df">theo::obf::hello_world_pass_t</a>, <a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#a5a93eb0945025ef3caefed8c63b65b23">theo::obf::jcc_rewrite_pass_t</a>, <a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#ae4cbba78b14c2b9da794386e4d92f40f">theo::obf::next_inst_pass_t</a>, and <a class="el" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html#a24e122f6be18a88ea1809252ab3ec0b9">theo::obf::reloc_transform_pass_t</a>.</p>
</div>
</div>
<a id="a46608a6c2dfb8ff657e44be9b50e0dfb" name="a46608a6c2dfb8ff657e44be9b50e0dfb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46608a6c2dfb8ff657e44be9b50e0dfb">&#9670;&nbsp;</a></span>sym_type()</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="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a> theo::obf::pass_t::sym_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 passes symbol type. </p>
<dl class="section return"><dt>Returns</dt><dd>the passes symbol type.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../d8/d5a/pass_8hpp_source.html#l00076">76</a> of file <a class="el" href="../../d8/d5a/pass_8hpp_source.html">pass.hpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 76</span>{ <span class="keywordflow">return</span> m_sym_type; }</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/obf/<a class="el" href="../../d8/d5a/pass_8hpp_source.html">pass.hpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

@ -1,510 +0,0 @@
<!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::recomp::recomp_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">&#160;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&amp;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&amp;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="../../da/dbd/namespacetheo_1_1recomp.html">recomp</a></li><li class="navelem"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html">recomp_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::recomp::recomp_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>the main class responsible for recomposition
<a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#details">More...</a></p>
<p><code>#include &quot;<a class="el" href="../../d4/d4a/recomp_8hpp_source.html">recomp.hpp</a>&quot;</code></p>
<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:ac5f04297153c2e445330e5cc103e8589"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#ac5f04297153c2e445330e5cc103e8589">recomp_t</a> (<a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">decomp::decomp_t</a> *dcmp, <a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241">allocator_t</a> alloc, <a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc">copier_t</a> copy, <a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3">resolver_t</a> <a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094">resolve</a>)</td></tr>
<tr class="memdesc:ac5f04297153c2e445330e5cc103e8589"><td class="mdescLeft">&#160;</td><td class="mdescRight">the explicit constructor for the <a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html" title="the main class responsible for recomposition">recomp_t</a> class. <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#ac5f04297153c2e445330e5cc103e8589">More...</a><br /></td></tr>
<tr class="separator:ac5f04297153c2e445330e5cc103e8589"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78502665e218d3addca9b1e5e3875f39"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a78502665e218d3addca9b1e5e3875f39">allocate</a> ()</td></tr>
<tr class="memdesc:a78502665e218d3addca9b1e5e3875f39"><td class="mdescLeft">&#160;</td><td class="mdescRight">when called, this function allocates space for every symbol. <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a78502665e218d3addca9b1e5e3875f39">More...</a><br /></td></tr>
<tr class="separator:a78502665e218d3addca9b1e5e3875f39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a299fbede378f04991df2e39293307094"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094">resolve</a> ()</td></tr>
<tr class="memdesc:a299fbede378f04991df2e39293307094"><td class="mdescLeft">&#160;</td><td class="mdescRight">when called, this function resolves all relocations in every symbol. <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094">More...</a><br /></td></tr>
<tr class="separator:a299fbede378f04991df2e39293307094"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a080d88f122d12faf2e328c9bdd10be6e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a080d88f122d12faf2e328c9bdd10be6e">copy_syms</a> ()</td></tr>
<tr class="memdesc:a080d88f122d12faf2e328c9bdd10be6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">when called, this function copies symbols into allocations. <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a080d88f122d12faf2e328c9bdd10be6e">More...</a><br /></td></tr>
<tr class="separator:a080d88f122d12faf2e328c9bdd10be6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0da9a904b0057c14190218592aff0f07"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a0da9a904b0057c14190218592aff0f07">allocator</a> (<a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241">allocator_t</a> alloc)</td></tr>
<tr class="memdesc:a0da9a904b0057c14190218592aff0f07"><td class="mdescLeft">&#160;</td><td class="mdescRight">setter for the allocater lambda function. <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a0da9a904b0057c14190218592aff0f07">More...</a><br /></td></tr>
<tr class="separator:a0da9a904b0057c14190218592aff0f07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6fecf752d4c5bc211e164d8496724b1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#aa6fecf752d4c5bc211e164d8496724b1">copier</a> (<a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc">copier_t</a> copy)</td></tr>
<tr class="memdesc:aa6fecf752d4c5bc211e164d8496724b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">setter for the copier lambda function. <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#aa6fecf752d4c5bc211e164d8496724b1">More...</a><br /></td></tr>
<tr class="separator:aa6fecf752d4c5bc211e164d8496724b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1be6d0cdb57565c31b138248c8b2d470"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a1be6d0cdb57565c31b138248c8b2d470">resolver</a> (<a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3">resolver_t</a> <a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094">resolve</a>)</td></tr>
<tr class="memdesc:a1be6d0cdb57565c31b138248c8b2d470"><td class="mdescLeft">&#160;</td><td class="mdescRight">setter for the resolve lambda function. <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a1be6d0cdb57565c31b138248c8b2d470">More...</a><br /></td></tr>
<tr class="separator:a1be6d0cdb57565c31b138248c8b2d470"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0c56f0f8af33b390e4123509523602c"><td class="memItemLeft" align="right" valign="top">std::uintptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#ae0c56f0f8af33b390e4123509523602c">resolve</a> (const std::string &amp;&amp;sym)</td></tr>
<tr class="memdesc:ae0c56f0f8af33b390e4123509523602c"><td class="mdescLeft">&#160;</td><td class="mdescRight">resolves the address of a function given its name. <a href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#ae0c56f0f8af33b390e4123509523602c">More...</a><br /></td></tr>
<tr class="separator:ae0c56f0f8af33b390e4123509523602c"><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 >the main class responsible for recomposition </p>
<p class="definition">Definition at line <a class="el" href="../../d4/d4a/recomp_8hpp_source.html#l00064">64</a> of file <a class="el" href="../../d4/d4a/recomp_8hpp_source.html">recomp.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac5f04297153c2e445330e5cc103e8589" name="ac5f04297153c2e445330e5cc103e8589"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5f04297153c2e445330e5cc103e8589">&#9670;&nbsp;</a></span>recomp_t()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">theo::recomp::recomp_t::recomp_t </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">decomp::decomp_t</a> *&#160;</td>
<td class="paramname"><em>dcmp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241">allocator_t</a>&#160;</td>
<td class="paramname"><em>alloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc">copier_t</a>&#160;</td>
<td class="paramname"><em>copy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3">resolver_t</a>&#160;</td>
<td class="paramname"><em>resolve</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">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>the explicit constructor for the <a class="el" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html" title="the main class responsible for recomposition">recomp_t</a> class. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">dcmp</td><td>pointer to a decomp_t class.</td></tr>
<tr><td class="paramname">alloc</td><td>lambda function which is used to allocate memory for symbols.</td></tr>
<tr><td class="paramname">copy</td><td>lambda function used to copy bytes into allocations.</td></tr>
<tr><td class="paramname">resolve</td><td>lambda function used to resolve external symbols.</td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00034">34</a> of file <a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 38</span> : m_dcmp(dcmp), m_allocator(alloc), m_copier(copy), m_resolver(<a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094" title="when called, this function resolves all relocations in every symbol.">resolve</a>) {}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a78502665e218d3addca9b1e5e3875f39" name="a78502665e218d3addca9b1e5e3875f39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78502665e218d3addca9b1e5e3875f39">&#9670;&nbsp;</a></span>allocate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void theo::recomp::recomp_t::allocate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>when called, this function allocates space for every symbol. </p>
<p class="definition">Definition at line <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00040">40</a> of file <a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 40</span> {</div>
<div class="line"><span class="lineno"> 41</span> <span class="comment">// map code &amp; data/rdata/bss sections first...</span></div>
<div class="line"><span class="lineno"> 42</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 43</span> m_dcmp-&gt;<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>()-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d" title="this function is a wrapper function that allows you to get at each entry in the symbol table by refer...">for_each</a>([&amp;](<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">theo::decomp::symbol_t</a>&amp; sym) {</div>
<div class="line"><span class="lineno"> 44</span> <span class="keywordflow">switch</span> (sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a16587cddd37cd45d9ec6cd25c229e8d1" title="returns the type of the symbol.">type</a>()) {</div>
<div class="line"><span class="lineno"> 45</span> case decomp::sym_type_t::section:</div>
<div class="line"><span class="lineno"> 46</span> case decomp::sym_type_t::function:</div>
<div class="line"><span class="lineno"> 47</span> case decomp::sym_type_t::instruction: {</div>
<div class="line"><span class="lineno"> 48</span> sym.allocated_at(m_allocator(sym.size(), sym.scn()-&gt;characteristics));</div>
<div class="line"><span class="lineno"> 49</span> break;</div>
<div class="line"><span class="lineno"> 50</span> }</div>
<div class="line"><span class="lineno"> 51</span> <span class="keywordflow">default</span>:</div>
<div class="line"><span class="lineno"> 52</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 53</span> }</div>
<div class="line"><span class="lineno"> 54</span> });</div>
<div class="line"><span class="lineno"> 55</span> </div>
<div class="line"><span class="lineno"> 56</span> <span class="comment">// then map data/rdata/bss symbols to the allocated sections...</span></div>
<div class="line"><span class="lineno"> 57</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 58</span> m_dcmp-&gt;<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>()-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d" title="this function is a wrapper function that allows you to get at each entry in the symbol table by refer...">for_each</a>([&amp;](<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">theo::decomp::symbol_t</a>&amp; sym) {</div>
<div class="line"><span class="lineno"> 59</span> <span class="keywordflow">if</span> (sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a16587cddd37cd45d9ec6cd25c229e8d1" title="returns the type of the symbol.">type</a>() == <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">decomp::sym_type_t::data</a>) {</div>
<div class="line"><span class="lineno"> 60</span> <span class="comment">// if the symbol has a section then we will refer to the allocation made</span></div>
<div class="line"><span class="lineno"> 61</span> <span class="comment">// for that section...</span></div>
<div class="line"><span class="lineno"> 62</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 63</span> if (sym.scn()) {</div>
<div class="line"><span class="lineno"> 64</span> auto scn_sym =</div>
<div class="line"><span class="lineno"> 65</span> m_dcmp-&gt;syms()-&gt;sym_from_hash(m_dcmp-&gt;scn_hash_tbl()[sym.scn()]);</div>
<div class="line"><span class="lineno"> 66</span> </div>
<div class="line"><span class="lineno"> 67</span> if (!scn_sym.has_value()) {</div>
<div class="line"><span class="lineno"> 68</span> spdlog::error(<span class="stringliteral">&quot;failed to locate section: {} for symbol: {}&quot;</span>,</div>
<div class="line"><span class="lineno"> 69</span> sym.scn()-&gt;name.to_string(), sym.name());</div>
<div class="line"><span class="lineno"> 70</span> </div>
<div class="line"><span class="lineno"> 71</span> assert(scn_sym.has_value());</div>
<div class="line"><span class="lineno"> 72</span> }</div>
<div class="line"><span class="lineno"> 73</span> </div>
<div class="line"><span class="lineno"> 74</span> sym.allocated_at(scn_sym.value()-&gt;allocated_at() + sym.offset());</div>
<div class="line"><span class="lineno"> 75</span> } <span class="keywordflow">else</span> { <span class="comment">// else if there is no section then we allocate based upon the</span></div>
<div class="line"><span class="lineno"> 76</span> <span class="comment">// size of the symbol... this is only done for symbols that are</span></div>
<div class="line"><span class="lineno"> 77</span> <span class="comment">// bss...</span></div>
<div class="line"><span class="lineno"> 78</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 79</span> </div>
<div class="line"><span class="lineno"> 80</span> <span class="comment">// bss is read write...</span></div>
<div class="line"><span class="lineno"> 81</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 82</span> coff::section_characteristics_t prot = {};</div>
<div class="line"><span class="lineno"> 83</span> prot.mem_read = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 84</span> prot.mem_write = <span class="keyword">true</span>;</div>
<div class="line"><span class="lineno"> 85</span> </div>
<div class="line"><span class="lineno"> 86</span> sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47" title="returns the address where the symbol is allocated.">allocated_at</a>(m_allocator(sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae33f1452b01fe80f9c384241b9fe6286" title="returns the size of the symbol.">size</a>(), sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd" title="gets the section header of the section in which the symbol is contained.">scn</a>()-&gt;characteristics));</div>
<div class="line"><span class="lineno"> 87</span> }</div>
<div class="line"><span class="lineno"> 88</span> }</div>
<div class="line"><span class="lineno"> 89</span> });</div>
<div class="line"><span class="lineno"> 90</span>}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../da/d0c/symbol__table_8cpp_source.html#l00049">theo::recomp::symbol_table_t::for_each()</a>, <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00293">theo::decomp::decomp_t::syms()</a>, and <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00080">theo::decomp::symbol_t::type()</a>.</p>
<p class="reference">Referenced by <a class="el" href="../../d2/d26/theo_8cpp_source.html#l00056">theo::theo_t::compose()</a>.</p>
</div>
</div>
<a id="a0da9a904b0057c14190218592aff0f07" name="a0da9a904b0057c14190218592aff0f07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0da9a904b0057c14190218592aff0f07">&#9670;&nbsp;</a></span>allocator()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void theo::recomp::recomp_t::allocator </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a96995cb0c5291dce945760c3d8f55241">allocator_t</a>&#160;</td>
<td class="paramname"><em>alloc</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>setter for the allocater lambda function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">alloc</td><td>lambda function which allocates memory for symbols.</td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00163">163</a> of file <a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 163</span> {</div>
<div class="line"><span class="lineno"> 164</span> m_allocator = alloc;</div>
<div class="line"><span class="lineno"> 165</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="aa6fecf752d4c5bc211e164d8496724b1" name="aa6fecf752d4c5bc211e164d8496724b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6fecf752d4c5bc211e164d8496724b1">&#9670;&nbsp;</a></span>copier()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void theo::recomp::recomp_t::copier </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a604e81450773453df676c3b573651adc">copier_t</a>&#160;</td>
<td class="paramname"><em>copy</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>setter for the copier lambda function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">copy</td><td>copier lambda function used to copy bytes into allocations made by the allocator.</td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00167">167</a> of file <a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 167</span> {</div>
<div class="line"><span class="lineno"> 168</span> m_copier = copy;</div>
<div class="line"><span class="lineno"> 169</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a080d88f122d12faf2e328c9bdd10be6e" name="a080d88f122d12faf2e328c9bdd10be6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a080d88f122d12faf2e328c9bdd10be6e">&#9670;&nbsp;</a></span>copy_syms()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void theo::recomp::recomp_t::copy_syms </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>when called, this function copies symbols into allocations. </p>
<p class="definition">Definition at line <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00155">155</a> of file <a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 155</span> {</div>
<div class="line"><span class="lineno"> 156</span> <span class="comment">// copy symbols into memory using the copier supplied...</span></div>
<div class="line"><span class="lineno"> 157</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 158</span> m_dcmp-&gt;<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>()-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d" title="this function is a wrapper function that allows you to get at each entry in the symbol table by refer...">for_each</a>([&amp;](<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">theo::decomp::symbol_t</a>&amp; sym) {</div>
<div class="line"><span class="lineno"> 159</span> m_copier(sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47" title="returns the address where the symbol is allocated.">allocated_at</a>(), sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>().data(), sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>().size());</div>
<div class="line"><span class="lineno"> 160</span> });</div>
<div class="line"><span class="lineno"> 161</span>}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00060">theo::decomp::symbol_t::allocated_at()</a>, and <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00076">theo::decomp::symbol_t::data()</a>.</p>
<p class="reference">Referenced by <a class="el" href="../../d2/d26/theo_8cpp_source.html#l00056">theo::theo_t::compose()</a>.</p>
</div>
</div>
<a id="a299fbede378f04991df2e39293307094" name="a299fbede378f04991df2e39293307094"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a299fbede378f04991df2e39293307094">&#9670;&nbsp;</a></span>resolve() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void theo::recomp::recomp_t::resolve </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>when called, this function resolves all relocations in every symbol. </p>
<p class="definition">Definition at line <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00092">92</a> of file <a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 92</span> {</div>
<div class="line"><span class="lineno"> 93</span> <span class="comment">// resolve relocations in all symbols...</span></div>
<div class="line"><span class="lineno"> 94</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 95</span> m_dcmp-&gt;<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>()-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a35008ba37814a94209cf979302e13e6d" title="this function is a wrapper function that allows you to get at each entry in the symbol table by refer...">for_each</a>([&amp;](<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">theo::decomp::symbol_t</a>&amp; sym) {</div>
<div class="line"><span class="lineno"> 96</span> <span class="keyword">auto</span>&amp; relocs = sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7" title="returns a vector of relocations.">relocs</a>();</div>
<div class="line"><span class="lineno"> 97</span> std::for_each(relocs.begin(), relocs.end(), [&amp;](reloc_t&amp; reloc) {</div>
<div class="line"><span class="lineno"> 98</span> if (reloc.offset() &gt; sym.data().size()) {</div>
<div class="line"><span class="lineno"> 99</span> spdlog::error(</div>
<div class="line"><span class="lineno"> 100</span> <span class="stringliteral">&quot;invalid relocation... writing outside of symbol length... offset: &quot;</span></div>
<div class="line"><span class="lineno"> 101</span> <span class="stringliteral">&quot;{} sym size: {}&quot;</span>,</div>
<div class="line"><span class="lineno"> 102</span> sym.offset(), sym.data().size());</div>
<div class="line"><span class="lineno"> 103</span> </div>
<div class="line"><span class="lineno"> 104</span> assert(reloc.offset() &gt; sym.data().size());</div>
<div class="line"><span class="lineno"> 105</span> }</div>
<div class="line"><span class="lineno"> 106</span> </div>
<div class="line"><span class="lineno"> 107</span> <span class="comment">// try and resolve the symbol by refering to the internal symbol table</span></div>
<div class="line"><span class="lineno"> 108</span> <span class="comment">// first... if there is no symbol then refer to the resolver...</span></div>
<div class="line"><span class="lineno"> 109</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 110</span> <span class="keyword">auto</span> reloc_sym = m_dcmp-&gt;<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>()-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a308c0dbcc4d569467e0986b32ef30db5" title="returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its nam...">sym_from_hash</a>(reloc.hash());</div>
<div class="line"><span class="lineno"> 111</span> <span class="keyword">auto</span> allocated_at = reloc_sym.has_value()</div>
<div class="line"><span class="lineno"> 112</span> ? reloc_sym.value()-&gt;allocated_at()</div>
<div class="line"><span class="lineno"> 113</span> : m_resolver(reloc.name());</div>
<div class="line"><span class="lineno"> 114</span> </div>
<div class="line"><span class="lineno"> 115</span> if (!allocated_at) {</div>
<div class="line"><span class="lineno"> 116</span> spdlog::error(<span class="stringliteral">&quot;failed to resolve reloc from symbol: {} to symbol: {}&quot;</span>,</div>
<div class="line"><span class="lineno"> 117</span> sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">name</a>(), reloc.name());</div>
<div class="line"><span class="lineno"> 118</span> </div>
<div class="line"><span class="lineno"> 119</span> assert(allocated_at);</div>
<div class="line"><span class="lineno"> 120</span> }</div>
<div class="line"><span class="lineno"> 121</span> </div>
<div class="line"><span class="lineno"> 122</span> <span class="keywordflow">switch</span> (sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a16587cddd37cd45d9ec6cd25c229e8d1" title="returns the type of the symbol.">type</a>()) {</div>
<div class="line"><span class="lineno"> 123</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a46b3b57c5d47e2818b2ea10b96b43cd6">decomp::sym_type_t::section</a>: {</div>
<div class="line"><span class="lineno"> 124</span> <span class="keyword">auto</span> scn_sym =</div>
<div class="line"><span class="lineno"> 125</span> m_dcmp-&gt;<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>()-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a308c0dbcc4d569467e0986b32ef30db5" title="returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its nam...">sym_from_hash</a>(m_dcmp-&gt;<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a860dddc3a5d12231b685dbaa12a0db06" title="gets the section hash table section header --&gt; hash of the section header ptr.">scn_hash_tbl</a>()[sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd" title="gets the section header of the section in which the symbol is contained.">scn</a>()]);</div>
<div class="line"><span class="lineno"> 126</span> </div>
<div class="line"><span class="lineno"> 127</span> *<span class="keyword">reinterpret_cast&lt;</span>std::uintptr_t*<span class="keyword">&gt;</span>(scn_sym.value()-&gt;data().data() +</div>
<div class="line"><span class="lineno"> 128</span> reloc.offset()) = allocated_at;</div>
<div class="line"><span class="lineno"> 129</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 130</span> }</div>
<div class="line"><span class="lineno"> 131</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">decomp::sym_type_t::function</a>: {</div>
<div class="line"><span class="lineno"> 132</span> *<span class="keyword">reinterpret_cast&lt;</span>std::uintptr_t*<span class="keyword">&gt;</span>(sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>().data() +</div>
<div class="line"><span class="lineno"> 133</span> reloc.offset()) = allocated_at;</div>
<div class="line"><span class="lineno"> 134</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 135</span> }</div>
<div class="line"><span class="lineno"> 136</span> <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9">decomp::sym_type_t::instruction</a>: {</div>
<div class="line"><span class="lineno"> 137</span> <span class="keyword">auto</span>&amp; transforms = reloc.get_transforms();</div>
<div class="line"><span class="lineno"> 138</span> std::for_each(</div>
<div class="line"><span class="lineno"> 139</span> transforms.begin(), transforms.end(),</div>
<div class="line"><span class="lineno"> 140</span> [&amp;](std::pair&lt;obf::transform::transform_t*, std::uint32_t&gt;&amp; t) {</div>
<div class="line"><span class="lineno"> 141</span> allocated_at = (*t.first)(allocated_at, t.second);</div>
<div class="line"><span class="lineno"> 142</span> });</div>
<div class="line"><span class="lineno"> 143</span> </div>
<div class="line"><span class="lineno"> 144</span> *<span class="keyword">reinterpret_cast&lt;</span>std::uintptr_t*<span class="keyword">&gt;</span>(sym.<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>().data() +</div>
<div class="line"><span class="lineno"> 145</span> reloc.offset()) = allocated_at;</div>
<div class="line"><span class="lineno"> 146</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 147</span> }</div>
<div class="line"><span class="lineno"> 148</span> <span class="keywordflow">default</span>:</div>
<div class="line"><span class="lineno"> 149</span> <span class="keywordflow">break</span>;</div>
<div class="line"><span class="lineno"> 150</span> }</div>
<div class="line"><span class="lineno"> 151</span> });</div>
<div class="line"><span class="lineno"> 152</span> });</div>
<div class="line"><span class="lineno"> 153</span>}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00076">theo::decomp::symbol_t::data()</a>, <a class="el" href="../../d6/d62/symbol_8hpp_source.html#l00044">theo::decomp::function</a>, <a class="el" href="../../d1/d82/reloc_8hpp_source.html#l00101">theo::recomp::reloc_t::get_transforms()</a>, <a class="el" href="../../d1/d82/reloc_8hpp_source.html#l00061">theo::recomp::reloc_t::hash()</a>, <a class="el" href="../../d6/d62/symbol_8hpp_source.html#l00045">theo::decomp::instruction</a>, <a class="el" href="../../d1/d82/reloc_8hpp_source.html#l00067">theo::recomp::reloc_t::name()</a>, <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00052">theo::decomp::symbol_t::name()</a>, <a class="el" href="../../d1/d82/reloc_8hpp_source.html#l00075">theo::recomp::reloc_t::offset()</a>, <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00096">theo::decomp::symbol_t::relocs()</a>, <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00064">theo::decomp::symbol_t::scn()</a>, <a class="el" href="../../d6/d62/symbol_8hpp_source.html#l00047">theo::decomp::section</a>, and <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00080">theo::decomp::symbol_t::type()</a>.</p>
<p class="reference">Referenced by <a class="el" href="../../d2/d26/theo_8cpp_source.html#l00056">theo::theo_t::compose()</a>.</p>
</div>
</div>
<a id="ae0c56f0f8af33b390e4123509523602c" name="ae0c56f0f8af33b390e4123509523602c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0c56f0f8af33b390e4123509523602c">&#9670;&nbsp;</a></span>resolve() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::uintptr_t theo::recomp::recomp_t::resolve </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&amp;&#160;</td>
<td class="paramname"><em>sym</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>resolves the address of a function given its name. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sym</td><td>the name of the symbol to resolve the location of.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the address of the symbol.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00175">175</a> of file <a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 175</span> {</div>
<div class="line"><span class="lineno"> 176</span> <span class="keyword">auto</span> res = m_dcmp-&gt;<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>()-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#a308c0dbcc4d569467e0986b32ef30db5" title="returns an optional pointer to a symbol from the symbol table given the symbols hash (hash of its nam...">sym_from_hash</a>(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">decomp::symbol_t::hash</a>(sym));</div>
<div class="line"><span class="lineno"> 177</span> <span class="keywordflow">return</span> res.has_value() ? res.value()-&gt;allocated_at() : 0;</div>
<div class="line"><span class="lineno"> 178</span>}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00088">theo::decomp::symbol_t::hash()</a>.</p>
</div>
</div>
<a id="a1be6d0cdb57565c31b138248c8b2d470" name="a1be6d0cdb57565c31b138248c8b2d470"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1be6d0cdb57565c31b138248c8b2d470">&#9670;&nbsp;</a></span>resolver()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void theo::recomp::recomp_t::resolver </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../da/dbd/namespacetheo_1_1recomp.html#a7364f8c94855a2a871a9d6e1057989f3">resolver_t</a>&#160;</td>
<td class="paramname"><em>resolve</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>setter for the resolve lambda function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">resolve</td><td>lambda function to resolve external symbols.</td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00171">171</a> of file <a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 171</span> {</div>
<div class="line"><span class="lineno"> 172</span> m_resolver = <a class="code hl_function" href="../../d5/d05/classtheo_1_1recomp_1_1recomp__t.html#a299fbede378f04991df2e39293307094" title="when called, this function resolves all relocations in every symbol.">resolve</a>;</div>
<div class="line"><span class="lineno"> 173</span>}</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/recomp/<a class="el" href="../../d4/d4a/recomp_8hpp_source.html">recomp.hpp</a></li>
<li>src/recomp/<a class="el" href="../../db/d55/recomp_8cpp_source.html">recomp.cpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

@ -1,265 +0,0 @@
<!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::next_inst_pass_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">&#160;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&amp;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&amp;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="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">next_inst_pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::obf::next_inst_pass_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>This pass is used to generate transformations and jmp code to change RIP to the next instruction.
<a href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#details">More...</a></p>
<p><code>#include &quot;<a class="el" href="../../d5/d54/next__inst__pass_8hpp_source.html">next_inst_pass.hpp</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for theo::obf::next_inst_pass_t:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.png" usemap="#theo::obf::next_5Finst_5Fpass_5Ft_map" alt=""/>
<map id="theo::obf::next_5Finst_5Fpass_5Ft_map" name="theo::obf::next_5Finst_5Fpass_5Ft_map">
<area href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct..." alt="theo::obf::pass_t" shape="rect" coords="0,0,158,24"/>
</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:ae4cbba78b14c2b9da794386e4d92f40f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#ae4cbba78b14c2b9da794386e4d92f40f">run</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *sym)</td></tr>
<tr class="memdesc:ae4cbba78b14c2b9da794386e4d92f40f"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual method which must be implimented by the pass that inherits this class. <a href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#ae4cbba78b14c2b9da794386e4d92f40f">More...</a><br /></td></tr>
<tr class="separator:ae4cbba78b14c2b9da794386e4d92f40f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classtheo_1_1obf_1_1pass__t"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtheo_1_1obf_1_1pass__t')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td></tr>
<tr class="memitem:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a> (<a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a> <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>)</td></tr>
<tr class="memdesc:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">the explicit constructor of the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> base class. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">More...</a><br /></td></tr>
<tr class="separator:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">run</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *sym)=0</td></tr>
<tr class="memdesc:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual method which must be implimented by the pass that inherits this class. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">More...</a><br /></td></tr>
<tr class="separator:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a> ()</td></tr>
<tr class="memdesc:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the passes symbol type. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">More...</a><br /></td></tr>
<tr class="separator:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</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:a964e6f5291ccba0442519f2563b3a2e9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">next_inst_pass_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#a964e6f5291ccba0442519f2563b3a2e9">get</a> ()</td></tr>
<tr class="separator:a964e6f5291ccba0442519f2563b3a2e9"><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 pass is used to generate transformations and jmp code to change RIP to the next instruction. </p>
<p >given the following code (get pml4 address from cr3):</p>
<p >get_pml4: 0: 48 c7 c0 ff 0f 00 00 mov rax,0xfff 7: 48 f7 d0 not rax a: 0f 20 da mov rdx,cr3 d: 48 21 c2 and rdx,rax 10: b1 00 mov cl,0x0 12: 48 d3 e2 shl rdx,cl 15: 48 89 d0 mov rax,rdx 18: c3 ret</p>
<p >this pass will break up each instruction so that it can be anywhere in a linear virtual address space. this pass will not work on rip relative code, however clang will not generate such code when compiled with "-mcmodel=large"</p>
<p >get_pml4@0: mov rax, 0xFFF push [next_inst_addr_enc] xor [rsp], 0x3243342 ; a random number of transformations here... ret next_inst_addr_enc: ; encrypted address of the next instruction goes here.</p>
<p >get_pml4@7: not rax push [next_inst_addr_enc] xor [rsp], 0x93983498 ; a random number of transformations here... ret next_inst_addr_enc: ; encrypted address of the next instruction goes here.</p>
<p >this process is continued for each instruction in the function. the last instruction "ret" will have no code generated for it as there is no next instruction.</p>
<p >this pass also only runs at the instruction level, theodosius internally breaks up functions inside of the ".split" section into individual instruction symbols. this process also creates a psuedo relocation which simply tells this pass that there needs to be a relocation to the next symbol. the offset for these psuedo relocations is zero. </p>
<p class="definition">Definition at line <a class="el" href="../../d5/d54/next__inst__pass_8hpp_source.html#l00085">85</a> of file <a class="el" href="../../d5/d54/next__inst__pass_8hpp_source.html">next_inst_pass.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a964e6f5291ccba0442519f2563b3a2e9" name="a964e6f5291ccba0442519f2563b3a2e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a964e6f5291ccba0442519f2563b3a2e9">&#9670;&nbsp;</a></span>get()</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="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">next_inst_pass_t</a> * theo::obf::next_inst_pass_t::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../df/d7d/next__inst__pass_8cpp_source.html#l00034">34</a> of file <a class="el" href="../../df/d7d/next__inst__pass_8cpp_source.html">next_inst_pass.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 34</span> {</div>
<div class="line"><span class="lineno"> 35</span> <span class="keyword">static</span> next_inst_pass_t obj;</div>
<div class="line"><span class="lineno"> 36</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><span class="lineno"> 37</span>}</div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="../../df/d0a/main_8cpp_source.html#l00057">main()</a>, and <a class="el" href="../../d9/db4/jcc__rewrite__pass_8cpp_source.html#l00040">theo::obf::jcc_rewrite_pass_t::run()</a>.</p>
</div>
</div>
<a id="ae4cbba78b14c2b9da794386e4d92f40f" name="ae4cbba78b14c2b9da794386e4d92f40f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4cbba78b14c2b9da794386e4d92f40f">&#9670;&nbsp;</a></span>run()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void theo::obf::next_inst_pass_t::run </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *&#160;</td>
<td class="paramname"><em>sym</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>virtual method which must be implimented by the pass that inherits this class. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sym</td><td>a symbol of the same type of m_sym_type.</td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">theo::obf::pass_t</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../df/d7d/next__inst__pass_8cpp_source.html#l00038">38</a> of file <a class="el" href="../../df/d7d/next__inst__pass_8cpp_source.html">next_inst_pass.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 38</span> {</div>
<div class="line"><span class="lineno"> 39</span> std::optional&lt;recomp::reloc_t*&gt; reloc;</div>
<div class="line"><span class="lineno"> 40</span> <span class="keywordflow">if</span> (!(reloc = has_next_inst_reloc(sym)).has_value())</div>
<div class="line"><span class="lineno"> 41</span> <span class="keywordflow">return</span>;</div>
<div class="line"><span class="lineno"> 42</span> </div>
<div class="line"><span class="lineno"> 43</span> xed_decoded_inst_t inst = m_tmp_inst;</div>
<div class="line"><span class="lineno"> 44</span> std::vector&lt;std::uint8_t&gt; new_inst_bytes =</div>
<div class="line"><span class="lineno"> 45</span> <a class="code hl_function" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#abb618f5ff8d88963dd77e682456ef982" title="generate a sequence of transformations given an instruction that has a relocation in it.">transform::generate</a>(&amp;inst, reloc.value(), 3, 6);</div>
<div class="line"><span class="lineno"> 46</span> </div>
<div class="line"><span class="lineno"> 47</span> <span class="comment">// add a push [rip+offset] and update reloc-&gt;offset()...</span></div>
<div class="line"><span class="lineno"> 48</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 49</span> std::uint32_t inst_len = {};</div>
<div class="line"><span class="lineno"> 50</span> std::uint8_t inst_buff[XED_MAX_INSTRUCTION_BYTES];</div>
<div class="line"><span class="lineno"> 51</span> </div>
<div class="line"><span class="lineno"> 52</span> xed_error_enum_t err;</div>
<div class="line"><span class="lineno"> 53</span> xed_encoder_request_t req;</div>
<div class="line"><span class="lineno"> 54</span> xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b};</div>
<div class="line"><span class="lineno"> 55</span> </div>
<div class="line"><span class="lineno"> 56</span> xed_encoder_request_zero_set_mode(&amp;req, &amp;istate);</div>
<div class="line"><span class="lineno"> 57</span> xed_encoder_request_set_effective_operand_width(&amp;req, 64);</div>
<div class="line"><span class="lineno"> 58</span> xed_encoder_request_set_iclass(&amp;req, XED_ICLASS_PUSH);</div>
<div class="line"><span class="lineno"> 59</span> </div>
<div class="line"><span class="lineno"> 60</span> xed_encoder_request_set_mem0(&amp;req);</div>
<div class="line"><span class="lineno"> 61</span> xed_encoder_request_set_operand_order(&amp;req, 0, XED_OPERAND_MEM0);</div>
<div class="line"><span class="lineno"> 62</span> </div>
<div class="line"><span class="lineno"> 63</span> xed_encoder_request_set_base0(&amp;req, XED_REG_RIP);</div>
<div class="line"><span class="lineno"> 64</span> xed_encoder_request_set_seg0(&amp;req, XED_REG_INVALID);</div>
<div class="line"><span class="lineno"> 65</span> xed_encoder_request_set_index(&amp;req, XED_REG_INVALID);</div>
<div class="line"><span class="lineno"> 66</span> xed_encoder_request_set_scale(&amp;req, 0);</div>
<div class="line"><span class="lineno"> 67</span> </div>
<div class="line"><span class="lineno"> 68</span> xed_encoder_request_set_memory_operand_length(&amp;req, 8);</div>
<div class="line"><span class="lineno"> 69</span> xed_encoder_request_set_memory_displacement(&amp;req, new_inst_bytes.size() + 1,</div>
<div class="line"><span class="lineno"> 70</span> 1);</div>
<div class="line"><span class="lineno"> 71</span> </div>
<div class="line"><span class="lineno"> 72</span> <span class="keywordflow">if</span> ((err = xed_encode(&amp;req, inst_buff, <span class="keyword">sizeof</span>(inst_buff), &amp;inst_len)) !=</div>
<div class="line"><span class="lineno"> 73</span> XED_ERROR_NONE) {</div>
<div class="line"><span class="lineno"> 74</span> spdlog::info(<span class="stringliteral">&quot;failed to encode instruction... reason: {}&quot;</span>,</div>
<div class="line"><span class="lineno"> 75</span> xed_error_enum_t2str(err));</div>
<div class="line"><span class="lineno"> 76</span> </div>
<div class="line"><span class="lineno"> 77</span> assert(err == XED_ERROR_NONE);</div>
<div class="line"><span class="lineno"> 78</span> }</div>
<div class="line"><span class="lineno"> 79</span> </div>
<div class="line"><span class="lineno"> 80</span> new_inst_bytes.insert(new_inst_bytes.begin(), inst_buff,</div>
<div class="line"><span class="lineno"> 81</span> inst_buff + inst_len);</div>
<div class="line"><span class="lineno"> 82</span> </div>
<div class="line"><span class="lineno"> 83</span> <span class="comment">// put a return instruction at the end of the decrypt instructions...</span></div>
<div class="line"><span class="lineno"> 84</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 85</span> new_inst_bytes.push_back(0xC3);</div>
<div class="line"><span class="lineno"> 86</span> </div>
<div class="line"><span class="lineno"> 87</span> sym-&gt;data().insert(sym-&gt;data().end(), new_inst_bytes.begin(),</div>
<div class="line"><span class="lineno"> 88</span> new_inst_bytes.end());</div>
<div class="line"><span class="lineno"> 89</span> </div>
<div class="line"><span class="lineno"> 90</span> reloc.value()-&gt;offset(sym-&gt;data().size());</div>
<div class="line"><span class="lineno"> 91</span> sym-&gt;data().resize(sym-&gt;data().size() + 8);</div>
<div class="line"><span class="lineno"> 92</span>}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00076">theo::decomp::symbol_t::data()</a>, and <a class="el" href="../../d5/d18/gen_8hpp_source.html#l00045">theo::obf::transform::generate()</a>.</p>
<p class="reference">Referenced by <a class="el" href="../../d9/db4/jcc__rewrite__pass_8cpp_source.html#l00040">theo::obf::jcc_rewrite_pass_t::run()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/obf/passes/<a class="el" href="../../d5/d54/next__inst__pass_8hpp_source.html">next_inst_pass.hpp</a></li>
<li>src/obf/passes/<a class="el" href="../../df/d7d/next__inst__pass_8cpp_source.html">next_inst_pass.cpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

@ -1,106 +0,0 @@
<!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: include/obf/transform/gen.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle"><div class="title">gen.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d6/deb/transform_8hpp_source.html">obf/transform/transform.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d1/d82/reloc_8hpp_source.html">recomp/reloc.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d5/d18/gen_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a></td></tr>
<tr class="memdesc:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses the code for transforming relocations. <br /></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 id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:abb618f5ff8d88963dd77e682456ef982"><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="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#abb618f5ff8d88963dd77e682456ef982">theo::obf::transform::generate</a> (xed_decoded_inst_t *inst, recomp::reloc_t *reloc, std::uint8_t low, std::uint8_t high)</td></tr>
<tr class="memdesc:abb618f5ff8d88963dd77e682456ef982"><td class="mdescLeft">&#160;</td><td class="mdescRight">generate a sequence of transformations given an instruction that has a relocation in it. <a href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#abb618f5ff8d88963dd77e682456ef982">More...</a><br /></td></tr>
<tr class="separator:abb618f5ff8d88963dd77e682456ef982"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,169 +0,0 @@
<!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: include/obf/transform/gen.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">gen.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d5/d18/gen_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d6/deb/transform_8hpp.html">obf/transform/transform.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;<a class="code" href="../../d1/d82/reloc_8hpp.html">recomp/reloc.hpp</a>&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html" title="this namespace encompasses the code for transforming relocations.">theo::obf::transform</a> {<span class="comment"></span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">/// generate a sequence of transformations given an instruction that has a</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">/// relocation in it.</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">/// &lt;param name=&quot;inst&quot;&gt;instruction that has a relocation in it.&lt;/param&gt;</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">/// &lt;param name=&quot;reloc&quot;&gt;meta data relocation object for the instruction.&lt;/param&gt;</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">/// &lt;param name=&quot;low&quot;&gt;lowest number of transformations to generate.&lt;/param&gt;</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">/// &lt;param name=&quot;high&quot;&gt;highest number of transformations to generate.&lt;/param&gt;</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">/// &lt;returns&gt;&lt;/returns&gt;</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#abb618f5ff8d88963dd77e682456ef982"> 45</a></span><span class="comment"></span><span class="keyword">inline</span> std::vector&lt;std::uint8_t&gt; <a class="code hl_function" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#abb618f5ff8d88963dd77e682456ef982" title="generate a sequence of transformations given an instruction that has a relocation in it.">generate</a>(xed_decoded_inst_t* inst,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <a class="code hl_class" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html" title="meta data about a relocation for a symbol">recomp::reloc_t</a>* reloc,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> std::uint8_t low,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> std::uint8_t high) {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> <span class="keyword">auto</span> num_transforms = <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aaa5859bc3c7f95d99d4d726289593488" title="generate a random number in a range.">transform::operation_t::random</a>(low, high);</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">auto</span> num_ops = <a class="code hl_variable" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0" title="map of all of the operations and their type.">transform::operations</a>.size();</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> std::vector&lt;std::uint8_t&gt; new_inst_bytes;</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> std::uint32_t inst_len = {};</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> std::uint8_t inst_buff[XED_MAX_INSTRUCTION_BYTES];</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> xed_encoder_request_t req;</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b};</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> xed_encoder_request_zero_set_mode(&amp;req, &amp;istate);</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> xed_encoder_request_set_effective_operand_width(&amp;req, 64);</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> xed_encoder_request_set_iclass(&amp;req, XED_ICLASS_PUSHFQ);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> xed_encode(&amp;req, inst_buff, <span class="keyword">sizeof</span>(inst_buff), &amp;inst_len);</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> new_inst_bytes.insert(new_inst_bytes.end(), inst_buff, inst_buff + inst_len);</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> cnt = 0u; cnt &lt; num_transforms; ++cnt) {</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> std::uint32_t imm = <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aaa5859bc3c7f95d99d4d726289593488" title="generate a random number in a range.">transform::operation_t::random</a>(</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> 0, std::numeric_limits&lt;std::int32_t&gt;::max());</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="keyword">auto</span> itr = <a class="code hl_variable" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0" title="map of all of the operations and their type.">transform::operations</a>.begin();</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> std::advance(itr, <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aaa5859bc3c7f95d99d4d726289593488" title="generate a random number in a range.">transform::operation_t::random</a>(0, num_ops - 1));</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keyword">auto</span> transform_bytes = itr-&gt;second-&gt;native(inst, imm);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> new_inst_bytes.insert(new_inst_bytes.end(), transform_bytes.begin(),</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> transform_bytes.end());</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> reloc-&gt;<a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#ab5214a9ff9135672e25f40406c37fb10" title="adds a transformation to be applied to the relocation prior to writing it into the symbol.">add_transform</a>(</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> {<a class="code hl_variable" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0" title="map of all of the operations and their type.">transform::operations</a>[itr-&gt;second-&gt;inverse()]-&gt;get_transform(), imm});</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> }</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> xed_encoder_request_zero_set_mode(&amp;req, &amp;istate);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> xed_encoder_request_set_effective_operand_width(&amp;req, 64);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> xed_encoder_request_set_iclass(&amp;req, XED_ICLASS_POPFQ);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> xed_encode(&amp;req, inst_buff, <span class="keyword">sizeof</span>(inst_buff), &amp;inst_len);</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> new_inst_bytes.insert(new_inst_bytes.end(), inst_buff, inst_buff + inst_len);</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="comment">// inverse the order in which the transformations are executed...</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="comment">//</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> std::reverse(reloc-&gt;<a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#af8abfa7a4f1052308a233629faf39a78" title="gets the vector of transformation.">get_transforms</a>().begin(), reloc-&gt;<a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#af8abfa7a4f1052308a233629faf39a78" title="gets the vector of transformation.">get_transforms</a>().end());</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="keywordflow">return</span> new_inst_bytes;</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span>}</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span>} <span class="comment">// namespace theo::obf::transform</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,90 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::transform::add_op_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">theo::obf::transform::add_op_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html#a73d8d592c092482231fb5321ded6e83b">get</a>()</td><td class="entry"><a class="el" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">theo::obf::transform::add_op_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aed18bfd26da1a198f3b5f81525bcbb66">get_transform</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a91f9b94436d49659aaabb291786b3c7b">inverse</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><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><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4">operation_t</a>(transform_t op, xed_iclass_enum_t type)</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="odd"><td class="entry"><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><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f">type</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,102 +0,0 @@
<!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: include/obf/passes/next_inst_pass.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_13fb3109ea9f625158dab961edf6214d.html">passes</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">next_inst_pass.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d8/d5a/pass_8hpp_source.html">obf/pass.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d5/d54/next__inst__pass_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">theo::obf::next_inst_pass_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This pass is used to generate transformations and jmp code to change RIP to the next instruction. <a href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,182 +0,0 @@
<!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: include/obf/passes/next_inst_pass.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_13fb3109ea9f625158dab961edf6214d.html">passes</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">next_inst_pass.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d5/d54/next__inst__pass_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d8/d5a/pass_8hpp.html">obf/pass.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d5/da8/namespacetheo_1_1obf.html" title="this is the main namespace for obfuscation related things.">theo::obf</a> {<span class="comment"></span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="comment">/// This pass is used to generate transformations and jmp code to change RIP to</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">/// the next instruction.</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment">///</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">/// given the following code (get pml4 address from cr3):</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">///</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">/// get_pml4:</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">/// 0: 48 c7 c0 ff 0f 00 00 mov rax,0xfff</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">/// 7: 48 f7 d0 not rax</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">/// a: 0f 20 da mov rdx,cr3</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment">/// d: 48 21 c2 and rdx,rax</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">/// 10: b1 00 mov cl,0x0</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">/// 12: 48 d3 e2 shl rdx,cl</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">/// 15: 48 89 d0 mov rax,rdx</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment">/// 18: c3 ret</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment">///</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">/// this pass will break up each instruction so that it can be anywhere in a</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/// linear virtual address space. this pass will not work on rip relative code,</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">/// however clang will not generate such code when compiled with</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">/// &quot;-mcmodel=large&quot;</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment">///</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment">/// get_pml4@0:</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment">/// mov rax, 0xFFF</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">/// push [next_inst_addr_enc]</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">/// xor [rsp], 0x3243342</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment">/// ; a random number of transformations here...</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment">/// ret</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment">/// next_inst_addr_enc:</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment">/// ; encrypted address of the next instruction goes here.</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment">///</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment">/// get_pml4@7:</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment">/// not rax</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment">/// push [next_inst_addr_enc]</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment">/// xor [rsp], 0x93983498</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment">/// ; a random number of transformations here...</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="comment">/// ret</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment">/// next_inst_addr_enc:</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment">/// ; encrypted address of the next instruction goes here.</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment">///</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment">/// this process is continued for each instruction in the function. the last</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment">/// instruction &quot;ret&quot; will have no code generated for it as there is no next</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment">/// instruction.</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="comment">///</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="comment">///</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="comment">/// this pass also only runs at the instruction level, theodosius internally</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="comment">/// breaks up functions inside of the &quot;.split&quot; section into individual</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="comment">/// instruction symbols. this process also creates a psuedo relocation which</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="comment">/// simply tells this pass that there needs to be a relocation to the next</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="comment">/// symbol. the offset for these psuedo relocations is zero.</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html"> 85</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html" title="This pass is used to generate transformations and jmp code to change RIP to the next instruction.">next_inst_pass_t</a> : <span class="keyword">public</span> <a class="code hl_class" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="keyword">explicit</span> <a class="code hl_class" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html" title="This pass is used to generate transformations and jmp code to change RIP to the next instruction.">next_inst_pass_t</a>() : <a class="code hl_function" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611" title="the explicit constructor of the pass_t base class.">pass_t</a>(<a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9">decomp::sym_type_t::instruction</a>) {</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b};</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> xed_decoded_inst_zero_set_mode(&amp;m_tmp_inst, &amp;istate);</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> xed_decode(&amp;m_tmp_inst, m_type_inst_bytes, <span class="keyword">sizeof</span>(m_type_inst_bytes));</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> }</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keyword">static</span> <a class="code hl_class" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html" title="This pass is used to generate transformations and jmp code to change RIP to the next instruction.">next_inst_pass_t</a>* <a class="code hl_function" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#a964e6f5291ccba0442519f2563b3a2e9">get</a>();</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#ae4cbba78b14c2b9da794386e4d92f40f" title="virtual method which must be implimented by the pass that inherits this class.">run</a>(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>* sym);</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> std::optional&lt;recomp::reloc_t*&gt; has_next_inst_reloc(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>*);</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> xed_decoded_inst_t m_tmp_inst;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> std::uint8_t m_type_inst_bytes[9] = {0x48, 0xC7, 0x44, 0x24, 0x08,</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> 0x44, 0x33, 0x22, 0x11};</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>};</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span>} <span class="comment">// namespace theo::obf</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,204 +0,0 @@
<!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::hello_world_pass_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">&#160;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&amp;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&amp;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="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">hello_world_pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::obf::hello_world_pass_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>hello world pass example of how to inherit <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a>.
<a href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html#details">More...</a></p>
<p><code>#include &quot;<a class="el" href="../../db/dae/hello__world__pass_8hpp_source.html">hello_world_pass.hpp</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for theo::obf::hello_world_pass_t:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.png" usemap="#theo::obf::hello_5Fworld_5Fpass_5Ft_map" alt=""/>
<map id="theo::obf::hello_5Fworld_5Fpass_5Ft_map" name="theo::obf::hello_5Fworld_5Fpass_5Ft_map">
<area href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct..." alt="theo::obf::pass_t" shape="rect" coords="0,0,174,24"/>
</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:a0d2d95f93ac083e157b2f12a8a56f1df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html#a0d2d95f93ac083e157b2f12a8a56f1df">run</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *sym)</td></tr>
<tr class="memdesc:a0d2d95f93ac083e157b2f12a8a56f1df"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual method which must be implimented by the pass that inherits this class. <a href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html#a0d2d95f93ac083e157b2f12a8a56f1df">More...</a><br /></td></tr>
<tr class="separator:a0d2d95f93ac083e157b2f12a8a56f1df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classtheo_1_1obf_1_1pass__t"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtheo_1_1obf_1_1pass__t')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td></tr>
<tr class="memitem:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a> (<a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a> <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>)</td></tr>
<tr class="memdesc:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">the explicit constructor of the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> base class. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">More...</a><br /></td></tr>
<tr class="separator:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">run</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *sym)=0</td></tr>
<tr class="memdesc:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual method which must be implimented by the pass that inherits this class. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">More...</a><br /></td></tr>
<tr class="separator:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a> ()</td></tr>
<tr class="memdesc:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the passes symbol type. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">More...</a><br /></td></tr>
<tr class="separator:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</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:aa556436f48335fe485d96ebc44ac2293"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">hello_world_pass_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html#aa556436f48335fe485d96ebc44ac2293">get</a> ()</td></tr>
<tr class="separator:aa556436f48335fe485d96ebc44ac2293"><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 >hello world pass example of how to inherit <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a>. </p>
<p class="definition">Definition at line <a class="el" href="../../db/dae/hello__world__pass_8hpp_source.html#l00039">39</a> of file <a class="el" href="../../db/dae/hello__world__pass_8hpp_source.html">hello_world_pass.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aa556436f48335fe485d96ebc44ac2293" name="aa556436f48335fe485d96ebc44ac2293"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa556436f48335fe485d96ebc44ac2293">&#9670;&nbsp;</a></span>get()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">hello_world_pass_t</a> * theo::obf::hello_world_pass_t::get </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 class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../db/dae/hello__world__pass_8hpp_source.html#l00045">45</a> of file <a class="el" href="../../db/dae/hello__world__pass_8hpp_source.html">hello_world_pass.hpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 45</span> {</div>
<div class="line"><span class="lineno"> 46</span> <span class="keyword">static</span> hello_world_pass_t obj;</div>
<div class="line"><span class="lineno"> 47</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><span class="lineno"> 48</span> }</div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="../../df/d0a/main_8cpp_source.html#l00057">main()</a>.</p>
</div>
</div>
<a id="a0d2d95f93ac083e157b2f12a8a56f1df" name="a0d2d95f93ac083e157b2f12a8a56f1df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d2d95f93ac083e157b2f12a8a56f1df">&#9670;&nbsp;</a></span>run()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void theo::obf::hello_world_pass_t::run </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *&#160;</td>
<td class="paramname"><em>sym</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>virtual method which must be implimented by the pass that inherits this class. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sym</td><td>a symbol of the same type of m_sym_type.</td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">theo::obf::pass_t</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../db/dae/hello__world__pass_8hpp_source.html#l00050">50</a> of file <a class="el" href="../../db/dae/hello__world__pass_8hpp_source.html">hello_world_pass.hpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 50</span> {</div>
<div class="line"><span class="lineno"> 51</span> spdlog::info(<span class="stringliteral">&quot;[hello_world_pass_t] symbol name: {}, symbol hash: {}&quot;</span>,</div>
<div class="line"><span class="lineno"> 52</span> sym-&gt;name(), sym-&gt;hash());</div>
<div class="line"><span class="lineno"> 53</span> }</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00088">theo::decomp::symbol_t::hash()</a>, and <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00052">theo::decomp::symbol_t::name()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>examples/demo/<a class="el" href="../../db/dae/hello__world__pass_8hpp_source.html">hello_world_pass.hpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

@ -1,160 +0,0 @@
<!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::add_op_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">&#160;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&amp;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&amp;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="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::obf::transform::add_op_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p><code>#include &quot;<a class="el" href="../../d1/def/add__op_8hpp_source.html">add_op.hpp</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for theo::obf::transform::add_op_t:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.png" usemap="#theo::obf::transform::add_5Fop_5Ft_map" alt=""/>
<map id="theo::obf::transform::add_5Fop_5Ft_map" name="theo::obf::transform::add_5Fop_5Ft_map">
<area 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..." alt="theo::obf::transform::operation_t" shape="rect" coords="0,0,188,24"/>
</map>
</div></div>
<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:a73d8d592c092482231fb5321ded6e83b"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html#a73d8d592c092482231fb5321ded6e83b">get</a> ()</td></tr>
<tr class="separator:a73d8d592c092482231fb5321ded6e83b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t')"><img src="../../closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td></tr>
<tr class="memitem:aaa5859bc3c7f95d99d4d726289593488 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">static std::size_t&#160;</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 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td></tr>
<tr class="memitem:a3876ca1c7904aed54940e1519fc9fdf4 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30cad572f62baf0c10fdc7026d7cba44 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><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="../../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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91f9b94436d49659aaabb291786b3c7b inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">xed_iclass_enum_t&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed18bfd26da1a198f3b5f81525bcbb66 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc">transform_t</a> *&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8558c2a8e78ef8da59674396bc76157f inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">xed_iclass_enum_t&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><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 class="definition">Definition at line <a class="el" href="../../d1/def/add__op_8hpp_source.html#l00035">35</a> of file <a class="el" href="../../d1/def/add__op_8hpp_source.html">add_op.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a73d8d592c092482231fb5321ded6e83b" name="a73d8d592c092482231fb5321ded6e83b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a73d8d592c092482231fb5321ded6e83b">&#9670;&nbsp;</a></span>get()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html">add_op_t</a> * theo::obf::transform::add_op_t::get </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 class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d1/def/add__op_8hpp_source.html#l00042">42</a> of file <a class="el" href="../../d1/def/add__op_8hpp_source.html">add_op.hpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 42</span> {</div>
<div class="line"><span class="lineno"> 43</span> <span class="keyword">static</span> add_op_t obj;</div>
<div class="line"><span class="lineno"> 44</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><span class="lineno"> 45</span> }</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="../../d1/def/add__op_8hpp_source.html">add_op.hpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 729 B

@ -1,142 +0,0 @@
<!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: include/obf/transform/operation.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle"><div class="title">operation.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;spdlog/spdlog.h&gt;</code><br />
<code>#include &lt;bit&gt;</code><br />
<code>#include &lt;bitset&gt;</code><br />
<code>#include &lt;functional&gt;</code><br />
<code>#include &lt;map&gt;</code><br />
<code>#include &lt;random&gt;</code><br />
<code>#include &lt;xed-decode.h&gt;</code><br />
<code>#include &lt;xed-interface.h&gt;</code><br />
</div>
<p><a href="../../d5/da4/operation_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><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><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a></td></tr>
<tr class="memdesc:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses the code for transforming relocations. <br /></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 id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a3925943d185a09ad9e32ed8637ccb533"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da4/operation_8hpp.html#a3925943d185a09ad9e32ed8637ccb533">XED_ENCODER</a></td></tr>
<tr class="separator:a3925943d185a09ad9e32ed8637ccb533"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" 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="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc">theo::obf::transform::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="../../d8/d82/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>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a3925943d185a09ad9e32ed8637ccb533" name="a3925943d185a09ad9e32ed8637ccb533"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3925943d185a09ad9e32ed8637ccb533">&#9670;&nbsp;</a></span>XED_ENCODER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define XED_ENCODER</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d5/da4/operation_8hpp_source.html#l00039">39</a> of file <a class="el" href="../../d5/da4/operation_8hpp_source.html">operation.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.3
</small></address>
</body>
</html>

@ -1,247 +0,0 @@
<!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: include/obf/transform/operation.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">operation.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d5/da4/operation_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;spdlog/spdlog.h&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;bit&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;bitset&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include &lt;functional&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#include &lt;random&gt;</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="../../d5/da4/operation_8hpp.html#a3925943d185a09ad9e32ed8637ccb533"> 39</a></span><span class="preprocessor">#define XED_ENCODER</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor">#include &lt;xed-decode.h&gt;</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="preprocessor">#include &lt;xed-interface.h&gt;</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span>}</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment"></span> </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment">/// this namespace encompasses the code for transforming relocations.</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment"></span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html" title="this namespace encompasses the code for transforming relocations.">theo::obf::transform</a> {</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment"></span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">/// lambda function which takes in a 64bit value (relocation address) and a</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/// 32bit value (random value used in transformation).</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc"> 54</a></span><span class="comment"></span><span class="keyword">using</span> <a class="code hl_typedef" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc" title="lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value use...">transform_t</a> = <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">std::function</a>&lt;std::size_t(std::size_t, std::uint32_t)&gt;;</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment"></span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment">/// operation_t is the base class for all types of transformations. classes that</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">/// inherit this class are singleton and simply call the super constructor</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment">/// (operation_t::operation_t).</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html"> 61</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" 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> {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> <span class="keyword">public</span>:<span class="comment"></span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment"> /// explicit constructor for operation_t</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment"> /// &lt;param name=&quot;op&quot;&gt;lambda function when executed applies</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment"> /// transformations.&lt;/param&gt; &lt;param name=&quot;type&quot;&gt;type of transformation, such</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"> /// as XOR, ADD, SUB, etc...&lt;/param&gt;</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4"> 69</a></span><span class="comment"></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" title="explicit constructor for operation_t">operation_t</a>(<a class="code hl_typedef" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc" title="lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value use...">transform_t</a> op, xed_iclass_enum_t <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 class="line"><a id="l00070" name="l00070"></a><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 class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment"></span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> /// generates a native transform instruction given an existing instruction. it</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// works like so:</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment"> /// mov rax, &amp;MessageBoxA ; original instruction with relocation</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span><span class="comment"> /// ; this function takes the first operand and out of the original</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span><span class="comment"> /// ; instruction and uses it to generate a transformation.</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="comment"> /// xor rax, 0x39280928 ; this would be an example output for the xor</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="comment"> /// ;operation.</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="comment"> /// &lt;param name=&quot;inst&quot;&gt;instruction with a relocation to generate a</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="comment"> /// transformation for.&lt;/param&gt; &lt;param name=&quot;imm&quot;&gt;random 32bit number used in</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment"> /// the generate transform.&lt;/param&gt; &lt;returns&gt;returns the bytes of the native</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"> /// instruction that was encoded.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a30cad572f62baf0c10fdc7026d7cba44"> 89</a></span><span class="comment"></span> std::vector&lt;std::uint8_t&gt; <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a30cad572f62baf0c10fdc7026d7cba44" title="generates a native transform instruction given an existing instruction. it works like so:">native</a>(<span class="keyword">const</span> xed_decoded_inst_t* inst,</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> std::uint32_t imm) {</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> std::uint32_t inst_len = {};</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> std::uint8_t inst_buff[XED_MAX_INSTRUCTION_BYTES];</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> xed_error_enum_t err;</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> xed_encoder_request_init_from_decode((xed_decoded_inst_s*)inst);</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> xed_encoder_request_t* req = (xed_encoder_request_t*)inst;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">switch</span> (m_type) {</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> <span class="keywordflow">case</span> XED_ICLASS_ROR:</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <span class="keywordflow">case</span> XED_ICLASS_ROL:</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> xed_encoder_request_set_uimm0(req, imm, 1);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> <span class="keywordflow">default</span>:</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> xed_encoder_request_set_uimm0(req, imm, 4);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> }</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> xed_encoder_request_set_iclass(req, m_type);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> xed_encoder_request_set_operand_order(req, 1, XED_OPERAND_IMM0);</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordflow">if</span> ((err = xed_encode(req, inst_buff, <span class="keyword">sizeof</span>(inst_buff), &amp;inst_len)) !=</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> XED_ERROR_NONE) {</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> spdlog::error(<span class="stringliteral">&quot;failed to encode instruction... reason: {}&quot;</span>,</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> xed_error_enum_t2str(err));</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> assert(err == XED_ERROR_NONE);</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> }</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> </div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">return</span> std::vector&lt;std::uint8_t&gt;(inst_buff, inst_buff + inst_len);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span> }</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment"></span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="comment"> /// gets the inverse operation of the current operation.</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><span class="comment"> /// &lt;returns&gt;the inverse operation of the current operation.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"><a class="line" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a91f9b94436d49659aaabb291786b3c7b"> 126</a></span><span class="comment"></span> xed_iclass_enum_t <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a91f9b94436d49659aaabb291786b3c7b" title="gets the inverse operation of the current operation.">inverse</a>() { <span class="keywordflow">return</span> m_inverse_op[m_type]; }</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span><span class="comment"></span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="comment"> /// gets a pointer to the lambda function which contains the transform logic.</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="comment"> /// &lt;returns&gt;a pointer to the lambda function which contains the transform</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span><span class="comment"> /// logic.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"><a class="line" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aed18bfd26da1a198f3b5f81525bcbb66"> 133</a></span><span class="comment"></span> <a class="code hl_typedef" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc" title="lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value use...">transform_t</a>* <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aed18bfd26da1a198f3b5f81525bcbb66" title="gets a pointer to the lambda function which contains the transform logic.">get_transform</a>() { <span class="keywordflow">return</span> &amp;m_transform; }</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="comment"></span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="comment"> /// gets the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB, etc...</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="comment"> /// &lt;returns&gt;the operation type. such as XED_ICLASS_ADD, XED_ICLASS_SUB,</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="comment"> /// etc...&lt;/returns&gt;</span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"><a class="line" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f"> 140</a></span><span class="comment"></span> xed_iclass_enum_t <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>() { <span class="keywordflow">return</span> m_type; }</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="comment"></span> </div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="comment"> /// generate a random number in a range.</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="comment"> /// &lt;param name=&quot;lowest&quot;&gt;lowest value of the range.&lt;/param&gt;</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="comment"> /// &lt;param name=&quot;largest&quot;&gt;highest value of the range.&lt;/param&gt;</span></div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span><span class="comment"> /// &lt;returns&gt;a random value in a range.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"><a class="line" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aaa5859bc3c7f95d99d4d726289593488"> 148</a></span><span class="comment"></span> <span class="keyword">static</span> std::size_t <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aaa5859bc3c7f95d99d4d726289593488" title="generate a random number in a range.">random</a>(std::size_t lowest, std::size_t largest) {</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> std::random_device rd;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> std::mt19937 gen(rd());</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> std::uniform_int_distribution&lt;std::size_t&gt; distr(lowest, largest);</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> <span class="keywordflow">return</span> distr(gen);</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> }</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> <a class="code hl_typedef" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc" title="lambda function which takes in a 64bit value (relocation address) and a 32bit value (random value use...">transform_t</a> m_transform;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> xed_iclass_enum_t m_type;</div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> std::map&lt;xed_iclass_enum_t, xed_iclass_enum_t&gt; m_inverse_op = {</div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> {XED_ICLASS_ADD, XED_ICLASS_SUB},</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> {XED_ICLASS_SUB, XED_ICLASS_ADD},</div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> {XED_ICLASS_ROL, XED_ICLASS_ROR},</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> {XED_ICLASS_ROR, XED_ICLASS_ROL},</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> {XED_ICLASS_XOR, XED_ICLASS_XOR}};</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span>};</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span>} <span class="comment">// namespace theo::obf::transform</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,116 +0,0 @@
<!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 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 id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../icon.png"/></td>
<td id="projectalign">
<div id="projectname">Theodosius<span id="projectnumber">&#160;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&amp;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&amp;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> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#nested-classes">Data Structures</a> </div>
<div class="headertitle"><div class="title">theo::obf Namespace Reference</div></div>
</div><!--header-->
<div class="contents">
<p>this is the main namespace for obfuscation related things.
<a href="../../d5/da8/namespacetheo_1_1obf.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html">transform</a></td></tr>
<tr class="memdesc:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses the code for transforming relocations. <br /></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 id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">engine_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. <a href="../../d9/d18/classtheo_1_1obf_1_1engine__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="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">hello_world_pass_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">hello world pass example of how to inherit <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a>. <a href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__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="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">jcc_rewrite_pass_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">jcc rewrite pass which rewrites rip relative jcc's so that they are position independent. <a href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__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="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html">next_inst_pass_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This pass is used to generate transformations and jmp code to change RIP to the next instruction. <a href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__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="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">pass_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> class is a base clase for all passes made. you must override the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1" title="virtual method which must be implimented by the pass that inherits this class.">pass_t::run</a> virtual function and declare the logic of your pass there. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__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="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html">reloc_transform_pass_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead of the address of the next instruction. this pass only runs at the instruction level and appends transformations into the reloc_t object of the instruction symbol. <a href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><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 is the main namespace for obfuscation related things. </p>
</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.3
</small></address>
</body>
</html>

@ -1,497 +0,0 @@
<!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::decomp::decomp_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">&#160;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&amp;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&amp;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="../../d9/dbd/namespacetheo_1_1decomp.html">decomp</a></li><li class="navelem"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html">decomp_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::decomp::decomp_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files.
<a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#details">More...</a></p>
<p><code>#include &quot;<a class="el" href="../../d2/d96/decomp_8hpp_source.html">decomp.hpp</a>&quot;</code></p>
<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:a35cfac16bd918d576b29e04388690d68"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a35cfac16bd918d576b29e04388690d68">decomp_t</a> (std::vector&lt; std::uint8_t &gt; &amp;<a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2">lib</a>, <a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">recomp::symbol_table_t</a> *<a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120">syms</a>)</td></tr>
<tr class="memdesc:a35cfac16bd918d576b29e04388690d68"><td class="mdescLeft">&#160;</td><td class="mdescRight">the explicit constructor for <a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html" title="the main decomposition class which is responsible for breaking down lib file into coff files,...">decomp_t</a> <a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a35cfac16bd918d576b29e04388690d68">More...</a><br /></td></tr>
<tr class="separator:a35cfac16bd918d576b29e04388690d68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79c965ec0a996a936faae7f54b0e055e"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html">routine_t</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a79c965ec0a996a936faae7f54b0e055e">rtns</a> ()</td></tr>
<tr class="memdesc:a79c965ec0a996a936faae7f54b0e055e"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets all of the routine objects. <a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a79c965ec0a996a936faae7f54b0e055e">More...</a><br /></td></tr>
<tr class="separator:a79c965ec0a996a936faae7f54b0e055e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa728bde8ec1c5c28ec09f86adf427ae2"><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="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2">lib</a> ()</td></tr>
<tr class="memdesc:aa728bde8ec1c5c28ec09f86adf427ae2"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets a vector of bytes consisting of the lib file. <a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2">More...</a><br /></td></tr>
<tr class="separator:aa728bde8ec1c5c28ec09f86adf427ae2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81ae70b313a9ef24ea5d8f404699baef"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::vector&lt; std::uint8_t &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a81ae70b313a9ef24ea5d8f404699baef">objs</a> ()</td></tr>
<tr class="memdesc:a81ae70b313a9ef24ea5d8f404699baef"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets all the obj files as a vector of a vector of bytes. <a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a81ae70b313a9ef24ea5d8f404699baef">More...</a><br /></td></tr>
<tr class="separator:a81ae70b313a9ef24ea5d8f404699baef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8630f2ee0f4fb9516f5b20014e4c6120"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">recomp::symbol_table_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120">syms</a> ()</td></tr>
<tr class="memdesc:a8630f2ee0f4fb9516f5b20014e4c6120"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the symbol table. <a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120">More...</a><br /></td></tr>
<tr class="separator:a8630f2ee0f4fb9516f5b20014e4c6120"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a860dddc3a5d12231b685dbaa12a0db06"><td class="memItemLeft" align="right" valign="top">std::map&lt; coff::section_header_t *, std::size_t &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a860dddc3a5d12231b685dbaa12a0db06">scn_hash_tbl</a> ()</td></tr>
<tr class="memdesc:a860dddc3a5d12231b685dbaa12a0db06"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the section hash table section header --&gt; hash of the section header ptr. <a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a860dddc3a5d12231b685dbaa12a0db06">More...</a><br /></td></tr>
<tr class="separator:a860dddc3a5d12231b685dbaa12a0db06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae23353a4293aa30969b6d3fa37359469"><td class="memItemLeft" align="right" valign="top">std::optional&lt; <a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">recomp::symbol_table_t</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#ae23353a4293aa30969b6d3fa37359469">decompose</a> (std::string &amp;entry_sym)</td></tr>
<tr class="memdesc:ae23353a4293aa30969b6d3fa37359469"><td class="mdescLeft">&#160;</td><td class="mdescRight">decomposes (extracts) the symbols used. this function determines all used symbols given the entry point. <a href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#ae23353a4293aa30969b6d3fa37359469">More...</a><br /></td></tr>
<tr class="separator:ae23353a4293aa30969b6d3fa37359469"><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 >the main decomposition class which is responsible for breaking down lib file into coff files, and extracted used symbols from the coff files. </p>
<p class="definition">Definition at line <a class="el" href="../../d2/d96/decomp_8hpp_source.html#l00061">61</a> of file <a class="el" href="../../d2/d96/decomp_8hpp_source.html">decomp.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a35cfac16bd918d576b29e04388690d68" name="a35cfac16bd918d576b29e04388690d68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a35cfac16bd918d576b29e04388690d68">&#9670;&nbsp;</a></span>decomp_t()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">theo::decomp::decomp_t::decomp_t </td>
<td>(</td>
<td class="paramtype">std::vector&lt; std::uint8_t &gt; &amp;&#160;</td>
<td class="paramname"><em>lib</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">recomp::symbol_table_t</a> *&#160;</td>
<td class="paramname"><em>syms</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">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>the explicit constructor for <a class="el" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html" title="the main decomposition class which is responsible for breaking down lib file into coff files,...">decomp_t</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">lib</td><td>vector of bytes containing the lib file.</td></tr>
<tr><td class="paramname">syms</td><td>symbol table that gets populated and managed by this class.</td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00034">34</a> of file <a class="el" href="../../dc/d83/decomp_8cpp_source.html">decomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 35</span> : m_lib(<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2" title="gets a vector of bytes consisting of the lib file.">lib</a>), m_syms(<a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#a8630f2ee0f4fb9516f5b20014e4c6120" title="gets the symbol table.">syms</a>) {}</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae23353a4293aa30969b6d3fa37359469" name="ae23353a4293aa30969b6d3fa37359469"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae23353a4293aa30969b6d3fa37359469">&#9670;&nbsp;</a></span>decompose()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::optional&lt; <a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">recomp::symbol_table_t</a> * &gt; theo::decomp::decomp_t::decompose </td>
<td>(</td>
<td class="paramtype">std::string &amp;&#160;</td>
<td class="paramname"><em>entry_sym</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>decomposes (extracts) the symbols used. this function determines all used symbols given the entry point. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">entry_sym</td><td>the entry point symbol name.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>returns an optional pointer to the symbol table. no value in the optional object on failure.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00037">37</a> of file <a class="el" href="../../dc/d83/decomp_8cpp_source.html">decomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 38</span> {</div>
<div class="line"><span class="lineno"> 39</span> <span class="comment">// extract obj files from the archive file...</span></div>
<div class="line"><span class="lineno"> 40</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 41</span> ar::view&lt;false&gt; <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2" title="gets a vector of bytes consisting of the lib file.">lib</a>(m_lib.data(), m_lib.size());</div>
<div class="line"><span class="lineno"> 42</span> std::for_each(</div>
<div class="line"><span class="lineno"> 43</span> <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2" title="gets a vector of bytes consisting of the lib file.">lib</a>.begin(), <a class="code hl_function" href="../../d6/d0e/classtheo_1_1decomp_1_1decomp__t.html#aa728bde8ec1c5c28ec09f86adf427ae2" title="gets a vector of bytes consisting of the lib file.">lib</a>.end(),</div>
<div class="line"><span class="lineno"> 44</span> [&amp;](std::pair&lt;std::string_view, ar::entry_t&amp;&gt; itr) {</div>
<div class="line"><span class="lineno"> 45</span> <span class="comment">// if the entry isnt the symbol table or the string table</span></div>
<div class="line"><span class="lineno"> 46</span> <span class="comment">// then we know its an obj file...</span></div>
<div class="line"><span class="lineno"> 47</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 48</span> if (!itr.second.is_symbol_table() &amp;&amp; !itr.second.is_string_table()) {</div>
<div class="line"><span class="lineno"> 49</span> spdlog::info(<span class="stringliteral">&quot;extracted obj from archive: {}&quot;</span>, itr.first);</div>
<div class="line"><span class="lineno"> 50</span> std::vector&lt;std::uint8_t&gt; data(itr.second.begin(), itr.second.end());</div>
<div class="line"><span class="lineno"> 51</span> m_objs.push_back(data);</div>
<div class="line"><span class="lineno"> 52</span> }</div>
<div class="line"><span class="lineno"> 53</span> });</div>
<div class="line"><span class="lineno"> 54</span> </div>
<div class="line"><span class="lineno"> 55</span> std::for_each(</div>
<div class="line"><span class="lineno"> 56</span> m_objs.begin(), m_objs.end(), [&amp;](std::vector&lt;std::uint8_t&gt;&amp; img_data) {</div>
<div class="line"><span class="lineno"> 57</span> auto img = reinterpret_cast&lt;coff::image_t*&gt;(img_data.data());</div>
<div class="line"><span class="lineno"> 58</span> for (auto idx = 0u; idx &lt; img-&gt;file_header.num_symbols; ++idx) {</div>
<div class="line"><span class="lineno"> 59</span> auto sym = img-&gt;get_symbol(idx);</div>
<div class="line"><span class="lineno"> 60</span> if (sym-&gt;section_index - 1 &gt; img-&gt;file_header.num_sections)</div>
<div class="line"><span class="lineno"> 61</span> continue;</div>
<div class="line"><span class="lineno"> 62</span> </div>
<div class="line"><span class="lineno"> 63</span> auto sym_name = symbol_t::name(img, sym);</div>
<div class="line"><span class="lineno"> 64</span> if (sym_name.length()) {</div>
<div class="line"><span class="lineno"> 65</span> auto sym_hash = symbol_t::hash(sym_name.data());</div>
<div class="line"><span class="lineno"> 66</span> auto sym_size =</div>
<div class="line"><span class="lineno"> 67</span> sym-&gt;has_section()</div>
<div class="line"><span class="lineno"> 68</span> ? next_sym(img, img-&gt;get_section(sym-&gt;section_index - 1),</div>
<div class="line"><span class="lineno"> 69</span> sym)</div>
<div class="line"><span class="lineno"> 70</span> : 0u;</div>
<div class="line"><span class="lineno"> 71</span> </div>
<div class="line"><span class="lineno"> 72</span> m_lookup_tbl[sym_hash].emplace_back(img, sym, sym_size);</div>
<div class="line"><span class="lineno"> 73</span> }</div>
<div class="line"><span class="lineno"> 74</span> }</div>
<div class="line"><span class="lineno"> 75</span> });</div>
<div class="line"><span class="lineno"> 76</span> </div>
<div class="line"><span class="lineno"> 77</span> <span class="comment">// extract used symbols from objs and create a nice little set of them so that</span></div>
<div class="line"><span class="lineno"> 78</span> <span class="comment">// we can easily decompose them... no need deal with every single symbol...</span></div>
<div class="line"><span class="lineno"> 79</span> spdlog::info(<span class="stringliteral">&quot;extracted {} symbols being used...&quot;</span>,</div>
<div class="line"><span class="lineno"> 80</span> ext_used_syms(entry_sym.data()));</div>
<div class="line"><span class="lineno"> 81</span> </div>
<div class="line"><span class="lineno"> 82</span> <span class="comment">// generate symbols, populate section hash table, for each object file</span></div>
<div class="line"><span class="lineno"> 83</span> <span class="comment">// extracted from the archive file...</span></div>
<div class="line"><span class="lineno"> 84</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 85</span> std::for_each(m_used_syms.begin(), m_used_syms.end(), [&amp;](<a class="code hl_typedef" href="../../d9/dbd/namespacetheo_1_1decomp.html#abbf09e1f7eb9e42057ff9c9e8be41266" title="meta symbol data. consists of the coff image which contains the coff symbol, the coff symbol itself,...">sym_data_t</a> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">data</a>) {</div>
<div class="line"><span class="lineno"> 86</span> auto [img, sym, size] = data;</div>
<div class="line"><span class="lineno"> 87</span> </div>
<div class="line"><span class="lineno"> 88</span> <span class="comment">// populate section hash table with sections for the img of this</span></div>
<div class="line"><span class="lineno"> 89</span> <span class="comment">// symbol... only populate the hash table if its not been populated for</span></div>
<div class="line"><span class="lineno"> 90</span> <span class="comment">// this obj before...</span></div>
<div class="line"><span class="lineno"> 91</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 92</span> if (m_processed_objs.emplace(img).second) {</div>
<div class="line"><span class="lineno"> 93</span> for (auto idx = 0u; idx &lt; img-&gt;file_header.num_sections; ++idx) {</div>
<div class="line"><span class="lineno"> 94</span> auto scn = img-&gt;get_section(idx);</div>
<div class="line"><span class="lineno"> 95</span> auto scn_sym_name =</div>
<div class="line"><span class="lineno"> 96</span> std::string(scn-&gt;name.to_string(img-&gt;get_strings()))</div>
<div class="line"><span class="lineno"> 97</span> .append(<span class="stringliteral">&quot;#&quot;</span>)</div>
<div class="line"><span class="lineno"> 98</span> .append(std::to_string(idx))</div>
<div class="line"><span class="lineno"> 99</span> .append(<span class="stringliteral">&quot;!&quot;</span>)</div>
<div class="line"><span class="lineno"> 100</span> .append(std::to_string(img-&gt;file_header.timedate_stamp));</div>
<div class="line"><span class="lineno"> 101</span> </div>
<div class="line"><span class="lineno"> 102</span> <span class="comment">// hash the name of the section + the index + the timestamp of the</span></div>
<div class="line"><span class="lineno"> 103</span> <span class="comment">// obj file it is in...</span></div>
<div class="line"><span class="lineno"> 104</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 105</span> m_scn_hash_tbl.insert({scn, decomp::symbol_t::hash(scn_sym_name)});</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> </div>
<div class="line"><span class="lineno"> 109</span> <span class="comment">// if the symbol is a function then we are going to decompose it...</span></div>
<div class="line"><span class="lineno"> 110</span> <span class="comment">// data symbols are handled after this...</span></div>
<div class="line"><span class="lineno"> 111</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 112</span> if (sym-&gt;has_section()) {</div>
<div class="line"><span class="lineno"> 113</span> if (sym-&gt;derived_type == coff::derived_type_id::function) {</div>
<div class="line"><span class="lineno"> 114</span> auto scn = img-&gt;get_section(sym-&gt;section_index - 1);</div>
<div class="line"><span class="lineno"> 115</span> auto dcmp_type =</div>
<div class="line"><span class="lineno"> 116</span> scn-&gt;name.to_string(img-&gt;get_strings()) == INSTR_SPLIT_SECTION_NAME</div>
<div class="line"><span class="lineno"> 117</span> ? decomp::sym_type_t::instruction</div>
<div class="line"><span class="lineno"> 118</span> : decomp::sym_type_t::function;</div>
<div class="line"><span class="lineno"> 119</span> </div>
<div class="line"><span class="lineno"> 120</span> auto fn_size = next_sym(img, scn, sym);</div>
<div class="line"><span class="lineno"> 121</span> auto fn_bgn = scn-&gt;ptr_raw_data + reinterpret_cast&lt;std::uint8_t*&gt;(img) +</div>
<div class="line"><span class="lineno"> 122</span> sym-&gt;value;</div>
<div class="line"><span class="lineno"> 123</span> </div>
<div class="line"><span class="lineno"> 124</span> std::vector&lt;std::uint8_t&gt; fn(fn_bgn, fn_bgn + fn_size);</div>
<div class="line"><span class="lineno"> 125</span> decomp::routine_t rtn(sym, img, scn, fn, dcmp_type);</div>
<div class="line"><span class="lineno"> 126</span> </div>
<div class="line"><span class="lineno"> 127</span> auto syms = rtn.decompose();</div>
<div class="line"><span class="lineno"> 128</span> m_syms-&gt;put_symbols(syms);</div>
<div class="line"><span class="lineno"> 129</span> } <span class="keywordflow">else</span> if (sym-&gt;storage_class == coff::storage_class_id::public_symbol ||</div>
<div class="line"><span class="lineno"> 130</span> sym-&gt;storage_class == coff::storage_class_id::private_symbol) {</div>
<div class="line"><span class="lineno"> 131</span> auto scn = img-&gt;get_section(sym-&gt;section_index - 1);</div>
<div class="line"><span class="lineno"> 132</span> auto scn_sym = m_syms-&gt;sym_from_hash(m_scn_hash_tbl[scn]);</div>
<div class="line"><span class="lineno"> 133</span> </div>
<div class="line"><span class="lineno"> 134</span> <span class="comment">// if the section doesnt have a symbol then make one and put it into</span></div>
<div class="line"><span class="lineno"> 135</span> <span class="comment">// the symbol table...</span></div>
<div class="line"><span class="lineno"> 136</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 137</span> if (!scn_sym.has_value()) {</div>
<div class="line"><span class="lineno"> 138</span> auto scn_sym_name =</div>
<div class="line"><span class="lineno"> 139</span> std::string(scn-&gt;name.to_string(img-&gt;get_strings()))</div>
<div class="line"><span class="lineno"> 140</span> .append(<span class="stringliteral">&quot;#&quot;</span>)</div>
<div class="line"><span class="lineno"> 141</span> .append(std::to_string(sym-&gt;section_index - 1))</div>
<div class="line"><span class="lineno"> 142</span> .append(<span class="stringliteral">&quot;!&quot;</span>)</div>
<div class="line"><span class="lineno"> 143</span> .append(std::to_string(img-&gt;file_header.timedate_stamp));</div>
<div class="line"><span class="lineno"> 144</span> </div>
<div class="line"><span class="lineno"> 145</span> std::vector&lt;std::uint8_t&gt; scn_data(scn-&gt;size_raw_data);</div>
<div class="line"><span class="lineno"> 146</span> if (scn-&gt;characteristics.cnt_uninit_data) {</div>
<div class="line"><span class="lineno"> 147</span> scn_data.insert(scn_data.begin(), scn-&gt;size_raw_data, 0);</div>
<div class="line"><span class="lineno"> 148</span> } else {</div>
<div class="line"><span class="lineno"> 149</span> scn_data.insert(</div>
<div class="line"><span class="lineno"> 150</span> scn_data.begin(),</div>
<div class="line"><span class="lineno"> 151</span> reinterpret_cast&lt;std::uint8_t*&gt;(img) + scn-&gt;ptr_raw_data,</div>
<div class="line"><span class="lineno"> 152</span> reinterpret_cast&lt;std::uint8_t*&gt;(img) + scn-&gt;ptr_raw_data +</div>
<div class="line"><span class="lineno"> 153</span> scn-&gt;size_raw_data);</div>
<div class="line"><span class="lineno"> 154</span> }</div>
<div class="line"><span class="lineno"> 155</span> </div>
<div class="line"><span class="lineno"> 156</span> std::vector&lt;recomp::reloc_t&gt; relocs;</div>
<div class="line"><span class="lineno"> 157</span> auto scn_relocs = reinterpret_cast&lt;coff::reloc_t*&gt;(</div>
<div class="line"><span class="lineno"> 158</span> scn-&gt;ptr_relocs + reinterpret_cast&lt;std::uint8_t*&gt;(img));</div>
<div class="line"><span class="lineno"> 159</span> </div>
<div class="line"><span class="lineno"> 160</span> for (auto idx = 0u; idx &lt; scn-&gt;num_relocs; ++idx) {</div>
<div class="line"><span class="lineno"> 161</span> auto scn_reloc = &amp;scn_relocs[idx];</div>
<div class="line"><span class="lineno"> 162</span> auto sym_reloc = img-&gt;get_symbol(scn_relocs[idx].symbol_index);</div>
<div class="line"><span class="lineno"> 163</span> auto sym_name = symbol_t::name(img, sym_reloc);</div>
<div class="line"><span class="lineno"> 164</span> auto sym_hash = decomp::symbol_t::hash(sym_name.data());</div>
<div class="line"><span class="lineno"> 165</span> relocs.push_back(</div>
<div class="line"><span class="lineno"> 166</span> recomp::reloc_t(scn_reloc-&gt;virtual_address - sym-&gt;value,</div>
<div class="line"><span class="lineno"> 167</span> sym_hash, sym_name.data()));</div>
<div class="line"><span class="lineno"> 168</span> }</div>
<div class="line"><span class="lineno"> 169</span> </div>
<div class="line"><span class="lineno"> 170</span> decomp::symbol_t new_scn_sym(img, scn_sym_name, 0, scn_data, scn, {},</div>
<div class="line"><span class="lineno"> 171</span> relocs, sym_type_t::section);</div>
<div class="line"><span class="lineno"> 172</span> </div>
<div class="line"><span class="lineno"> 173</span> m_syms-&gt;put_symbol(new_scn_sym);</div>
<div class="line"><span class="lineno"> 174</span> }</div>
<div class="line"><span class="lineno"> 175</span> </div>
<div class="line"><span class="lineno"> 176</span> <span class="comment">// create a symbol for the data...</span></div>
<div class="line"><span class="lineno"> 177</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 178</span> decomp::symbol_t new_sym(img, <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">symbol_t::name</a>(img, sym).<a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">data</a>(),</div>
<div class="line"><span class="lineno"> 179</span> sym-&gt;value, {}, scn, sym, {},</div>
<div class="line"><span class="lineno"> 180</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">sym_type_t::data</a>);</div>
<div class="line"><span class="lineno"> 181</span> </div>
<div class="line"><span class="lineno"> 182</span> m_syms-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af9caf2d4d97b2498aa624c3750a7a601" title="add symbol to m_table">put_symbol</a>(new_sym);</div>
<div class="line"><span class="lineno"> 183</span> }</div>
<div class="line"><span class="lineno"> 184</span> } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sym-&gt;storage_class ==</div>
<div class="line"><span class="lineno"> 185</span> coff::storage_class_id::</div>
<div class="line"><span class="lineno"> 186</span> external_definition) { <span class="comment">// else if the symbol has no</span></div>
<div class="line"><span class="lineno"> 187</span> <span class="comment">// section... these symbols</span></div>
<div class="line"><span class="lineno"> 188</span> <span class="comment">// require the linker to allocate</span></div>
<div class="line"><span class="lineno"> 189</span> <span class="comment">// space for them...</span></div>
<div class="line"><span class="lineno"> 190</span> </div>
<div class="line"><span class="lineno"> 191</span> std::vector&lt;std::uint8_t&gt; data(sym-&gt;value, 0);</div>
<div class="line"><span class="lineno"> 192</span> decomp::symbol_t bss_sym(img, symbol_t::name(img, sym).data(), {}, <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">data</a>,</div>
<div class="line"><span class="lineno"> 193</span> {}, sym, {}, <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">sym_type_t::data</a>);</div>
<div class="line"><span class="lineno"> 194</span> </div>
<div class="line"><span class="lineno"> 195</span> m_syms-&gt;<a class="code hl_function" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html#af9caf2d4d97b2498aa624c3750a7a601" title="add symbol to m_table">put_symbol</a>(bss_sym);</div>
<div class="line"><span class="lineno"> 196</span> }</div>
<div class="line"><span class="lineno"> 197</span> });</div>
<div class="line"><span class="lineno"> 198</span> </div>
<div class="line"><span class="lineno"> 199</span> <span class="comment">// return the extract symbols to the caller...</span></div>
<div class="line"><span class="lineno"> 200</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 201</span> <span class="keywordflow">return</span> m_syms;</div>
<div class="line"><span class="lineno"> 202</span>}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00285">lib()</a>.</p>
<p class="reference">Referenced by <a class="el" href="../../d2/d26/theo_8cpp_source.html#l00045">theo::theo_t::decompose()</a>.</p>
</div>
</div>
<a id="aa728bde8ec1c5c28ec09f86adf427ae2" name="aa728bde8ec1c5c28ec09f86adf427ae2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa728bde8ec1c5c28ec09f86adf427ae2">&#9670;&nbsp;</a></span>lib()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; std::uint8_t &gt; theo::decomp::decomp_t::lib </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>gets a vector of bytes consisting of the lib file. </p>
<dl class="section return"><dt>Returns</dt><dd>a vector of bytes consisting of the lib file.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00285">285</a> of file <a class="el" href="../../dc/d83/decomp_8cpp_source.html">decomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 285</span> {</div>
<div class="line"><span class="lineno"> 286</span> <span class="keywordflow">return</span> m_lib;</div>
<div class="line"><span class="lineno"> 287</span>}</div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00037">decompose()</a>.</p>
</div>
</div>
<a id="a81ae70b313a9ef24ea5d8f404699baef" name="a81ae70b313a9ef24ea5d8f404699baef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81ae70b313a9ef24ea5d8f404699baef">&#9670;&nbsp;</a></span>objs()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; std::vector&lt; std::uint8_t &gt; &gt; theo::decomp::decomp_t::objs </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>gets all the obj files as a vector of a vector of bytes. </p>
<dl class="section return"><dt>Returns</dt><dd>all the obj files as a vector of a vector of bytes.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00289">289</a> of file <a class="el" href="../../dc/d83/decomp_8cpp_source.html">decomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 289</span> {</div>
<div class="line"><span class="lineno"> 290</span> <span class="keywordflow">return</span> m_objs;</div>
<div class="line"><span class="lineno"> 291</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a79c965ec0a996a936faae7f54b0e055e" name="a79c965ec0a996a936faae7f54b0e055e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79c965ec0a996a936faae7f54b0e055e">&#9670;&nbsp;</a></span>rtns()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; <a class="el" href="../../df/db4/classtheo_1_1decomp_1_1routine__t.html">routine_t</a> &gt; theo::decomp::decomp_t::rtns </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>gets all of the routine objects. </p>
<dl class="section return"><dt>Returns</dt><dd>vector of routine objects.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00281">281</a> of file <a class="el" href="../../dc/d83/decomp_8cpp_source.html">decomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 281</span> {</div>
<div class="line"><span class="lineno"> 282</span> <span class="keywordflow">return</span> m_rtns;</div>
<div class="line"><span class="lineno"> 283</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a860dddc3a5d12231b685dbaa12a0db06" name="a860dddc3a5d12231b685dbaa12a0db06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a860dddc3a5d12231b685dbaa12a0db06">&#9670;&nbsp;</a></span>scn_hash_tbl()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::map&lt; coff::section_header_t *, std::size_t &gt; &amp; theo::decomp::decomp_t::scn_hash_tbl </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>gets the section hash table section header --&gt; hash of the section header ptr. </p>
<dl class="section return"><dt>Returns</dt><dd>the section hash table section header --&gt; hash of the section header ptr.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00297">297</a> of file <a class="el" href="../../dc/d83/decomp_8cpp_source.html">decomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 297</span> {</div>
<div class="line"><span class="lineno"> 298</span> <span class="keywordflow">return</span> m_scn_hash_tbl;</div>
<div class="line"><span class="lineno"> 299</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a8630f2ee0f4fb9516f5b20014e4c6120" name="a8630f2ee0f4fb9516f5b20014e4c6120"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8630f2ee0f4fb9516f5b20014e4c6120">&#9670;&nbsp;</a></span>syms()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="../../db/d77/classtheo_1_1recomp_1_1symbol__table__t.html">recomp::symbol_table_t</a> * theo::decomp::decomp_t::syms </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>gets the symbol table. </p>
<dl class="section return"><dt>Returns</dt><dd>the symbol table.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../dc/d83/decomp_8cpp_source.html#l00293">293</a> of file <a class="el" href="../../dc/d83/decomp_8cpp_source.html">decomp.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 293</span> {</div>
<div class="line"><span class="lineno"> 294</span> <span class="keywordflow">return</span> m_syms;</div>
<div class="line"><span class="lineno"> 295</span>}</div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="../../db/d55/recomp_8cpp_source.html#l00040">theo::recomp::recomp_t::allocate()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/decomp/<a class="el" href="../../d2/d96/decomp_8hpp_source.html">decomp.hpp</a></li>
<li>src/decomp/<a class="el" href="../../dc/d83/decomp_8cpp_source.html">decomp.cpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

@ -1,160 +0,0 @@
<!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::rol_op_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">&#160;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&amp;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&amp;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="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::obf::transform::rol_op_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p><code>#include &quot;<a class="el" href="../../d6/d8a/rol__op_8hpp_source.html">rol_op.hpp</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for theo::obf::transform::rol_op_t:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.png" usemap="#theo::obf::transform::rol_5Fop_5Ft_map" alt=""/>
<map id="theo::obf::transform::rol_5Fop_5Ft_map" name="theo::obf::transform::rol_5Fop_5Ft_map">
<area 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..." alt="theo::obf::transform::operation_t" shape="rect" coords="0,0,188,24"/>
</map>
</div></div>
<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:ade2c667c209f2a27f03712f6b151594b"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html#ade2c667c209f2a27f03712f6b151594b">get</a> ()</td></tr>
<tr class="separator:ade2c667c209f2a27f03712f6b151594b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t')"><img src="../../closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td></tr>
<tr class="memitem:aaa5859bc3c7f95d99d4d726289593488 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">static std::size_t&#160;</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 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td></tr>
<tr class="memitem:a3876ca1c7904aed54940e1519fc9fdf4 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30cad572f62baf0c10fdc7026d7cba44 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><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="../../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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91f9b94436d49659aaabb291786b3c7b inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">xed_iclass_enum_t&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed18bfd26da1a198f3b5f81525bcbb66 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc">transform_t</a> *&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8558c2a8e78ef8da59674396bc76157f inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">xed_iclass_enum_t&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><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 class="definition">Definition at line <a class="el" href="../../d6/d8a/rol__op_8hpp_source.html#l00035">35</a> of file <a class="el" href="../../d6/d8a/rol__op_8hpp_source.html">rol_op.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="ade2c667c209f2a27f03712f6b151594b" name="ade2c667c209f2a27f03712f6b151594b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade2c667c209f2a27f03712f6b151594b">&#9670;&nbsp;</a></span>get()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a> * theo::obf::transform::rol_op_t::get </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 class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d6/d8a/rol__op_8hpp_source.html#l00044">44</a> of file <a class="el" href="../../d6/d8a/rol__op_8hpp_source.html">rol_op.hpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 44</span> {</div>
<div class="line"><span class="lineno"> 45</span> <span class="keyword">static</span> rol_op_t obj;</div>
<div class="line"><span class="lineno"> 46</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><span class="lineno"> 47</span> }</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="../../d6/d8a/rol__op_8hpp_source.html">rol_op.hpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

@ -1,160 +0,0 @@
<!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::sub_op_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">&#160;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&amp;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&amp;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="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::obf::transform::sub_op_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p><code>#include &quot;<a class="el" href="../../d8/da9/sub__op_8hpp_source.html">sub_op.hpp</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for theo::obf::transform::sub_op_t:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.png" usemap="#theo::obf::transform::sub_5Fop_5Ft_map" alt=""/>
<map id="theo::obf::transform::sub_5Fop_5Ft_map" name="theo::obf::transform::sub_5Fop_5Ft_map">
<area 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..." alt="theo::obf::transform::operation_t" shape="rect" coords="0,0,188,24"/>
</map>
</div></div>
<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:a297c6d5c62d62d61573ba041f61e9763"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html#a297c6d5c62d62d61573ba041f61e9763">get</a> ()</td></tr>
<tr class="separator:a297c6d5c62d62d61573ba041f61e9763"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t')"><img src="../../closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td></tr>
<tr class="memitem:aaa5859bc3c7f95d99d4d726289593488 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">static std::size_t&#160;</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 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_static_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td></tr>
<tr class="memitem:a3876ca1c7904aed54940e1519fc9fdf4 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30cad572f62baf0c10fdc7026d7cba44 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><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="../../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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a91f9b94436d49659aaabb291786b3c7b inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">xed_iclass_enum_t&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed18bfd26da1a198f3b5f81525bcbb66 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a875984c1ce09aa998fe48cca55270ecc">transform_t</a> *&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8558c2a8e78ef8da59674396bc76157f inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="memItemLeft" align="right" valign="top">xed_iclass_enum_t&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><td class="mdescLeft">&#160;</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 inherit pub_methods_classtheo_1_1obf_1_1transform_1_1operation__t"><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 class="definition">Definition at line <a class="el" href="../../d8/da9/sub__op_8hpp_source.html#l00035">35</a> of file <a class="el" href="../../d8/da9/sub__op_8hpp_source.html">sub_op.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a297c6d5c62d62d61573ba041f61e9763" name="a297c6d5c62d62d61573ba041f61e9763"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a297c6d5c62d62d61573ba041f61e9763">&#9670;&nbsp;</a></span>get()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a> * theo::obf::transform::sub_op_t::get </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 class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d8/da9/sub__op_8hpp_source.html#l00042">42</a> of file <a class="el" href="../../d8/da9/sub__op_8hpp_source.html">sub_op.hpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 42</span> {</div>
<div class="line"><span class="lineno"> 43</span> <span class="keyword">static</span> sub_op_t obj;</div>
<div class="line"><span class="lineno"> 44</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><span class="lineno"> 45</span> }</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="../../d8/da9/sub__op_8hpp_source.html">sub_op.hpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

@ -1,121 +0,0 @@
<!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: include/decomp/symbol.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_2ff93ba14c434dbcd5d31be832ec37b1.html">decomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#enum-members">Enumerations</a> </div>
<div class="headertitle"><div class="title">symbol.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;coff/image.hpp&gt;</code><br />
<code>#include &lt;cstdint&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d1/d82/reloc_8hpp_source.html">recomp/reloc.hpp</a>&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
</div>
<p><a href="../../d6/d62/symbol_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">symbol_t</a> is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol. symbols can be different things, sections, functions, and even instructions (when functions are broken down). <a href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d9/dbd/namespacetheo_1_1decomp"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html">theo::decomp</a></td></tr>
<tr class="memdesc:d9/dbd/namespacetheo_1_1decomp"><td class="mdescLeft">&#160;</td><td class="mdescRight">the namespace that contains all of the decomposition related code. <br /></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 id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:af96177687d0ad683c5897d8fa01135f9"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">theo::decomp::sym_type_t</a> { <br />
&#160;&#160;<a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">theo::decomp::function</a> = 0b00000001
, <a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9">theo::decomp::instruction</a> = 0b00000010
, <a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">theo::decomp::data</a> = 0b00000100
, <a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a46b3b57c5d47e2818b2ea10b96b43cd6">theo::decomp::section</a> = 0b00001000
, <br />
&#160;&#160;<a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a7d51179cde510c8a4070c51733aa9313">theo::decomp::all</a> = section | data | instruction | function
<br />
}</td></tr>
<tr class="memdesc:af96177687d0ad683c5897d8fa01135f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">meta symbol type. this is an abstraction upon the coff symbol storage/class type. <a href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">More...</a><br /></td></tr>
<tr class="separator:af96177687d0ad683c5897d8fa01135f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,279 +0,0 @@
<!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: include/decomp/symbol.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_2ff93ba14c434dbcd5d31be832ec37b1.html">decomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">symbol.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d6/d62/symbol_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;coff/image.hpp&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;<a class="code" href="../../d1/d82/reloc_8hpp.html">recomp/reloc.hpp</a>&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d9/dbd/namespacetheo_1_1decomp.html" title="the namespace that contains all of the decomposition related code.">theo::decomp</a> {<span class="comment"></span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">/// meta symbol type. this is an abstraction upon the coff symbol storage/class</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">/// type.</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9"> 43</a></span><span class="comment"></span><span class="keyword">enum</span> <a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">sym_type_t</a> {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a"> 44</a></span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">function</a> = 0b00000001,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9"> 45</a></span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9">instruction</a> = 0b00000010,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112"> 46</a></span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">data</a> = 0b00000100,</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a46b3b57c5d47e2818b2ea10b96b43cd6"> 47</a></span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a46b3b57c5d47e2818b2ea10b96b43cd6">section</a> = 0b00001000,</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a7d51179cde510c8a4070c51733aa9313">all</a> = <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a46b3b57c5d47e2818b2ea10b96b43cd6">section</a> | <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">data</a> | <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a4842f4c175b1ec87fc82ef3757d3a0e9">instruction</a> | <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acf6baee49c2ddb7e89724231bbd75d4a">function</a></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9a7d51179cde510c8a4070c51733aa9313"> 49</a></span>};</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment"></span> </div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/// symbol_t is an abstraction upon the coff symbol. this allows for easier</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">/// manipulation of the symbol. symbols can be different things, sections,</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">/// functions, and even instructions (when functions are broken down).</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="comment">///</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="comment">/// this class is used throughout theodosius and is a keystone of the project.</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment">/// ensure you understand how this class works and what it contains.</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html"> 59</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">symbol_t</a> {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keyword">public</span>:<span class="comment"></span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment"> /// the explicit constructor of this symbol.</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment"> /// &lt;param name=&quot;img&quot;&gt;the image in which the symbol is located in.&lt;/param&gt;</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment"> /// &lt;param name=&quot;name&quot;&gt;the name of the symbol.&lt;/param&gt;</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment"> /// &lt;param name=&quot;offset&quot;&gt;offset into the section where this symbol is</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment"> /// located.&lt;/param&gt;</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"> /// &lt;param name=&quot;data&quot;&gt;the data of the symbol. there can be</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment"> /// no data.&lt;/param&gt;</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span><span class="comment"> /// &lt;param name=&quot;scn&quot;&gt;the section header describing the</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment"> /// section which contains the symbol.&lt;/param&gt;</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// &lt;param name=&quot;sym&quot;&gt;the coff symbol itself.&lt;/param&gt;</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> /// &lt;param name=&quot;relocs&quot;&gt;a vector of relocations this symbol has (if</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// any).&lt;/param&gt;</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"> /// &lt;param name=&quot;dcmp_type&quot;&gt;the type of symbol&lt;/param&gt;</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span><span class="comment"></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa7247dcb735176b6ed9246d035e7a215" title="the explicit constructor of this symbol.">symbol_t</a>(coff::image_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665" title="gets the imagine in which the symbol is located inside of.">img</a>,</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> std::string <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">name</a>,</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> std::uintptr_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a79759d343ddb6a62e4149aef92e2d70b" title="gets the offset into the section where the symbol is located.">offset</a>,</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> std::vector&lt;std::uint8_t&gt; <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>,</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> coff::section_header_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd" title="gets the section header of the section in which the symbol is contained.">scn</a> = {},</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> coff::symbol_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a> = {},</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> std::vector&lt;recomp::reloc_t&gt; <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7" title="returns a vector of relocations.">relocs</a> = {},</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> <a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">sym_type_t</a> dcmp_type = {});</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment"></span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="comment"> /// gets the name of the symbol.</span></div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment"> /// &lt;returns&gt;the name of the symbol.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span><span class="comment"></span> std::string <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">name</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment"></span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment"> /// gets the offset into the section where the symbol is located.</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="comment"> /// &lt;returns&gt;the offset into the section where the symbol is</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="comment"> /// located.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="comment"></span> std::uintptr_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a79759d343ddb6a62e4149aef92e2d70b" title="gets the offset into the section where the symbol is located.">offset</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><span class="comment"></span> </div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> /// returns the address where the symbol is allocated.</span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="comment"> /// &lt;returns&gt;the address where the symbol is allocated.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="comment"></span> std::uintptr_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47" title="returns the address where the symbol is allocated.">allocated_at</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="comment"></span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="comment"> /// returns the size of the symbol.</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="comment"> /// &lt;returns&gt;the size of the symbol.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="comment"></span> std::uint32_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae33f1452b01fe80f9c384241b9fe6286" title="returns the size of the symbol.">size</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="comment"></span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="comment"> /// gets the section header of the section in which the symbol is contained.</span></div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="comment"> /// &lt;returns&gt;the section header of the section in which the symbol is</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="comment"> /// contained.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="comment"></span> coff::section_header_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd" title="gets the section header of the section in which the symbol is contained.">scn</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><span class="comment"></span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="comment"> /// gets the imagine in which the symbol is located inside of.</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="comment"> /// &lt;returns&gt;the imagine in which the symbol is located inside of.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment"></span> coff::image_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665" title="gets the imagine in which the symbol is located inside of.">img</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="comment"></span> </div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="comment"> /// returns a vector by reference of bytes containing the data of the symbol.</span></div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span><span class="comment"> /// &lt;returns&gt;a vector by reference of bytes containing the data of the</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span><span class="comment"> /// symbol.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span><span class="comment"></span> std::vector&lt;std::uint8_t&gt;&amp; <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>();</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="comment"></span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="comment"> /// returns a pointer to the coff symbol object.</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span><span class="comment"> /// &lt;returns&gt;a pointer to the coff symbol object.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="comment"></span> coff::symbol_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="comment"></span> </div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="comment"> /// returns the type of the symbol.</span></div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="comment"> /// &lt;returns&gt;the type of the symbol.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="comment"></span> <a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">sym_type_t</a> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a16587cddd37cd45d9ec6cd25c229e8d1" title="returns the type of the symbol.">type</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="comment"></span> </div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="comment"> /// returns a vector of relocations.</span></div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="comment"> /// &lt;returns&gt;a vector of relocations.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="comment"></span> std::vector&lt;recomp::reloc_t&gt;&amp; <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7" title="returns a vector of relocations.">relocs</a>();</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span><span class="comment"></span> </div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span><span class="comment"> /// set the address where the symbol is allocated at.</span></div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span><span class="comment"> /// &lt;param name=&quot;allocated_at&quot;&gt;where the symbol is allocated at.&lt;/param&gt;</span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span><span class="comment"></span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47" title="returns the address where the symbol is allocated.">allocated_at</a>(std::uintptr_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47" title="returns the address where the symbol is allocated.">allocated_at</a>);</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span><span class="comment"></span> </div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span><span class="comment"> /// gets the hash of the symbol name.</span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><span class="comment"> /// &lt;returns&gt;the hash of the symbol name.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="comment"></span> std::size_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">hash</a>();</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="comment"></span> </div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="comment"> /// generate a hash given the name of the symbol.</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="comment"> /// &lt;param name=&quot;sym&quot;&gt;the symbol name to create a hash from.&lt;/param&gt;</span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span><span class="comment"> /// &lt;returns&gt;the symbol name hash&lt;/returns&gt;</span></div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="comment"></span> <span class="keyword">static</span> std::size_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">hash</a>(<span class="keyword">const</span> std::string&amp; <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>);</div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span><span class="comment"></span> </div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span><span class="comment"> /// get the name of a symbol. this function will create a symbol name if the</span></div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="comment"> /// symbol is opaquely named.</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span><span class="comment"> /// for example in c++ if you define something like this:</span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span><span class="comment"> /// some_struct_t val = { value_one, value_two };</span></div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="comment"> /// &quot;val&quot; will be stored in the .data section of the coff file. however the</span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span><span class="comment"> /// symbol name will be opaque (the name of the symbol will be &quot;.data&quot;). this</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><span class="comment"> /// causes issues with theo since each symbol needs its own unqiue name to</span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span><span class="comment"> /// generate a unique symbol name hash. for symbols like this, theo will</span></div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span><span class="comment"> /// create a name for it with the following format:</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span><span class="comment"> /// .data#section_index!coff_file_timestamp+offset_into_section</span></div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span><span class="comment"> ///</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span><span class="comment"> /// &lt;param name=&quot;img&quot;&gt;the coff file containing the symbol.&lt;/param&gt;</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span><span class="comment"> /// &lt;param name=&quot;sym&quot;&gt;the coff symbol itself.&lt;/param&gt;</span></div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span><span class="comment"> /// &lt;returns&gt;the name of the symbol, or a created one.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span><span class="comment"></span> <span class="keyword">static</span> std::string <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">name</a>(<span class="keyword">const</span> coff::image_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665" title="gets the imagine in which the symbol is located inside of.">img</a>, coff::symbol_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>);</div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> </div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> std::string m_name;</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> std::uintptr_t m_offset, m_allocated_at;</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> std::vector&lt;std::uint8_t&gt; m_data;</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> coff::section_header_t* m_scn;</div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span> std::vector&lt;recomp::reloc_t&gt; m_relocs;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span> <a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">sym_type_t</a> m_sym_type;</div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span> coff::symbol_t* m_sym;</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> coff::image_t* m_img;</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span>};</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"> 199</span>} <span class="comment">// namespace theo::decomp</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,104 +0,0 @@
<!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: include/obf/transform/rol_op.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">rol_op.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d5/da4/operation_8hpp_source.html">obf/transform/operation.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d6/d8a/rol__op_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">theo::obf::transform::rol_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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a></td></tr>
<tr class="memdesc:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses the code for transforming relocations. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,129 +0,0 @@
<!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: include/obf/transform/rol_op.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">rol_op.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d6/d8a/rol__op_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d5/da4/operation_8hpp.html">obf/transform/operation.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html" title="this namespace encompasses the code for transforming relocations.">theo::obf::transform</a> {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html"> 35</a></span><span class="keyword">class </span><a class="code hl_class" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a> : <span class="keyword">public</span> <a class="code hl_class" 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> {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">explicit</span> <a class="code hl_class" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a>()</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> : <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" title="explicit constructor for operation_t">operation_t</a>(</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> [&amp;](std::size_t val, std::uint32_t imm) -&gt; std::size_t {</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordflow">return</span> std::rotl(val, (std::uint8_t)imm);</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> },</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> XED_ICLASS_ROL) {}</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html#ade2c667c209f2a27f03712f6b151594b"> 44</a></span> <span class="keyword">static</span> <a class="code hl_class" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a>* <a class="code hl_function" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html#ade2c667c209f2a27f03712f6b151594b">get</a>() {</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">static</span> <a class="code hl_class" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a> obj;</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> }</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>};</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span>} <span class="comment">// namespace theo::obf::transform</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,95 +0,0 @@
<!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: src/obf/passes/reloc_transform_pass.cpp File 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">&#160;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&amp;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&amp;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="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_84420232f7d21f2837bd8f918b6fc033.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_dca6cbf37515070a04f03d98baa5bc62.html">passes</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">reloc_transform_pass.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../de/d64/reloc__transform__pass_8hpp_source.html">obf/passes/reloc_transform_pass.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d6/da4/reloc__transform__pass_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,157 +0,0 @@
<!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: src/obf/passes/reloc_transform_pass.cpp Source File</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">&#160;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&amp;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&amp;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="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_84420232f7d21f2837bd8f918b6fc033.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_dca6cbf37515070a04f03d98baa5bc62.html">passes</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">reloc_transform_pass.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d6/da4/reloc__transform__pass_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include &lt;<a class="code" href="../../de/d64/reloc__transform__pass_8hpp.html">obf/passes/reloc_transform_pass.hpp</a>&gt;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d5/da8/namespacetheo_1_1obf.html" title="this is the main namespace for obfuscation related things.">theo::obf</a> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html#a89aa46da5f721057cd8cf5189207d464"> 34</a></span><a class="code hl_class" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html" title="this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead...">reloc_transform_pass_t</a>* <a class="code hl_function" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html#a89aa46da5f721057cd8cf5189207d464">reloc_transform_pass_t::get</a>() {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">static</span> <a class="code hl_class" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html" title="this pass is like the next_inst_pass, however, relocations are encrypted with transformations instead...">reloc_transform_pass_t</a> obj;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span>}</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html#a24e122f6be18a88ea1809252ab3ec0b9"> 39</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../dc/d39/classtheo_1_1obf_1_1reloc__transform__pass__t.html#a24e122f6be18a88ea1809252ab3ec0b9" title="virtual method which must be implimented by the pass that inherits this class.">reloc_transform_pass_t::run</a>(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>* sym) {</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> std::optional&lt;recomp::reloc_t*&gt; reloc;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keywordflow">if</span> (!(reloc = has_legit_reloc(sym)).has_value())</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <span class="keywordflow">return</span>;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> spdlog::info(<span class="stringliteral">&quot;adding transformations to relocation in symbol: {}&quot;</span>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">name</a>());</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> xed_error_enum_t err;</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> xed_decoded_inst_t inst;</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b};</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> xed_decoded_inst_zero_set_mode(&amp;inst, &amp;istate);</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keywordflow">if</span> ((err = xed_decode(&amp;inst, sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>().data(), sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>().size())) !=</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> XED_ERROR_NONE) {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> spdlog::error(<span class="stringliteral">&quot;failed to decode instruction, reason: {} in symbol: {}&quot;</span>,</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> xed_error_enum_t2str(err), sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">name</a>());</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> assert(err == XED_ERROR_NONE);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> }</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> <span class="keyword">auto</span> transforms_bytes = <a class="code hl_function" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#abb618f5ff8d88963dd77e682456ef982" title="generate a sequence of transformations given an instruction that has a relocation in it.">transform::generate</a>(&amp;inst, reloc.value(), 3, 6);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>().insert(sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">data</a>().end(), transforms_bytes.begin(),</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> transforms_bytes.end());</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span>};</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>std::optional&lt;recomp::reloc_t*&gt; reloc_transform_pass_t::has_legit_reloc(</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> <a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>* sym) {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keyword">auto</span> res = <span class="comment">// see if there are any relocations with offset not equal to</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// zero... relocations with zero mean its a relocation to the next</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="comment">// instruction...</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> std::find_if(</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7" title="returns a vector of relocations.">relocs</a>().begin(), sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7" title="returns a vector of relocations.">relocs</a>().end(),</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> [&amp;](<a class="code hl_class" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html" title="meta data about a relocation for a symbol">recomp::reloc_t</a>&amp; reloc) -&gt; <span class="keywordtype">bool</span> { return reloc.offset(); });</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> <span class="keywordflow">return</span> res != sym-&gt;<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7" title="returns a vector of relocations.">relocs</a>().end() ? &amp;(*res)</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> : std::optional&lt;recomp::reloc_t*&gt;();</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span>}</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>} <span class="comment">// namespace theo::obf</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,250 +0,0 @@
<!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::jcc_rewrite_pass_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">&#160;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&amp;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&amp;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="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">jcc_rewrite_pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::obf::jcc_rewrite_pass_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>jcc rewrite pass which rewrites rip relative jcc's so that they are position independent.
<a href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#details">More...</a></p>
<p><code>#include &quot;<a class="el" href="../../d2/df9/jcc__rewrite__pass_8hpp_source.html">jcc_rewrite_pass.hpp</a>&quot;</code></p>
<div class="dynheader">
Inheritance diagram for theo::obf::jcc_rewrite_pass_t:</div>
<div class="dyncontent">
<div class="center">
<img src="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.png" usemap="#theo::obf::jcc_5Frewrite_5Fpass_5Ft_map" alt=""/>
<map id="theo::obf::jcc_5Frewrite_5Fpass_5Ft_map" name="theo::obf::jcc_5Frewrite_5Fpass_5Ft_map">
<area href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct..." alt="theo::obf::pass_t" shape="rect" coords="0,0,172,24"/>
</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:a5a93eb0945025ef3caefed8c63b65b23"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#a5a93eb0945025ef3caefed8c63b65b23">run</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *sym)</td></tr>
<tr class="memdesc:a5a93eb0945025ef3caefed8c63b65b23"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual method which must be implimented by the pass that inherits this class. <a href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#a5a93eb0945025ef3caefed8c63b65b23">More...</a><br /></td></tr>
<tr class="separator:a5a93eb0945025ef3caefed8c63b65b23"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classtheo_1_1obf_1_1pass__t"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classtheo_1_1obf_1_1pass__t')"><img src="../../closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td></tr>
<tr class="memitem:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a> (<a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a> <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>)</td></tr>
<tr class="memdesc:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">the explicit constructor of the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> base class. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">More...</a><br /></td></tr>
<tr class="separator:abd4ab22cc2822b968267be7f8397d611 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">run</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *sym)=0</td></tr>
<tr class="memdesc:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">virtual method which must be implimented by the pass that inherits this class. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">More...</a><br /></td></tr>
<tr class="separator:acfadc013ff0754d66a18baffdb1a61d1 inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9">decomp::sym_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a> ()</td></tr>
<tr class="memdesc:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the passes symbol type. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">More...</a><br /></td></tr>
<tr class="separator:a46608a6c2dfb8ff657e44be9b50e0dfb inherit pub_methods_classtheo_1_1obf_1_1pass__t"><td class="memSeparator" colspan="2">&#160;</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:afc17278f751fe3f5868c988faffb3c92"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">jcc_rewrite_pass_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#afc17278f751fe3f5868c988faffb3c92">get</a> ()</td></tr>
<tr class="separator:afc17278f751fe3f5868c988faffb3c92"><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 >jcc rewrite pass which rewrites rip relative jcc's so that they are position independent. </p>
<p >given the following code: </p><pre class="fragment">jnz label1
; other code goes here
</pre><p> label1: ; more code here</p>
<p >the jnz instruction will be rewritten so that the following code is generated: </p><pre class="fragment">jnz br2
</pre><p> br1: jmp [rip] ; address after this instruction contains the address ; of the instruction after the jcc. br2: jmp [rip] ; address after this instruction contains the address of where ; branch 2 is located.</p>
<p >its important to note that other passes will encrypt (transform) the address of the next instruction. There is actually no jmp [rip] either, push/ret is used. </p>
<p class="definition">Definition at line <a class="el" href="../../d2/df9/jcc__rewrite__pass_8hpp_source.html#l00061">61</a> of file <a class="el" href="../../d2/df9/jcc__rewrite__pass_8hpp_source.html">jcc_rewrite_pass.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="afc17278f751fe3f5868c988faffb3c92" name="afc17278f751fe3f5868c988faffb3c92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc17278f751fe3f5868c988faffb3c92">&#9670;&nbsp;</a></span>get()</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="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">jcc_rewrite_pass_t</a> * theo::obf::jcc_rewrite_pass_t::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d9/db4/jcc__rewrite__pass_8cpp_source.html#l00035">35</a> of file <a class="el" href="../../d9/db4/jcc__rewrite__pass_8cpp_source.html">jcc_rewrite_pass.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 35</span> {</div>
<div class="line"><span class="lineno"> 36</span> <span class="keyword">static</span> jcc_rewrite_pass_t obj;</div>
<div class="line"><span class="lineno"> 37</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><span class="lineno"> 38</span>}</div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="../../df/d0a/main_8cpp_source.html#l00057">main()</a>.</p>
</div>
</div>
<a id="a5a93eb0945025ef3caefed8c63b65b23" name="a5a93eb0945025ef3caefed8c63b65b23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a93eb0945025ef3caefed8c63b65b23">&#9670;&nbsp;</a></span>run()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void theo::obf::jcc_rewrite_pass_t::run </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *&#160;</td>
<td class="paramname"><em>sym</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>virtual method which must be implimented by the pass that inherits this class. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sym</td><td>a symbol of the same type of m_sym_type.</td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1">theo::obf::pass_t</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../d9/db4/jcc__rewrite__pass_8cpp_source.html#l00040">40</a> of file <a class="el" href="../../d9/db4/jcc__rewrite__pass_8cpp_source.html">jcc_rewrite_pass.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 40</span> {</div>
<div class="line"><span class="lineno"> 41</span> std::int32_t disp = {};</div>
<div class="line"><span class="lineno"> 42</span> xed_decoded_inst_t inst;</div>
<div class="line"><span class="lineno"> 43</span> xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b};</div>
<div class="line"><span class="lineno"> 44</span> xed_decoded_inst_zero_set_mode(&amp;inst, &amp;istate);</div>
<div class="line"><span class="lineno"> 45</span> xed_decode(&amp;inst, sym-&gt;data().data(), XED_MAX_INSTRUCTION_BYTES);</div>
<div class="line"><span class="lineno"> 46</span> </div>
<div class="line"><span class="lineno"> 47</span> <span class="comment">// if the instruction is branching...</span></div>
<div class="line"><span class="lineno"> 48</span> <span class="keywordflow">if</span> ((disp = xed_decoded_inst_get_branch_displacement(&amp;inst))) {</div>
<div class="line"><span class="lineno"> 49</span> disp += xed_decoded_inst_get_length(&amp;inst);</div>
<div class="line"><span class="lineno"> 50</span> </div>
<div class="line"><span class="lineno"> 51</span> <span class="comment">// update displacement...</span></div>
<div class="line"><span class="lineno"> 52</span> xed_decoded_inst_set_branch_displacement(</div>
<div class="line"><span class="lineno"> 53</span> &amp;inst, sym-&gt;data().size() - xed_decoded_inst_get_length(&amp;inst),</div>
<div class="line"><span class="lineno"> 54</span> xed_decoded_inst_get_branch_displacement_width(&amp;inst));</div>
<div class="line"><span class="lineno"> 55</span> </div>
<div class="line"><span class="lineno"> 56</span> xed_encoder_request_init_from_decode(&amp;inst);</div>
<div class="line"><span class="lineno"> 57</span> xed_encoder_request_t* req = &amp;inst;</div>
<div class="line"><span class="lineno"> 58</span> </div>
<div class="line"><span class="lineno"> 59</span> <span class="comment">// update jcc in the buffer...</span></div>
<div class="line"><span class="lineno"> 60</span> std::uint32_t len = {};</div>
<div class="line"><span class="lineno"> 61</span> xed_encode(req, sym-&gt;data().data(), xed_decoded_inst_get_length(&amp;inst),</div>
<div class="line"><span class="lineno"> 62</span> &amp;len);</div>
<div class="line"><span class="lineno"> 63</span> </div>
<div class="line"><span class="lineno"> 64</span> <span class="comment">// create a relocation to the instruction the branch would normally go</span></div>
<div class="line"><span class="lineno"> 65</span> <span class="comment">// too...</span></div>
<div class="line"><span class="lineno"> 66</span> <span class="keyword">auto</span> offset = disp &lt; 0 ? sym-&gt;offset() - std::abs(disp)</div>
<div class="line"><span class="lineno"> 67</span> : sym-&gt;offset() + std::abs(disp);</div>
<div class="line"><span class="lineno"> 68</span> </div>
<div class="line"><span class="lineno"> 69</span> <span class="keyword">auto</span> sym_name =</div>
<div class="line"><span class="lineno"> 70</span> std::string(</div>
<div class="line"><span class="lineno"> 71</span> sym-&gt;sym()-&gt;name.to_string(sym-&gt;img()-&gt;get_strings()).data())</div>
<div class="line"><span class="lineno"> 72</span> .append(<span class="stringliteral">&quot;@&quot;</span>)</div>
<div class="line"><span class="lineno"> 73</span> .append(std::to_string(offset));</div>
<div class="line"><span class="lineno"> 74</span> </div>
<div class="line"><span class="lineno"> 75</span> sym-&gt;relocs().push_back(</div>
<div class="line"><span class="lineno"> 76</span> recomp::reloc_t(0, <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">decomp::symbol_t::hash</a>(sym_name), sym_name.data()));</div>
<div class="line"><span class="lineno"> 77</span> </div>
<div class="line"><span class="lineno"> 78</span> <span class="comment">// run next_inst_pass on this symbol to generate the transformations for the</span></div>
<div class="line"><span class="lineno"> 79</span> <span class="comment">// relocation to the jcc branch dest instruction...</span></div>
<div class="line"><span class="lineno"> 80</span> <a class="code hl_function" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#a964e6f5291ccba0442519f2563b3a2e9">next_inst_pass_t::get</a>()-&gt;<a class="code hl_function" href="../../d5/d08/classtheo_1_1obf_1_1next__inst__pass__t.html#ae4cbba78b14c2b9da794386e4d92f40f" title="virtual method which must be implimented by the pass that inherits this class.">run</a>(sym);</div>
<div class="line"><span class="lineno"> 81</span> }</div>
<div class="line"><span class="lineno"> 82</span>};</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00076">theo::decomp::symbol_t::data()</a>, <a class="el" href="../../df/d7d/next__inst__pass_8cpp_source.html#l00034">theo::obf::next_inst_pass_t::get()</a>, <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00088">theo::decomp::symbol_t::hash()</a>, <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00068">theo::decomp::symbol_t::img()</a>, <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00056">theo::decomp::symbol_t::offset()</a>, <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00096">theo::decomp::symbol_t::relocs()</a>, <a class="el" href="../../df/d7d/next__inst__pass_8cpp_source.html#l00038">theo::obf::next_inst_pass_t::run()</a>, and <a class="el" href="../../d8/d67/symbol_8cpp_source.html#l00092">theo::decomp::symbol_t::sym()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/obf/passes/<a class="el" href="../../d2/df9/jcc__rewrite__pass_8hpp_source.html">jcc_rewrite_pass.hpp</a></li>
<li>src/obf/passes/<a class="el" href="../../d9/db4/jcc__rewrite__pass_8cpp_source.html">jcc_rewrite_pass.cpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 656 B

@ -1,109 +0,0 @@
<!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: include/obf/transform/transform.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> &#124;
<a href="#var-members">Variables</a> </div>
<div class="headertitle"><div class="title">transform.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d1/def/add__op_8hpp_source.html">obf/transform/add_op.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d6/d8a/rol__op_8hpp_source.html">obf/transform/rol_op.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../da/d34/ror__op_8hpp_source.html">obf/transform/ror_op.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d8/da9/sub__op_8hpp_source.html">obf/transform/sub_op.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d0/da4/xor__op_8hpp_source.html">obf/transform/xor_op.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d6/deb/transform_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a></td></tr>
<tr class="memdesc:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses the code for transforming relocations. <br /></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 id="var-members" 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, operation_t * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0">theo::obf::transform::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="../../d8/d82/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>
</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.3
</small></address>
</body>
</html>

@ -1,128 +0,0 @@
<!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: include/obf/transform/transform.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">transform.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d6/deb/transform_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d1/def/add__op_8hpp.html">obf/transform/add_op.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;<a class="code" href="../../d6/d8a/rol__op_8hpp.html">obf/transform/rol_op.hpp</a>&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;<a class="code" href="../../da/d34/ror__op_8hpp.html">obf/transform/ror_op.hpp</a>&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#include &lt;<a class="code" href="../../d8/da9/sub__op_8hpp.html">obf/transform/sub_op.hpp</a>&gt;</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#include &lt;<a class="code" href="../../d0/da4/xor__op_8hpp.html">obf/transform/xor_op.hpp</a>&gt;</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html" title="this namespace encompasses the code for transforming relocations.">theo::obf::transform</a> {<span class="comment"></span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">/// map of all of the operations and their type.</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0"> 42</a></span><span class="comment"></span><span class="keyword">inline</span> std::map&lt;xed_iclass_enum_t, operation_t*&gt; <a class="code hl_variable" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0" title="map of all of the operations and their type.">operations</a> = {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> {XED_ICLASS_ADD, <a class="code hl_function" href="../../d5/d9f/classtheo_1_1obf_1_1transform_1_1add__op__t.html#a73d8d592c092482231fb5321ded6e83b">add_op_t::get</a>()},</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> {XED_ICLASS_SUB, <a class="code hl_function" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html#a297c6d5c62d62d61573ba041f61e9763">sub_op_t::get</a>()},</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> {XED_ICLASS_ROL, <a class="code hl_function" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html#ade2c667c209f2a27f03712f6b151594b">rol_op_t::get</a>()},</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> {XED_ICLASS_ROR, <a class="code hl_function" href="../../db/d8f/classtheo_1_1obf_1_1transform_1_1ror__op__t.html#ae7e2ffd49a75aacea4eed4a416537d1c">ror_op_t::get</a>()},</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> {XED_ICLASS_XOR, <a class="code hl_function" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html#adaca6aff562bd3f37176b569a898f8b4">xor_op_t::get</a>()}};</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span>} <span class="comment">// namespace theo::obf::transform</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,90 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">rol_op_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::transform::rol_op_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">theo::obf::transform::rol_op_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html#ade2c667c209f2a27f03712f6b151594b">get</a>()</td><td class="entry"><a class="el" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1rol__op__t.html">theo::obf::transform::rol_op_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aed18bfd26da1a198f3b5f81525bcbb66">get_transform</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a91f9b94436d49659aaabb291786b3c7b">inverse</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><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><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4">operation_t</a>(transform_t op, xed_iclass_enum_t type)</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="odd"><td class="entry"><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><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f">type</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,87 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">hello_world_pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::hello_world_pass_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">theo::obf::hello_world_pass_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html#aa556436f48335fe485d96ebc44ac2293">get</a>()</td><td class="entry"><a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">theo::obf::hello_world_pass_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a>(decomp::sym_type_t sym_type)</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html#a0d2d95f93ac083e157b2f12a8a56f1df">run</a>(decomp::symbol_t *sym)</td><td class="entry"><a class="el" href="../../d5/d6a/classtheo_1_1obf_1_1hello__world__pass__t.html">theo::obf::hello_world_pass_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">virtual</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>()</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,98 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d9/dbd/namespacetheo_1_1decomp.html">decomp</a></li><li class="navelem"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">symbol_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::decomp::symbol_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47">allocated_at</a>() const</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a79bec0c7338f2c08739ea6547745cc3b">allocated_at</a>(std::uintptr_t allocated_at)</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b">data</a>()</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06">hash</a>()</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a88481ad95d28f9c54c349f0e43de8970">hash</a>(const std::string &amp;sym)</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665">img</a>() const</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a">name</a>() const</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a2bef3a0869fee4979918405c5ed8f692">name</a>(const coff::image_t *img, coff::symbol_t *sym)</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a79759d343ddb6a62e4149aef92e2d70b">offset</a>() const</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7">relocs</a>()</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd">scn</a>() const</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae33f1452b01fe80f9c384241b9fe6286">size</a>() const</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9">sym</a>() const</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa7247dcb735176b6ed9246d035e7a215">symbol_t</a>(coff::image_t *img, std::string name, std::uintptr_t offset, std::vector&lt; std::uint8_t &gt; data, coff::section_header_t *scn={}, coff::symbol_t *sym={}, std::vector&lt; recomp::reloc_t &gt; relocs={}, sym_type_t dcmp_type={})</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a16587cddd37cd45d9ec6cd25c229e8d1">type</a>() const</td><td class="entry"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">theo::decomp::symbol_t</a></td><td class="entry"></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,87 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">jcc_rewrite_pass_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::jcc_rewrite_pass_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">theo::obf::jcc_rewrite_pass_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#afc17278f751fe3f5868c988faffb3c92">get</a>()</td><td class="entry"><a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">theo::obf::jcc_rewrite_pass_t</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611">pass_t</a>(decomp::sym_type_t sym_type)</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html#a5a93eb0945025ef3caefed8c63b65b23">run</a>(decomp::symbol_t *sym)</td><td class="entry"><a class="el" href="../../d6/dc1/classtheo_1_1obf_1_1jcc__rewrite__pass__t.html">theo::obf::jcc_rewrite_pass_t</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb">sym_type</a>()</td><td class="entry"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,414 +0,0 @@
<!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">&#160;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&amp;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&amp;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> &#124;
<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 &quot;<a class="el" href="../../d5/da4/operation_8hpp_source.html">operation.hpp</a>&quot;</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">&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a30cad572f62baf0c10fdc7026d7cba44"><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="../../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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a91f9b94436d49659aaabb291786b3c7b"><td class="memItemLeft" align="right" valign="top">xed_iclass_enum_t&#160;</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">&#160;</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">&#160;</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> *&#160;</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">&#160;</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">&#160;</td></tr>
<tr class="memitem:a8558c2a8e78ef8da59674396bc76157f"><td class="memItemLeft" align="right" valign="top">xed_iclass_enum_t&#160;</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">&#160;</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">&#160;</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&#160;</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">&#160;</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">&#160;</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 &amp; Destructor Documentation</h2>
<a id="a3876ca1c7904aed54940e1519fc9fdf4" name="a3876ca1c7904aed54940e1519fc9fdf4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3876ca1c7904aed54940e1519fc9fdf4">&#9670;&nbsp;</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>&#160;</td>
<td class="paramname"><em>op</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">xed_iclass_enum_t&#160;</td>
<td class="paramname"><em>type</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 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">&#9670;&nbsp;</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> &amp;m_transform; }</div>
</div><!-- fragment -->
</div>
</div>
<a id="a91f9b94436d49659aaabb291786b3c7b" name="a91f9b94436d49659aaabb291786b3c7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a91f9b94436d49659aaabb291786b3c7b">&#9670;&nbsp;</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">&#9670;&nbsp;</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&lt; std::uint8_t &gt; theo::obf::transform::operation_t::native </td>
<td>(</td>
<td class="paramtype">const xed_decoded_inst_t *&#160;</td>
<td class="paramname"><em>inst</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::uint32_t&#160;</td>
<td class="paramname"><em>imm</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>generates a native transform instruction given an existing instruction. it works like so: </p>
<p >mov rax, &amp;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), &amp;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">&quot;failed to encode instruction... reason: {}&quot;</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&lt;std::uint8_t&gt;(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">&#9670;&nbsp;</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&#160;</td>
<td class="paramname"><em>lowest</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>largest</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 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&lt;std::size_t&gt; 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">&#9670;&nbsp;</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&#160;<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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

@ -1,129 +0,0 @@
<!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: include/obf/pass.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> </div>
<div class="headertitle"><div class="title">pass.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;spdlog/spdlog.h&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d6/d62/symbol_8hpp_source.html">decomp/symbol.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d5/d18/gen_8hpp_source.html">obf/transform/gen.hpp</a>&gt;</code><br />
<code>#include &lt;xed-decode.h&gt;</code><br />
<code>#include &lt;xed-interface.h&gt;</code><br />
</div>
<p><a href="../../d8/d5a/pass_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">theo::obf::pass_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> class is a base clase for all passes made. you must override the <a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1" title="virtual method which must be implimented by the pass that inherits this class.">pass_t::run</a> virtual function and declare the logic of your pass there. <a href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#details">More...</a><br /></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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></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 id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a3925943d185a09ad9e32ed8637ccb533"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d5a/pass_8hpp.html#a3925943d185a09ad9e32ed8637ccb533">XED_ENCODER</a></td></tr>
<tr class="separator:a3925943d185a09ad9e32ed8637ccb533"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a3925943d185a09ad9e32ed8637ccb533" name="a3925943d185a09ad9e32ed8637ccb533"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3925943d185a09ad9e32ed8637ccb533">&#9670;&nbsp;</a></span>XED_ENCODER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define XED_ENCODER</td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="../../d8/d5a/pass_8hpp_source.html#l00036">36</a> of file <a class="el" href="../../d8/d5a/pass_8hpp_source.html">pass.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.3
</small></address>
</body>
</html>

@ -1,161 +0,0 @@
<!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: include/obf/pass.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">pass.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d8/d5a/pass_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;spdlog/spdlog.h&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &lt;<a class="code" href="../../d6/d62/symbol_8hpp.html">decomp/symbol.hpp</a>&gt;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#include &lt;<a class="code" href="../../d5/d18/gen_8hpp.html">obf/transform/gen.hpp</a>&gt;</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="../../d8/d5a/pass_8hpp.html#a3925943d185a09ad9e32ed8637ccb533"> 36</a></span><span class="preprocessor">#define XED_ENCODER</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor">#include &lt;xed-decode.h&gt;</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="preprocessor">#include &lt;xed-interface.h&gt;</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span>}</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="comment"></span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">/// this is the main namespace for obfuscation related things.</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment"></span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d5/da8/namespacetheo_1_1obf.html" title="this is the main namespace for obfuscation related things.">theo::obf</a> {</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="comment"></span> </div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="comment">/// &lt;summary&gt;</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">/// the pass_t class is a base clase for all passes made. you must override the</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment">/// pass_t::run virtual function and declare the logic of your pass there.</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="comment">///</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="comment">/// in the constructor of your pass you must call the super constructor (the</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/// pass_t constructor) and pass it the type of symbol which you are interesting</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="comment">/// in receiving.</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="comment">/// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html"> 55</a></span><span class="comment"></span><span class="keyword">class </span><a class="code hl_class" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html" title="the pass_t class is a base clase for all passes made. you must override the pass_t::run virtual funct...">pass_t</a> {</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> <span class="keyword">public</span>:<span class="comment"></span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span><span class="comment"> /// the explicit constructor of the pass_t base class.</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span><span class="comment"> /// &lt;param name=&quot;sym_type&quot;&gt;the type of symbol in which the pass will run on.</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span><span class="comment"> /// every symbol passed to the virtual &quot;run&quot; instruction will be of this</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span><span class="comment"> /// type.&lt;/param&gt;</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611"> 63</a></span><span class="comment"></span> <span class="keyword">explicit</span> <a class="code hl_function" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#abd4ab22cc2822b968267be7f8397d611" title="the explicit constructor of the pass_t base class.">pass_t</a>(<a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">decomp::sym_type_t</a> <a class="code hl_function" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb" title="gets the passes symbol type.">sym_type</a>) : m_sym_type(<a class="code hl_function" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb" title="gets the passes symbol type.">sym_type</a>){};</div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span><span class="comment"></span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span><span class="comment"> /// virtual method which must be implimented by the pass that inherits this</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="comment"> /// class.</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="comment"> /// &lt;param name=&quot;sym&quot;&gt;a symbol of the same type of m_sym_type.&lt;/param&gt;</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1"> 70</a></span><span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#acfadc013ff0754d66a18baffdb1a61d1" title="virtual method which must be implimented by the pass that inherits this class.">run</a>(<a class="code hl_class" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html" title="symbol_t is an abstraction upon the coff symbol. this allows for easier manipulation of the symbol....">decomp::symbol_t</a>* sym) = 0;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="comment"></span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span><span class="comment"> /// &lt;summary&gt;</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span><span class="comment"> /// gets the passes symbol type.</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span><span class="comment"> /// &lt;/summary&gt;</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span><span class="comment"> /// &lt;returns&gt;the passes symbol type.&lt;/returns&gt;</span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb"> 76</a></span><span class="comment"></span> <a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">decomp::sym_type_t</a> <a class="code hl_function" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html#a46608a6c2dfb8ff657e44be9b50e0dfb" title="gets the passes symbol type.">sym_type</a>() { <span class="keywordflow">return</span> m_sym_type; }</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">decomp::sym_type_t</a> m_sym_type;</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span>};</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span>} <span class="comment">// namespace theo::obf</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,95 +0,0 @@
<!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: src/decomp/symbol.cpp File 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">&#160;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&amp;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&amp;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="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_1a96c2bb8e6464c69de5f985611044b4.html">decomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">symbol.cpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d6/d62/symbol_8hpp_source.html">decomp/symbol.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d8/d67/symbol_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d9/dbd/namespacetheo_1_1decomp"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/dbd/namespacetheo_1_1decomp.html">theo::decomp</a></td></tr>
<tr class="memdesc:d9/dbd/namespacetheo_1_1decomp"><td class="mdescLeft">&#160;</td><td class="mdescRight">the namespace that contains all of the decomposition related code. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,201 +0,0 @@
<!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: src/decomp/symbol.cpp Source File</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">&#160;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&amp;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&amp;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="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_1a96c2bb8e6464c69de5f985611044b4.html">decomp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">symbol.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d8/d67/symbol_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#include &lt;<a class="code" href="../../d6/d62/symbol_8hpp.html">decomp/symbol.hpp</a>&gt;</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d9/dbd/namespacetheo_1_1decomp.html" title="the namespace that contains all of the decomposition related code.">theo::decomp</a> {</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa7247dcb735176b6ed9246d035e7a215"> 34</a></span><a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa7247dcb735176b6ed9246d035e7a215" title="the explicit constructor of this symbol.">symbol_t::symbol_t</a>(coff::image_t* img,</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> std::string name,</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> std::uintptr_t offset,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> std::vector&lt;std::uint8_t&gt; <a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">data</a>,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> coff::section_header_t* scn,</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> coff::symbol_t* sym,</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> std::vector&lt;recomp::reloc_t&gt; relocs,</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">sym_type_t</a> dcmp_type)</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> : m_name(name),</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> m_offset(offset),</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> m_data(<a class="code hl_enumvalue" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9acdb885c0ea7f6b2874224487c69b8112">data</a>),</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> m_scn(scn),</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> m_relocs(relocs),</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> m_sym_type(dcmp_type),</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> m_sym(sym),</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> m_img(img),</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> m_allocated_at(0) {}</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a"> 52</a></span>std::string <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">symbol_t::name</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> <span class="keywordflow">return</span> m_name;</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span>}</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a79759d343ddb6a62e4149aef92e2d70b"> 56</a></span>std::uintptr_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a79759d343ddb6a62e4149aef92e2d70b" title="gets the offset into the section where the symbol is located.">symbol_t::offset</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="keywordflow">return</span> m_offset;</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span>}</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47"> 60</a></span>std::uintptr_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47" title="returns the address where the symbol is allocated.">symbol_t::allocated_at</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">return</span> m_allocated_at;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>}</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd"> 64</a></span>coff::section_header_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd" title="gets the section header of the section in which the symbol is contained.">symbol_t::scn</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordflow">return</span> m_scn;</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span>}</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665"> 68</a></span>coff::image_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665" title="gets the imagine in which the symbol is located inside of.">symbol_t::img</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keywordflow">return</span> m_img;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span>}</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae33f1452b01fe80f9c384241b9fe6286"> 72</a></span>std::uint32_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae33f1452b01fe80f9c384241b9fe6286" title="returns the size of the symbol.">symbol_t::size</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> <span class="keywordflow">return</span> m_data.size();</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span>}</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b"> 76</a></span>std::vector&lt;std::uint8_t&gt;&amp; <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#aa3ecf0b480d10bffe68812409c06d61b" title="returns a vector by reference of bytes containing the data of the symbol.">symbol_t::data</a>() {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <span class="keywordflow">return</span> m_data;</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span>}</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a16587cddd37cd45d9ec6cd25c229e8d1"> 80</a></span><a class="code hl_enumeration" href="../../d9/dbd/namespacetheo_1_1decomp.html#af96177687d0ad683c5897d8fa01135f9" title="meta symbol type. this is an abstraction upon the coff symbol storage/class type.">sym_type_t</a> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a16587cddd37cd45d9ec6cd25c229e8d1" title="returns the type of the symbol.">symbol_t::type</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> <span class="keywordflow">return</span> m_sym_type;</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span>}</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a79bec0c7338f2c08739ea6547745cc3b"> 84</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47" title="returns the address where the symbol is allocated.">symbol_t::allocated_at</a>(std::uintptr_t allocated_at) {</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> m_allocated_at = <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ae92f3e35fba82a1d16a58ad09b39fb47" title="returns the address where the symbol is allocated.">allocated_at</a>;</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span>}</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06"> 88</a></span>std::size_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">symbol_t::hash</a>() {</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">return</span> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">hash</a>(m_name);</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span>}</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9"> 92</a></span>coff::symbol_t* <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">symbol_t::sym</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> <span class="keywordflow">return</span> m_sym;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span>}</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7"> 96</a></span>std::vector&lt;recomp::reloc_t&gt;&amp; <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#abc158e1dc1567161f0a57ed15fc718f7" title="returns a vector of relocations.">symbol_t::relocs</a>() {</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">return</span> m_relocs;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span>}</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a88481ad95d28f9c54c349f0e43de8970"> 100</a></span>std::size_t <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a8695d75670cc4d61d275464e9109ff06" title="gets the hash of the symbol name.">symbol_t::hash</a>(<span class="keyword">const</span> std::string&amp; sym) {</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> <span class="keywordflow">return</span> std::hash&lt;std::string&gt;{}(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span>}</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a2bef3a0869fee4979918405c5ed8f692"> 104</a></span>std::string <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a7c6dee036291ded334aa10d89293fc2a" title="gets the name of the symbol.">symbol_t::name</a>(<span class="keyword">const</span> coff::image_t* img, coff::symbol_t* sym) {</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordflow">if</span> (<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>-&gt;has_section() &amp;&amp;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>-&gt;storage_class == coff::storage_class_id::private_symbol &amp;&amp;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>-&gt;derived_type == coff::derived_type_id::none) {</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> <span class="keyword">auto</span> <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd" title="gets the section header of the section in which the symbol is contained.">scn</a> = <a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665" title="gets the imagine in which the symbol is located inside of.">img</a>-&gt;get_section(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>-&gt;section_index - 1);</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> <span class="keyword">auto</span> res = std::string(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a64d51dabe91687ed40c3942d106fd7dd" title="gets the section header of the section in which the symbol is contained.">scn</a>-&gt;name.to_string(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665" title="gets the imagine in which the symbol is located inside of.">img</a>-&gt;get_strings()).data())</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> .append(<span class="stringliteral">&quot;#&quot;</span>)</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> .append(std::to_string(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>-&gt;section_index))</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> .append(<span class="stringliteral">&quot;!&quot;</span>)</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> .append(std::to_string(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665" title="gets the imagine in which the symbol is located inside of.">img</a>-&gt;file_header.timedate_stamp))</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> .append(<span class="stringliteral">&quot;+&quot;</span>)</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> .append(std::to_string(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>-&gt;value));</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> <span class="keywordflow">return</span> res;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> }</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> <span class="keywordflow">return</span> std::string(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#a0e6f850f25a51609fbe5dc0a61b27bc9" title="returns a pointer to the coff symbol object.">sym</a>-&gt;name.to_string(<a class="code hl_function" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html#ad97ad0395e18dcfb42017fb7753e0665" title="gets the imagine in which the symbol is located inside of.">img</a>-&gt;get_strings()));</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span>}</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span>} <span class="comment">// namespace theo::decomp</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,287 +0,0 @@
<!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 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 id="projectrow">
<td id="projectlogo"><img alt="Logo" src="../../icon.png"/></td>
<td id="projectalign">
<div id="projectname">Theodosius<span id="projectnumber">&#160;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&amp;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&amp;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> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</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="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d5/d9f/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="../../d7/de2/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="../../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><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="../../d6/d52/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="../../db/d8f/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="../../d6/d52/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="../../da/db7/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 id="typedef-members" 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="../../d8/d82/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="../../d8/d82/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 id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:abb618f5ff8d88963dd77e682456ef982"><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="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#abb618f5ff8d88963dd77e682456ef982">generate</a> (xed_decoded_inst_t *inst, <a class="el" href="../../dd/d37/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:abb618f5ff8d88963dd77e682456ef982"><td class="mdescLeft">&#160;</td><td class="mdescRight">generate a sequence of transformations given an instruction that has a relocation in it. <a href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#abb618f5ff8d88963dd77e682456ef982">More...</a><br /></td></tr>
<tr class="separator:abb618f5ff8d88963dd77e682456ef982"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" 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="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">operation_t</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/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="../../d8/d82/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" name="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="../../d8/d82/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="../../d5/da4/operation_8hpp_source.html#l00054">54</a> of file <a class="el" href="../../d5/da4/operation_8hpp_source.html">operation.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="abb618f5ff8d88963dd77e682456ef982" name="abb618f5ff8d88963dd77e682456ef982"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb618f5ff8d88963dd77e682456ef982">&#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="../../dd/d37/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="../../d5/d18/gen_8hpp_source.html#l00045">45</a> of file <a class="el" href="../../d5/d18/gen_8hpp_source.html">gen.hpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 48</span> {</div>
<div class="line"><span class="lineno"> 49</span> <span class="keyword">auto</span> num_transforms = transform::operation_t::random(low, high);</div>
<div class="line"><span class="lineno"> 50</span> <span class="keyword">auto</span> num_ops = <a class="code hl_variable" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0" title="map of all of the operations and their type.">transform::operations</a>.size();</div>
<div class="line"><span class="lineno"> 51</span> std::vector&lt;std::uint8_t&gt; new_inst_bytes;</div>
<div class="line"><span class="lineno"> 52</span> </div>
<div class="line"><span class="lineno"> 53</span> std::uint32_t inst_len = {};</div>
<div class="line"><span class="lineno"> 54</span> std::uint8_t inst_buff[XED_MAX_INSTRUCTION_BYTES];</div>
<div class="line"><span class="lineno"> 55</span> xed_encoder_request_t req;</div>
<div class="line"><span class="lineno"> 56</span> </div>
<div class="line"><span class="lineno"> 57</span> xed_state_t istate{XED_MACHINE_MODE_LONG_64, XED_ADDRESS_WIDTH_64b};</div>
<div class="line"><span class="lineno"> 58</span> xed_encoder_request_zero_set_mode(&amp;req, &amp;istate);</div>
<div class="line"><span class="lineno"> 59</span> xed_encoder_request_set_effective_operand_width(&amp;req, 64);</div>
<div class="line"><span class="lineno"> 60</span> xed_encoder_request_set_iclass(&amp;req, XED_ICLASS_PUSHFQ);</div>
<div class="line"><span class="lineno"> 61</span> xed_encode(&amp;req, inst_buff, <span class="keyword">sizeof</span>(inst_buff), &amp;inst_len);</div>
<div class="line"><span class="lineno"> 62</span> new_inst_bytes.insert(new_inst_bytes.end(), inst_buff, inst_buff + inst_len);</div>
<div class="line"><span class="lineno"> 63</span> </div>
<div class="line"><span class="lineno"> 64</span> <span class="keywordflow">for</span> (<span class="keyword">auto</span> cnt = 0u; cnt &lt; num_transforms; ++cnt) {</div>
<div class="line"><span class="lineno"> 65</span> std::uint32_t imm = transform::operation_t::random(</div>
<div class="line"><span class="lineno"> 66</span> 0, std::numeric_limits&lt;std::int32_t&gt;::max());</div>
<div class="line"><span class="lineno"> 67</span> </div>
<div class="line"><span class="lineno"> 68</span> <span class="keyword">auto</span> itr = <a class="code hl_variable" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0" title="map of all of the operations and their type.">transform::operations</a>.begin();</div>
<div class="line"><span class="lineno"> 69</span> std::advance(itr, transform::operation_t::random(0, num_ops - 1));</div>
<div class="line"><span class="lineno"> 70</span> <span class="keyword">auto</span> transform_bytes = itr-&gt;second-&gt;native(inst, imm);</div>
<div class="line"><span class="lineno"> 71</span> new_inst_bytes.insert(new_inst_bytes.end(), transform_bytes.begin(),</div>
<div class="line"><span class="lineno"> 72</span> transform_bytes.end());</div>
<div class="line"><span class="lineno"> 73</span> </div>
<div class="line"><span class="lineno"> 74</span> reloc-&gt;<a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#ab5214a9ff9135672e25f40406c37fb10" title="adds a transformation to be applied to the relocation prior to writing it into the symbol.">add_transform</a>(</div>
<div class="line"><span class="lineno"> 75</span> {<a class="code hl_variable" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html#a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0" title="map of all of the operations and their type.">transform::operations</a>[itr-&gt;second-&gt;inverse()]-&gt;get_transform(), imm});</div>
<div class="line"><span class="lineno"> 76</span> }</div>
<div class="line"><span class="lineno"> 77</span> </div>
<div class="line"><span class="lineno"> 78</span> xed_encoder_request_zero_set_mode(&amp;req, &amp;istate);</div>
<div class="line"><span class="lineno"> 79</span> xed_encoder_request_set_effective_operand_width(&amp;req, 64);</div>
<div class="line"><span class="lineno"> 80</span> xed_encoder_request_set_iclass(&amp;req, XED_ICLASS_POPFQ);</div>
<div class="line"><span class="lineno"> 81</span> xed_encode(&amp;req, inst_buff, <span class="keyword">sizeof</span>(inst_buff), &amp;inst_len);</div>
<div class="line"><span class="lineno"> 82</span> new_inst_bytes.insert(new_inst_bytes.end(), inst_buff, inst_buff + inst_len);</div>
<div class="line"><span class="lineno"> 83</span> </div>
<div class="line"><span class="lineno"> 84</span> <span class="comment">// inverse the order in which the transformations are executed...</span></div>
<div class="line"><span class="lineno"> 85</span> <span class="comment">//</span></div>
<div class="line"><span class="lineno"> 86</span> std::reverse(reloc-&gt;<a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#af8abfa7a4f1052308a233629faf39a78" title="gets the vector of transformation.">get_transforms</a>().begin(), reloc-&gt;<a class="code hl_function" href="../../dd/d37/classtheo_1_1recomp_1_1reloc__t.html#af8abfa7a4f1052308a233629faf39a78" title="gets the vector of transformation.">get_transforms</a>().end());</div>
<div class="line"><span class="lineno"> 87</span> <span class="keywordflow">return</span> new_inst_bytes;</div>
<div class="line"><span class="lineno"> 88</span>}</div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="../../d1/d82/reloc_8hpp_source.html#l00091">theo::recomp::reloc_t::add_transform()</a>, <a class="el" href="../../d1/d82/reloc_8hpp_source.html#l00101">theo::recomp::reloc_t::get_transforms()</a>, <a class="el" href="../../d6/deb/transform_8hpp_source.html#l00042">operations</a>, and <a class="el" href="../../d5/da4/operation_8hpp_source.html#l00148">theo::obf::transform::operation_t::random()</a>.</p>
<p class="reference">Referenced by <a class="el" href="../../df/d7d/next__inst__pass_8cpp_source.html#l00038">theo::obf::next_inst_pass_t::run()</a>, and <a class="el" href="../../d6/da4/reloc__transform__pass_8cpp_source.html#l00039">theo::obf::reloc_transform_pass_t::run()</a>.</p>
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a6a4b1d5c0c9c2ea1f0b4ec8f5aba48b0" name="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="../../d7/de2/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="../../d6/deb/transform_8hpp_source.html#l00042">42</a> of file <a class="el" href="../../d6/deb/transform_8hpp_source.html">transform.hpp</a>.</p>
<p class="reference">Referenced by <a class="el" href="../../d5/d18/gen_8hpp_source.html#l00045">generate()</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.3
</small></address>
</body>
</html>

@ -1,104 +0,0 @@
<!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: include/obf/transform/sub_op.hpp File 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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#namespaces">Namespaces</a> </div>
<div class="headertitle"><div class="title">sub_op.hpp File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d5/da4/operation_8hpp_source.html">obf/transform/operation.hpp</a>&gt;</code><br />
</div>
<p><a href="../../d8/da9/sub__op_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Data Structures</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="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">theo::obf::transform::sub_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 id="namespaces" name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:da/de6/namespacetheo"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/de6/namespacetheo.html">theo</a></td></tr>
<tr class="memdesc:da/de6/namespacetheo"><td class="mdescLeft">&#160;</td><td class="mdescRight">The outer most encompassing namespace of this project. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d5/da8/namespacetheo_1_1obf"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/da8/namespacetheo_1_1obf.html">theo::obf</a></td></tr>
<tr class="memdesc:d5/da8/namespacetheo_1_1obf"><td class="mdescLeft">&#160;</td><td class="mdescRight">this is the main namespace for obfuscation related things. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="memItemLeft" align="right" valign="top">namespace &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html">theo::obf::transform</a></td></tr>
<tr class="memdesc:d8/d82/namespacetheo_1_1obf_1_1transform"><td class="mdescLeft">&#160;</td><td class="mdescRight">this namespace encompasses the code for transforming relocations. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</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.3
</small></address>
</body>
</html>

@ -1,127 +0,0 @@
<!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: include/obf/transform/sub_op.hpp Source File</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">&#160;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&amp;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&amp;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="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_ef99456410776b930b88f5850437ce61.html">obf</a></li><li class="navelem"><a class="el" href="../../dir_fa1ee7704f0ab8e5fd961a68bf21be50.html">transform</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">sub_op.hpp</div></div>
</div><!--header-->
<div class="contents">
<a href="../../d8/da9/sub__op_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">// Copyright (c) 2022, _xeroxz</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">// All rights reserved.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">// Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment">// modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment">//</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment">// 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment">// this list of conditions and the following disclaimer.</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">// 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">// this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">// and/or other materials provided with the distribution.</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">// 3. Neither the name of the copyright holder nor the names of its</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">// contributors may be used to endorse or promote products derived from</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment">// this software without specific prior written permission.</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment">//</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment">// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment">// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment">// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment">// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">// POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">//</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &lt;<a class="code" href="../../d5/da4/operation_8hpp.html">obf/transform/operation.hpp</a>&gt;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="keyword">namespace </span><a class="code hl_namespace" href="../../d8/d82/namespacetheo_1_1obf_1_1transform.html" title="this namespace encompasses the code for transforming relocations.">theo::obf::transform</a> {</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html"> 35</a></span><span class="keyword">class </span><a class="code hl_class" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a> : <span class="keyword">public</span> <a class="code hl_class" 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> {</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> <span class="keyword">explicit</span> <a class="code hl_class" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a>()</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> : <a class="code hl_function" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4" title="explicit constructor for operation_t">operation_t</a>([&amp;](std::size_t val,</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> std::uint32_t imm) -&gt; std::size_t { <span class="keywordflow">return</span> val - imm; },</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> XED_ICLASS_SUB) {}</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html#a297c6d5c62d62d61573ba041f61e9763"> 42</a></span> <span class="keyword">static</span> <a class="code hl_class" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a>* <a class="code hl_function" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html#a297c6d5c62d62d61573ba041f61e9763">get</a>() {</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keyword">static</span> <a class="code hl_class" href="../../d6/d52/classtheo_1_1obf_1_1transform_1_1sub__op__t.html">sub_op_t</a> obj;</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span>};</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>} <span class="comment">// namespace theo::obf::transform</span></div>
</div><!-- fragment --></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.3
</small></address>
</body>
</html>

@ -1,90 +0,0 @@
<!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: Member List</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">&#160;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.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;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&amp;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="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">xor_op_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">theo::obf::transform::xor_op_t Member List</div></div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">theo::obf::transform::xor_op_t</a>, including all inherited members.</p>
<table class="directory">
<tr class="even"><td class="entry"><a class="el" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html#adaca6aff562bd3f37176b569a898f8b4">get</a>()</td><td class="entry"><a class="el" href="../../da/db7/classtheo_1_1obf_1_1transform_1_1xor__op__t.html">theo::obf::transform::xor_op_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="odd"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#aed18bfd26da1a198f3b5f81525bcbb66">get_transform</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a91f9b94436d49659aaabb291786b3c7b">inverse</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="odd"><td class="entry"><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><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a3876ca1c7904aed54940e1519fc9fdf4">operation_t</a>(transform_t op, xed_iclass_enum_t type)</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">explicit</span></td></tr>
<tr class="odd"><td class="entry"><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><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html#a8558c2a8e78ef8da59674396bc76157f">type</a>()</td><td class="entry"><a class="el" href="../../d7/de2/classtheo_1_1obf_1_1transform_1_1operation__t.html">theo::obf::transform::operation_t</a></td><td class="entry"><span class="mlabel">inline</span></td></tr>
</table></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.3
</small></address>
</body>
</html>

@ -1,214 +0,0 @@
<!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::engine_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">&#160;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&amp;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&amp;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="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">engine_t</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle"><div class="title">theo::obf::engine_t Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them.
<a href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#details">More...</a></p>
<p><code>#include &quot;<a class="el" href="../../de/d46/engine_8hpp_source.html">engine.hpp</a>&quot;</code></p>
<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:a8ffc963a133653fa3a0875798d0d3426"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a8ffc963a133653fa3a0875798d0d3426">add_pass</a> (<a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">pass_t</a> *pass)</td></tr>
<tr class="memdesc:a8ffc963a133653fa3a0875798d0d3426"><td class="mdescLeft">&#160;</td><td class="mdescRight">add a pass to the engine. the order in which you call this function matters as the underlying data structure that contains the passes is a vector. <a href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a8ffc963a133653fa3a0875798d0d3426">More...</a><br /></td></tr>
<tr class="separator:a8ffc963a133653fa3a0875798d0d3426"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7acfdbe9c229cf1f351cec610ab193d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a7acfdbe9c229cf1f351cec610ab193d3">run</a> (<a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *sym)</td></tr>
<tr class="memdesc:a7acfdbe9c229cf1f351cec610ab193d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">run all the passes on the symbol. this function will only run a pass if the symbol is the same type as the pass requires. <a href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a7acfdbe9c229cf1f351cec610ab193d3">More...</a><br /></td></tr>
<tr class="separator:a7acfdbe9c229cf1f351cec610ab193d3"><td class="memSeparator" colspan="2">&#160;</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:a58715f5c3ade824a65e602aba570040e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">engine_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a58715f5c3ade824a65e602aba570040e">get</a> ()</td></tr>
<tr class="memdesc:a58715f5c3ade824a65e602aba570040e"><td class="mdescLeft">&#160;</td><td class="mdescRight">get the singleton object of this class. <a href="../../d9/d18/classtheo_1_1obf_1_1engine__t.html#a58715f5c3ade824a65e602aba570040e">More...</a><br /></td></tr>
<tr class="separator:a58715f5c3ade824a65e602aba570040e"><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 >singleton obfuscation engine class. this class is responsible for keeping track of the registered passes and the order in which to execute them. </p>
<p class="definition">Definition at line <a class="el" href="../../de/d46/engine_8hpp_source.html#l00042">42</a> of file <a class="el" href="../../de/d46/engine_8hpp_source.html">engine.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a8ffc963a133653fa3a0875798d0d3426" name="a8ffc963a133653fa3a0875798d0d3426"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ffc963a133653fa3a0875798d0d3426">&#9670;&nbsp;</a></span>add_pass()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void theo::obf::engine_t::add_pass </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d4/dad/classtheo_1_1obf_1_1pass__t.html">pass_t</a> *&#160;</td>
<td class="paramname"><em>pass</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>add a pass to the engine. the order in which you call this function matters as the underlying data structure that contains the passes is a vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pass</td><td>a pointer to the pass in which to add to the engine.</td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../da/d5c/engine_8cpp_source.html#l00039">39</a> of file <a class="el" href="../../da/d5c/engine_8cpp_source.html">engine.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 39</span> {</div>
<div class="line"><span class="lineno"> 40</span> passes.push_back(pass);</div>
<div class="line"><span class="lineno"> 41</span>}</div>
</div><!-- fragment -->
</div>
</div>
<a id="a58715f5c3ade824a65e602aba570040e" name="a58715f5c3ade824a65e602aba570040e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58715f5c3ade824a65e602aba570040e">&#9670;&nbsp;</a></span>get()</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="../../d9/d18/classtheo_1_1obf_1_1engine__t.html">engine_t</a> * theo::obf::engine_t::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get the singleton object of this class. </p>
<dl class="section return"><dt>Returns</dt><dd>the singleton object of this class.</dd></dl>
<p class="definition">Definition at line <a class="el" href="../../da/d5c/engine_8cpp_source.html#l00034">34</a> of file <a class="el" href="../../da/d5c/engine_8cpp_source.html">engine.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 34</span> {</div>
<div class="line"><span class="lineno"> 35</span> <span class="keyword">static</span> engine_t obj;</div>
<div class="line"><span class="lineno"> 36</span> <span class="keywordflow">return</span> &amp;obj;</div>
<div class="line"><span class="lineno"> 37</span>}</div>
</div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="../../d2/d26/theo_8cpp_source.html#l00056">theo::theo_t::compose()</a>, and <a class="el" href="../../df/d0a/main_8cpp_source.html#l00057">main()</a>.</p>
</div>
</div>
<a id="a7acfdbe9c229cf1f351cec610ab193d3" name="a7acfdbe9c229cf1f351cec610ab193d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7acfdbe9c229cf1f351cec610ab193d3">&#9670;&nbsp;</a></span>run()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void theo::obf::engine_t::run </td>
<td>(</td>
<td class="paramtype"><a class="el" href="../../d9/dd5/classtheo_1_1decomp_1_1symbol__t.html">decomp::symbol_t</a> *&#160;</td>
<td class="paramname"><em>sym</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>run all the passes on the symbol. this function will only run a pass if the symbol is the same type as the pass requires. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sym</td><td>symbol to run all passes on.</td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="../../da/d5c/engine_8cpp_source.html#l00043">43</a> of file <a class="el" href="../../da/d5c/engine_8cpp_source.html">engine.cpp</a>.</p>
<div class="fragment"><div class="line"><span class="lineno"> 43</span> {</div>
<div class="line"><span class="lineno"> 44</span> std::for_each(passes.begin(), passes.end(), [&amp;](pass_t* pass) {</div>
<div class="line"><span class="lineno"> 45</span> if (sym-&gt;type() &amp; pass-&gt;sym_type())</div>
<div class="line"><span class="lineno"> 46</span> pass-&gt;run(sym);</div>
<div class="line"><span class="lineno"> 47</span> });</div>
<div class="line"><span class="lineno"> 48</span>}</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/obf/<a class="el" href="../../de/d46/engine_8hpp_source.html">engine.hpp</a></li>
<li>src/obf/<a class="el" href="../../da/d5c/engine_8cpp_source.html">engine.cpp</a></li>
</ul>
</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.3
</small></address>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save