diff --git a/src/analysis/slices.rs b/src/analysis/slices.rs index ce121fa..685ce90 100644 --- a/src/analysis/slices.rs +++ b/src/analysis/slices.rs @@ -266,8 +266,13 @@ impl FunctionSlices { } } StepResult::Illegal => { - log::debug!("Illegal instruction @ {:#010X}", ins_addr); - Ok(ExecCbResult::End(false)) + if ins.code == 0 { + log::debug!("Hit zeroed padding @ {:#010X}", ins_addr); + Ok(ExecCbResult::End(false)) + } else { + log::debug!("Illegal instruction @ {:#010X}", ins_addr); + Ok(ExecCbResult::Continue) + } } StepResult::Jump(target) => match target { BranchTarget::Unknown diff --git a/src/analysis/tracker.rs b/src/analysis/tracker.rs index 24bb321..af4cc5f 100644 --- a/src/analysis/tracker.rs +++ b/src/analysis/tracker.rs @@ -348,12 +348,15 @@ impl Tracker { } Ok(ExecCbResult::Continue) } - StepResult::Illegal => bail!( - "Illegal instruction hit @ {:#010X} (function {:#010X}-{:#010X})", - ins_addr, - function_start, - function_end - ), + StepResult::Illegal => { + log::debug!( + "Illegal instruction hit @ {:#010X} (function {:#010X}-{:#010X})", + ins_addr, + function_start, + function_end + ); + Ok(ExecCbResult::Continue) + } StepResult::Jump(target) => match target { BranchTarget::Unknown | BranchTarget::Return