Expand description
§VTIL-RustParser
Read/write VTIL files in Rust.
You can learn more about VTIL here on the main GitHub page.
§Examples
For a simple example of loading a VTIL routine and reading out some basic data:
use vtil_parser::{Routine, ArchitectureIdentifier};
let routine = Routine::from_path("resources/big.vtil")?;
assert_eq!(routine.header.arch_id, ArchitectureIdentifier::Amd64);
For a more complex example, iterating over IL instructions:
use vtil_parser::{Routine, Op, Operand, RegisterDesc, ImmediateDesc, RegisterFlags};
let routine = Routine::from_path("resources/big.vtil")?;
for (_, basic_block) in routine.explored_blocks.iter().take(1) {
for instr in basic_block.instructions.iter().take(1) {
match &instr.op {
Op::Ldd(_, Operand::RegisterDesc(op2), Operand::ImmediateDesc(op3)) => {
assert!(op2.flags.contains(RegisterFlags::PHYSICAL));
assert!(op3.i64() == 0);
}
_ => assert!(false)
}
assert_eq!(instr.vip.0, 0x9b833);
}
}
Modules§
- dump
- Helpers for dumping VTIL structures
Structs§
- Basic
Block - Basic block containing a linear sequence of VTIL instructions
- Header
- Header containing metadata regarding the VTIL container
- Immediate
Desc - Describes a VTIL immediate value in an operand
- Instruction
- VTIL instruction and associated metadata
- Instruction
Builder - Builder for VTIL instructions in an associated
BasicBlock
- Register
Desc - Describes a VTIL register in an operand
- Register
Flags - Flags describing register properties
- Routine
- VTIL routine container
- Routine
Convention - Routine calling convention information and associated metadata
- Vip
- VTIL instruction pointer
Enums§
- Architecture
Identifier - Architecture for IL inside of VTIL routines
- Error
- Custom
Error
for VTIL reading/writing - Op
- VTIL operator and operands
- Operand
- VTIL instruction operand
Type Aliases§
- Subroutine
Convention - Alias for
RoutineConvention
for consistent naming