Should I Learn x86-64 Assembly or Focus on C/C++ for Reverse Engineering?
Asked by
MellowPine42
I'm interested in reverse engineering and want to know how much assembly I really need to learn. I studied 8086 assembly at university, so I understand the basic concepts. For x86-64, would it be enough to learn the additional registers, calling conventions, and newer instructions before moving on to C/C++? Decompilers often produce C-like output, but I know that output can be inaccurate and that assembly is sometimes necessary to understand what the program actually does. Should I study modern x86 assembly in depth, or balance it with learning C and C++?
Answers
Start with the x86-64 essentials instead of trying to master the entire instruction set. Focus on registers, stack frames, function calls, conditionals, loops, pointers, structures, compiler-generated patterns, and debugging tools. C is particularly valuable for understanding memory and data structures, while C++ helps when you encounter classes, virtual functions, templates, and object lifetimes. You can add more advanced instructions as your projects require them.
Reply to this answer
Learn both, but use them for different purposes. Your 8086 background gives you a useful foundation, and x86-64 should be fairly approachable once you learn the registers, calling conventions, stack usage, memory addressing, and common compiler patterns. You donโt necessarily need to memorize every instruction, but you should be comfortable stepping through code and understanding what each instruction changes. C and C++ are also important because decompiler output is usually easier to interpret when you understand the original high-level constructs.
Reply to this answer
Decompiled C is often the fastest way to get the overall idea of a function, but it is only a reconstruction. Optimizations, inlining, vectorization, reordered operations, and compiler transformations can make the result look strange or hide important details. When something doesnโt make sense, switch to the disassembly and verify the actual control flow, data flow, and calling convention. Youโll usually be more productive by reading both rather than trying to reverse everything directly from assembly.
MellowPine42: I was thinking the same thing, especially because decompilers donโt always reproduce the exact original behavior. Iโll use the higher-level output for an overview and assembly for confirmation.
Reply to this answer
Add your answer
Answers are reviewed before publication.
MellowPine42: That makes sense. Iโll review modern x86 assembly while also improving my C and C++ so I can compare the decompiler output with the underlying instructions.