
Generalized VMProtect devirtualizer supporting versions 1.x, 2.x, and 3.x. Standalone CLI tool + Ghidra plugin.
Status: ✅ Production Ready | Validation: 22/22 samples (100%) | Scope: VMP ≤3.6 (3.7+ requires reverse engineering)
cd /home/ciupix/vmp_devirt_prod
cargo build --release
Binary: target/release/vmp_devirt
# Analyze binary
./target/release/vmp_devirt <binary_path>
# Export handlers
./target/release/vmp_devirt <binary_path> --export-handlers handlers.json
# Export bytecode
./target/release/vmp_devirt <binary_path> --export-bytecode bytecode.json
Tested Samples:
See VALIDATION_REPORT.md for detailed results.
Input Binary
↓
PE/ELF Loader (src/pe_loader.rs)
↓
Version Detector (src/version.rs)
↓
Dispatch Table Extractor (src/dispatch_table.rs)
├─ Unicorn XOR Key Capture (src/unicorn_emulator.rs)
└─ Pattern Matching Fallback
↓
Handler Classifier (src/handler_classifier.rs)
↓
Bytecode Decoder (src/bytecode.rs)
├─ Operand Decryption (src/decrypt.rs)
└─ ALU Reconstruction (src/alu.rs)
↓
Output (JSON/Pseudo-asm)
Total: ~2,800 lines of production Rust code
Heuristics based on:
VMP 1.x/2.x: XOR key extraction via pattern matching in .text section
VMP 3.x: Handler chain dispatch
Pattern matching on:
FUTURE_WORK.md for details.VALIDATION_REPORT.md - Comprehensive test resultsIMPLEMENTATION_COMPLETE.md - Implementation statusUNICORN_IMPLEMENTATION_REPORT.md - XOR key capture detailsArchitecture based on VMP 3.5.1 source leak analysis:
Research/Educational Use
For issues or questions, refer to validation reports or implementation documentation.
Last Updated: 2026-06-01 Status: Production Ready
| Version |
|---|
| Samples |
|---|
| Success |
|---|
| Avg Time |
|---|
| VMP 1.x | 4 | 4/4 | 38ms |
| VMP 2.x | 6 | 6/6 | 734ms |
| VMP 3.x | 12 | 12/12 | 39ms |
| Module | Purpose | Lines |
|---|
src/lib.rs | Main library interface | 150 |
src/version.rs | VMP version detection | 200 |
src/pe_loader.rs | PE/ELF binary loading | 350 |
src/dispatch_table.rs | Dispatch table extraction | 400 |
src/unicorn_emulator.rs | XOR key capture | 308 |
src/handler_classifier.rs | Handler type identification | 280 |
src/bytecode.rs | Bytecode reading/decoding | 320 |
src/decrypt.rs | ValueCryptor chains | 250 |
src/alu.rs | ALU operation reconstruction | 200 |
src/opcode_table.rs | Opcode management | 180 |
src/bin/cli.rs | CLI tool | 400 |