I am reading through the 'Practical Malware Analysis' book and got to page 74 which says:
lea ebx, [eax*4+4]
is the functional equivalent ofebx = (eax+1)* 5
whereeax
is a number.
As of my understanding, lea ebx, [eax*4 + 4]
should multiply eax
value by 4, add 4 to it and then store it back in ebx
, which is different than (eax+1) * 5
.
Is that a typo? Or I got things wrong?
I think it should be: ebx = (eax+1) * 4