Crate vtil_parser[−][src]
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 file and reading out some basic data:
use vtil_parser::{VTILReader, ArchitectureIdentifier}; let routine = VTILReader::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::{VTILReader, Operand, RegisterFlags}; let routine = VTILReader::from_path("resources/big.vtil")?; for basic_block in routine.explored_blocks.iter().take(1) { for instr in basic_block.instructions.iter().take(1) { assert_eq!(instr.name, "ldd"); assert_eq!(instr.operands.len(), 3); if let Operand::Reg(reg) = &instr.operands[1] { assert!(reg.flags.contains(RegisterFlags::PHYSICAL)); } else { unreachable!() } if let Operand::Imm(imm) = &instr.operands[2] { assert_eq!(imm.i64(), 0); } else { unreachable!() } assert_eq!(instr.vip.0, 0x9b833); } }
Structs
| BasicBlock | Basic block containing a linear sequence of VTIL instructions |
| Header | Header containing metadata regarding the VTIL container |
| ImmediateDesc | Describes a VTIL immediate value in an operand |
| Instruction | VTIL instruction and associated metadata |
| RegisterDesc | Describes a VTIL register in an operand |
| RegisterFlags | Flags describing register properties |
| RoutineConvention | Routine calling convention information and associated metadata |
| VTIL | VTIL container |
| VTILReader | Reader for VTIL containers |
| Vip | VTIL instruction pointer |
Enums
| ArchitectureIdentifier | Architecture for IL inside of VTIL routines |
| Error | Custom |
| Operand | VTIL instruction operand |
Type Definitions
| SubroutineConvention | Alias for |