I need to write something like a “disassembler”, I need to read RAM memory (code section) and show it formatted like
ADD rax, rbx
MOV rcx, rax
Where can I find a comprehensive guide/paper on how to translate an opcode to the correspective operation/operands? I’m targeting x64 assembly
I’d really recommend you just use the BSD licensed udis86 library instead of writing yet another x86 disassembler:
The version of Udis86 on github even supports the latest Intel AVX instructions.
Udis86 is quite easy to build for x86 or x64 Windows with the MinGW64 / MSYS toolchain. Just in case you’re not familiar with GCC and the GNU autotools build system, I’ve built:
for your convenience. The archives contain the DLL and header files. (Whether it’s wise to download and run DLLs from random strangers who answer questions on Stackoverflow is another matter ;).