mirror of
https://codeberg.org/unspeaker/vestal.git
synced 2025-12-06 06:26:43 +01:00
rip must start 0x1000
This commit is contained in:
parent
48da19f7d5
commit
18fbfe62ac
1 changed files with 5 additions and 3 deletions
|
|
@ -60,7 +60,7 @@ impl Vestal {
|
|||
let section_ptr = section.pointer_to_raw_data.0 as usize;
|
||||
let section_len = section.size_of_raw_data as usize;
|
||||
let section_data = &buf[section_ptr..section_ptr+section_len];
|
||||
let mut decoder = iced_x86::Decoder::with_ip(64, section_data, 0, 0);
|
||||
let mut decoder = iced_x86::Decoder::with_ip(64, section_data, 0x1000, 0);
|
||||
while decoder.can_decode() {
|
||||
let position = decoder.position();
|
||||
let instruction = decoder.decode();
|
||||
|
|
@ -86,10 +86,12 @@ impl Vestal {
|
|||
_ => {}
|
||||
}
|
||||
let offset = (position + section_ptr) as u32;
|
||||
println!("0x{:08x} (0x{:08x}) {:32} {instruction}",
|
||||
println!("0x{:08x} (0x{:08x}) {:32} {}",
|
||||
position + section_ptr,
|
||||
dll.offset_to_rva(Offset(offset))?.0,
|
||||
opcodes.iter().map(|x|format!("{x:>02x}")).collect::<Vec<_>>().join(" "));
|
||||
opcodes.iter().map(|x|format!("{x:>02x}")).collect::<Vec<_>>().join(" "),
|
||||
instruction);
|
||||
break
|
||||
//println!("0x{:08x} {}", decoder.position(), instruction);
|
||||
//return Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue