Runtime components for the Reko decompiler toolchain.
$ dotnet add package Reko.Decompiler.RuntimeThe Reko Decompler runtime provides reverse engineering tools intended for use within .NET programs.
Included in the NuGet are:
using Reko.Arch.Arm.AArch32;
using Reko.Core;
using Reko.Core.Memory;
using System.ComponentModel.Design;
// Create some ARM machine code and put it in a
// memory area at a specific address.
byte[] bytes = new byte[] { 0x3A, 0xB7, 0xB1, 0xE3 };
Address addr = Address.Ptr32(0x0100_0000);
var mem = new ByteMemoryArea(addr, bytes);
// Create an instance of the ARM32 architecture object.
var sc = new ServiceContainer();
var armArch = new Reko.Arch.Arm.Arm32Architecture(sc, "arm32", new());
// Create a little-endian image reader starting at the
// address addr, and disassemble instructions until
// the end of the memory area has been reached.
var reader = mem.CreateLeReader(addr);
var disassembler = armArch.CreateDisassembler(reader);
foreach (AArch32Instruction instr in disassembler)
{
Console.WriteLine("{0}: {1}", instr.Address, instr);
}