registers

x86 reverse engineering - last updated 2026-05-12

overview

To my understanding, registers are very quickly accessible locations in a CPU, with different architectures having different naming conventions and purposes for each register.

registers

In x86, the big ones to remember are as follows:

RegisterPurposeMnemonic
EAXMain register used for arithmetic calculations, called the accumulator as it stores the results of arithmetic operations and function return values.If there's an "A" in the middle then it's for arithmetic.
EBXThe base register, points to data in the DS (Data Segment), used to store the base address of a program.If it's "B" without a "P" then its base address.
ECXCounter register used to hold values that represent the number of times a process is repeated, often used in loop and string operations.If it's "C" then it counts things.
EDXGeneral purpose register, used for I/O operations and can extend EAX to 64-bits."DX" for data extend.
ESIThe source index register, stores the address from where to read data.If it's "S" then its the source pointer.
EDIThe destination index register, points to data or a destination in the segment pointed to by the ES (Extra Segment), holds the implied write address to all string operations."DI" for destination pointer.
EBPThe base pointer, points to data on the stack in the SS (Stack Segment), points to bottom of the current stack frame and is used to reference local variables."BP" for base pointer.
ESPThe stack pointer points to the top of the current stack frame, and is used to reference local variables."SP" for stack pointer.

It’s also important to remember that each of these registers are 32-bits in length, and can also be broken up into 16-bit registers.