IMUL OllyDbg multiplication

0

I have problem to understand one of instruction in Assembly Language -> IMUL

From what I know, Imul is ->

imul dest, source1, source2

The problem that I have now, the result of multiplication of Imul in ollyDBG and mine is not same !

Here is IMUL on OllyDbg ->

And the result of the multiplication is 0x367AA048 or 914006088 in decimal..

I try to test with that multiplication with this PHP code..

echo dechex(0x00000053 * 0x97C9F598);

Surprisingly, the result of my PHP multiplication is not same from what OllyDbg get..

I hope someone can get me clear from this problem..

Thanks.

assembly
asked on Stack Overflow Jun 24, 2013 by Mohd Shahril • edited Jun 24, 2013 by Mohd Shahril

1 Answer

2

The result of this multiplication does not fit into a 32-bit value, as a result the value you see in EAX is only the lower 4 bytes of the result.

Since this multiplication results in: 0x31367AA048, the lower 4 bytes:0x367AA048 are put into EAX, as you are seeing.

answered on Stack Overflow Jun 24, 2013 by Iridium

User contributions licensed under CC BY-SA 3.0