I have this little-endian thumb hex code: 44 79 (79 44) and I want to convert it into an instruction. How do I go about doing so? Compiling a program then decompiling it to get the instruction, is that possible?
I'd probably use capstone. An example is below:
#!/usr/bin/env python from capstone import * CODE = b"\x44\x79" md = Cs(CS_ARCH_ARM, CS_MODE_THUMB|CS_MODE_LITTLE_ENDIAN) for (address, size, mnemonic, op_str) in md.disasm_lite(CODE, 0x1000): print("0x%x:\t%s\t%s" %(address, mnemonic, op_str))
0x1000: ldrb r4, [r0, #5]