Reverse engineering utilities library written in meta-modern c++
Aimed only for Amd64 Windows.
Library requires support for c++23, so you can use:
Library interfaces intended for use with monadic functions.
const auto net_chan_vmt =
reutl::find_pattern_in_module<"40 53 56 57 41 56 48 83 EC ?? 45 33 F6 48 8D 71">(
"networksystem.dll")
.value_or(std::nullopt)
.transform([](const reutl::Addr addr) {
return addr
.offset(0x15) //
.deref_instr_rel<std::int32_t>(7)
.to_ptr();
});
This is how it looks with resharper c++ helpers
See the example library for complete usage demonstration.
Open Visual Studio Developer Command Prompt/Powershell cd to library root and enter the following commands
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022" -DBUILD_TESTING=OFF
after that open reult.sln in IDE and build reutl with preferred compiler options
mkdir build
cd build
cmake .. -G Ninja -DBUILD_TESTING=OFF
cmake --build .
# build example
cmake --build . --target nw_hooks
If you are use CMake in your project consider installing reutl as a git submodule.
git submodule add https://github.com/ManulMap/reutl
Then include it into your library.
cmake_minimum_required(VERSION 3.25)
set(CMAKE_CXX_STANDARD 23)
project(your_project)
add_library(your_lib SHARED dllmain.cc)
add_subdirectory(reutl)
target_link_libraries(your_lib reutl)
In order to build reutl with testing, you need to install the Catch2 testing framework with vcpkg and specify vcpkg toolchain file for cmake
For Visual Studio IDE use Open Folder then open CMakeSettings.json and change CMake toolchain file option for your build profiles.
For command line build use -DCMAKE_TOOLCHAIN_FILE option.
# build with testing (Catch2 must be installed)
mkdir build
cd build
cmake .. -G Ninja -DBUILD_TESTING=ON -DCMAKE_TOOLCHAIN_FILE=PathToYourVcpkgToolchainFile\vcpkg.cmake
# run tests
cd test
ctest --extra-verbose