Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What does the operand of this mov instruction underlined in this image mean?

The above image along with the title fully encapsulates my question 🙂

Extra details (if necessary):
I assume the above is enough information to answer the question, so if you know the answer and you wish to stop reading the rest of the question, that’s totally fine.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I’m trying to understand what happens when a struct is returned by a C function. This is an example from the “Reverse Engineering for Beginners” by Dennis Yurichev page 139 (Returning a struct).

I understand that _a$ and $T3853 are macros, but I don’t understand what the instruction actually does after the macros are replaced by their values.

>Solution :

See above, _a$ and $T3853 are symbols defined to value 12 and 8 respectively. So

mov ecx, DWORD PTR _a$[esp-4]

is the same as

mov ecx, DWORD PTR 12[esp-4]

or

mov ecx, DWORD PTR [esp-4+12]

or

mov ecx, DWORD PTR [esp+8]
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading