The document describes the Reverse Engineering Intermediate Language (REIL), which aims to provide a simple, platform-independent intermediate representation for binary code analysis. REIL uses a small set of instructions that can be easily translated from various processor architectures into a common format. This allows analyses like register tracking to be implemented using the same algorithms regardless of the original platform. REIL is implemented using a technique called MonoREIL that models the program as a graph and solves it using a lattice-based dataflow analysis approach. This enables powerful analyses to be built from the common REIL representation.
11. add
Six Arithmetic Instructions and
bisz
Addition bsh
div
Logical Shift jcc
Unsigned Division ldm
mod
Unsigned Modulo mul
Unsigned Multiplication nop
Subtraction or
stm
str
sub
undef
unkn
xor
12. add
Three Bitwise Instructions and
bisz
Bitwise AND bsh
div
Bitwise OR jcc
Bitwise XOR ldm
mod
mul
nop
or
stm
str
sub
undef
unkn
xor
13. add
Three Data Transfer Instructions and
bisz
Load Memory bsh
div
Store Memory jcc
Transfer Register Content ldm
mod
mul
nop
or
stm
str
sub
undef
unkn
xor
14. add
Two Logical Instructions and
bisz
Compare to Zero bsh
div
Jump Conditional jcc
ldm
mod
mul
nop
or
stm
str
sub
undef
unkn
xor
15. add
Three Other Instructions and
bisz
No Operation bsh
div
Undefine Register jcc
Unknown Mnemonic ldm
mod
mul
nop
or
stm
str
sub
undef
unkn
xor
16. All Instructions are equal ...
add t0, t1, t2
and t0, t1, t2
bsh t0, t1, t2
div t0, t1, t2
mod t0, t1, t2
... but some instructions are
mul t0, t1, t2
or t0, t1, t2 more equal than others
sub t0, t1, t2 bisz t0, , t2
xor t0, t1, t2 jcc t0, , t2
ldm t0, , t2
nop , ,
stm t0, , t2
str t0, , t2
undef , , t2
unkn , ,
17. What REIL can‘t do
FPU Instructions fadd
...
System Instructions int
...
Weird Instructions setend
...