Capstone Engine
Main Capstone disassembly engine.
This is the primary interface for disassembling machine code. Use the build factory method to create instances with configuration.
The engine must be closed after use to release resources. Use the use extension function for automatic resource management:
CapstoneEngine.build(Architecture.ARM64, Mode.LITTLE_ENDIAN) {
detail = true
syntax = Syntax.DEFAULT
}.use { engine ->
val result = engine.disassemble(bytes, address = 0x1000)
result.onSuccess { instructions ->
instructions.forEach { println(it) }
}
}Content copied to clipboard
Functions
Link copied to clipboard
fun disassemble(code: ByteArray, address: Long = 0, count: Int = 0): CapstoneResult<List<Instruction>>
Disassemble binary code.
Link copied to clipboard
Disassemble single instruction at current position.
Link copied to clipboard
Get the friendly name of an instruction.
Link copied to clipboard
Create an iterator for memory-efficient disassembly.
Link copied to clipboard
Get the friendly name of a register.
Link copied to clipboard
Set a runtime option.