Getting Started
VTIL-Core is a C++ library that can be built with CMake on Windows, Linux, and macOS.
Prerequisites
- CMake 3.15 or newer
- A C++20-capable compiler (MSVC 19.28+, GCC 10+, Clang 12+)
- Git
- Ninja (optional, recommended on Linux/macOS)
Clone
git clone --recursive https://github.com/vtil-project/VTIL-Core
cd VTIL-CoreBuild on Windows
cmake -B build
# Open build\VTIL-Core.sln in Visual StudioBuild on Linux / macOS
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildOn Apple Silicon add -DCMAKE_OSX_ARCHITECTURES=x86_64.
Your first program
main.cpp
#include <vtil/vtil>
#include <vtil/compiler>
int main() {
vtil::basic_block* bb = vtil::basic_block::begin(0x140001000);
vtil::routine* rtn = bb->owner;
auto t0 = bb->tmp(64);
bb->mov(t0, 0x1337);
bb->add(t0, 0x42);
bb->vexit(0);
vtil::debug::dump(rtn);
vtil::optimizer::apply_all(rtn);
vtil::debug::dump(rtn);
delete rtn;
return 0;
}