Author: ScriptWare Software
Native C++ Binary Ninja plugin for removing opaque predicates
This plugin removes conditional branches that always evaluate to the same value. Written in C++ for speed - faster than the Python version, especially on large binaries. Uses multiple threads to process functions in parallel, and will iteratively perform passes through functions to clean up newly uncovered opaque predicates. You should be able to remove annoying opaque predicates from massive functions with ease and speed.
Copy to: %APPDATA%\Binary Ninja\plugins\
Copy to: ~/.binaryninja/plugins/
Copy to: ~/Library/Application Support/Binary Ninja/plugins/
Click → Plugins
→ Native Predicate Solver
:
Patch Opaque Predicates (Current Function)
- Patches current function onlyPatch Opaque Predicates (All Functions)
- Patches entire binary
Found in Binary Ninja Settings under "Native Predicate Solver":
Setting | Default | Description |
---|---|---|
Max passes per function | 10 | Times to re-analyse each function |
Max global passes | 20 | Times to re-analyse entire binary |
Thread count | 8 | Worker threads for parallel processing |
- Scans MLIL for conditional branches
- Checks if conditions are constant (always true/false)
- Patches them:
- Always false → NOP (removes branch)
- Always true → Unconditional jump
- Repeats until no more predicates found
This plugin was developed via this version of Binary Ninja:
- 5.0
The following dependencies are required for this plugin:
- None (all dependencies are included in the Binary Ninja API)
This plugin is released under a MIT license.
2