Struct libscemu::emu::Emu

source ·
pub struct Emu {
Show 22 fields pub regs: Regs64, pub pre_op_regs: Regs64, pub post_op_regs: Regs64, pub flags: Flags, pub pre_op_flags: Flags, pub post_op_flags: Flags, pub eflags: Eflags, pub fpu: FPU, pub maps: Maps, pub hook: Hook, pub bp: Breakpoint, pub seh: u64, pub veh: u64, pub feh: u64, pub cfg: Config, pub pos: u64, pub tls_callbacks: Vec<u64>, pub tls: Vec<u32>, pub fls: Vec<u32>, pub out: String, pub skip_apicall: bool, pub its_apicall: Option<u64>, /* private fields */
}

Fields§

§regs: Regs64§pre_op_regs: Regs64§post_op_regs: Regs64§flags: Flags§pre_op_flags: Flags§post_op_flags: Flags§eflags: Eflags§fpu: FPU§maps: Maps§hook: Hook§bp: Breakpoint§seh: u64§veh: u64§feh: u64§cfg: Config§pos: u64§tls_callbacks: Vec<u64>§tls: Vec<u32>§fls: Vec<u32>§out: String§skip_apicall: bool§its_apicall: Option<u64>

Implementations§

source§

impl Emu

source

pub fn new() -> Emu

source

pub fn set_base_address(&mut self, addr: u64)

source

pub fn enable_debug_mode(&mut self)

source

pub fn disable_debug_mode(&mut self)

source

pub fn set_stack_address(&mut self, addr: u64)

source

pub fn set_maps_folder(&mut self, folder: &str)

source

pub fn spawn_console_at(&mut self, exp: u64)

source

pub fn spawn_console_at_addr(&mut self, addr: u64)

source

pub fn enable_ctrlc(&mut self)

source

pub fn disable_ctrlc(&mut self)

source

pub fn disable_console(&mut self)

source

pub fn enable_console(&mut self)

source

pub fn set_verbose(&mut self, n: u32)

source

pub fn enable_banzai(&mut self)

source

pub fn disable_banzai(&mut self)

source

pub fn banzai_add(&mut self, name: &str, nparams: i32)

source

pub fn api_addr_to_name(&mut self, addr: u64) -> String

source

pub fn api_name_to_addr(&mut self, kw: &str) -> u64

source

pub fn init_stack32(&mut self)

source

pub fn init_stack64(&mut self)

source

pub fn init_stack64_tests(&mut self)

source

pub fn init_regs_tests(&mut self)

source

pub fn init_flags_tests(&mut self)

source

pub fn init(&mut self)

source

pub fn init_linux64(&mut self, dyn_link: bool)

source

pub fn init_mem32(&mut self)

source

pub fn init_tests(&mut self)

source

pub fn init_mem64(&mut self)

source

pub fn filename_to_mapname(&self, filename: &str) -> String

source

pub fn load_pe32( &mut self, filename: &str, set_entry: bool, force_base: u32 ) -> (u32, u32)

source

pub fn load_pe64( &mut self, filename: &str, set_entry: bool, force_base: u64 ) -> (u64, u32)

source

pub fn set_config(&mut self, cfg: Config)

source

pub fn load_code(&mut self, filename: &str)

source

pub fn load_code_bytes(&mut self, bytes: &[u8])

source

pub fn free(&mut self, name: &str)

source

pub fn alloc(&mut self, name: &str, size: u64) -> u64

source

pub fn stack_push32(&mut self, value: u32) -> bool

source

pub fn stack_push64(&mut self, value: u64) -> bool

source

pub fn stack_pop32(&mut self, pop_instruction: bool) -> Option<u32>

source

pub fn stack_pop64(&mut self, pop_instruction: bool) -> Option<u64>

source

pub fn memory_operand_to_address(&mut self, operand: &str) -> u64

source

pub fn memory_read(&mut self, operand: &str) -> Option<u64>

source

pub fn memory_write(&mut self, operand: &str, value: u64) -> bool

source

pub fn get_size(&self, operand: &str) -> u8

source

pub fn set_rip(&mut self, addr: u64, is_branch: bool) -> bool

source

pub fn set_eip(&mut self, addr: u64, is_branch: bool) -> bool

source

pub fn shrd( &mut self, value0: u64, value1: u64, pcounter: u64, size: u32 ) -> (u64, bool)

source

pub fn shld( &mut self, value0: u64, value1: u64, pcounter: u64, size: u32 ) -> (u64, bool)

source

pub fn spawn_console(&mut self)

source

pub fn disassemble(&mut self, addr: u64, amount: u32) -> String

source

pub fn get_operand_value( &mut self, ins: &Instruction, noperand: u32, do_derref: bool ) -> Option<u64>

source

pub fn set_operand_value( &mut self, ins: &Instruction, noperand: u32, value: u64 ) -> bool

source

pub fn get_operand_xmm_value_128( &mut self, ins: &Instruction, noperand: u32, do_derref: bool ) -> Option<u128>

source

pub fn set_operand_xmm_value_128( &mut self, ins: &Instruction, noperand: u32, value: u128 )

source

pub fn get_operand_ymm_value_256( &mut self, ins: &Instruction, noperand: u32, do_derref: bool ) -> Option<U256>

source

pub fn set_operand_ymm_value_256( &mut self, ins: &Instruction, noperand: u32, value: U256 )

source

pub fn show_instruction(&self, color: &str, ins: &Instruction)

source

pub fn show_instruction_ret(&self, color: &str, ins: &Instruction, addr: u64)

source

pub fn show_instruction_pushpop( &self, color: &str, ins: &Instruction, value: u64 )

source

pub fn show_instruction_taken(&self, color: &str, ins: &Instruction)

source

pub fn show_instruction_not_taken(&self, color: &str, ins: &Instruction)

source

pub fn stop(&mut self)

source

pub fn call32(&mut self, addr: u64, args: &[u64]) -> Result<u32, ScemuError>

source

pub fn call64(&mut self, addr: u64, args: &[u64]) -> Result<u64, ScemuError>

source

pub fn run_until_ret(&mut self) -> Result<u64, ScemuError>

source

pub fn capture_pre_op(&mut self)

source

pub fn capture_post_op(&mut self)

source

pub fn diff_pre_op_post_op(&mut self)

source

pub fn step(&mut self) -> bool

source

pub fn run(&mut self, end_addr: Option<u64>) -> Result<u64, ScemuError>

RUN ENGINE ///

Auto Trait Implementations§

§

impl Freeze for Emu

§

impl RefUnwindSafe for Emu

§

impl Send for Emu

§

impl Sync for Emu

§

impl Unpin for Emu

§

impl UnwindSafe for Emu

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V