binaryninja-api
binaryninja-api copied to clipboard
Interactive IL Rewriting
It would be awesome to have the possibility to interactively manipulate IL expressions. Like adding additional expressions and rewriting or removing existing ones.
One use case would be to raise user-informed data flow to the next level by constraining individual variables or dynamically adding more analysis context. Another use case would be the simplification of complex HLIL expressions to ease decompilation.
Right now, those things can be realized using workflows, but they lack interactivity.
To give one specific example:
0 @ 00001173 int32_t rcx_3 = (not.d(arg2) & arg3) + arg2
1 @ 0000117b int32_t rdi_3 = (not.d(rcx_3) & arg3) + rcx_3
2 @ 0000118c return zx.q((not.d(arg3) & rdi_3) + (arg2 & rcx_3) + arg1 - (rcx_3 | rdi_3))
This code could be rewritten as:
0 @ 0000118c return zx.q(arg1 + arg2 - arg3)