Jump to content
Tuts 4 You
Sign in to follow this  
kb432

How to define this loop in C Language from asm ?

Recommended Posts

kb432

what is this loop equivalent to in C++ / C language ? 

YdOetmd.png

 

2)

what is this in reverse engineering 

mov edx, [eax+4]

or

mov edx, [eax] 

Share this post


Link to post
crystalboy

I suggest you to learn assembly language. Nobody will explain to you all the ASM syntax in a forum.

Read this one:

https://www.amazon.com/Art-Assembly-Language-Randall-Hyde/dp/1593272073/ref=sr_1_4?s=books&ie=UTF8&qid=1474894924&sr=1-4&keywords=assembly

Or start with lena151 tutorials:

https://tuts4you.com/download.php?list.17

To reply to your question:

mov edx, [eax] 

When the instruction mov edx, [eax] is executed EDX will contain the DWORD at the address pointed by EAX.

  • Like 1

Share this post


Link to post
samoray

According to the picture you posted you're using IDA for disassembling,If I'm not mistaken you could just use 'F5' (if you have IDA with HexRey of course) to show code of that assembly.

for exemple:

 

 

idaq_2016-09-26_16-49-46.png

idaq_2016-09-26_16-50-08.png

Share this post


Link to post
eax
int i = 36;
char *c = [eax+0x124]
while(i-- >0)
{
  *c++=0;
}

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×
×
  • Create New...