DisassemblyIterator

Iterator for memory-efficient instruction disassembly.

This iterator allows streaming disassembly of large binaries without loading all instructions into memory at once.

Example usage:

engine.iterate(code, 0x1000).use { iterator ->
for (instruction in iterator) {
println(instruction)
if (instruction.isCall) {
println("Found call at: ${instruction.address.toString(16)}")
}
}
}

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard

Get the current position in the disassembly.

Link copied to clipboard
inline fun DisassemblyIterator.forEach(action: (Instruction) -> Unit)

Extension to easily iterate with forEach.

Link copied to clipboard
open operator override fun hasNext(): Boolean
Link copied to clipboard
open operator override fun next(): Instruction
Link copied to clipboard

Collect all remaining instructions into a list.