How to change value of EIP in ollydbg?

COMer picture COMer · Sep 30, 2010 · Viewed 8.8k times · Source

I double clicked on EIP in register window,but seems un-editable.

Why is EIP special?How can I change it?

alt text

Answer

abnev picture abnev · Sep 30, 2010

Find the location you want to set your EIP to, right click and select "New Origin Here". This will reset the EIP to the new address. You can confirm this by inspecting the registers at the top right.

In addition to the reply above, the EIP is basically the pointer to where the current line of execution is. It's used to keep a record of which instruction the program is executing in memory.