title: What does it do this assembly code?
body: <p>I'm new to assembly language and I would like to know what the code below does:</p>
  
  <pre><code>Address   Hex dump          Command                                                        
  01356A60  /$  53            PUSH EBX                                                            
  01356A61  |.  8BD9          MOV EBX,ECX
  01356A63  |.  8B43 04       MOV EAX,DWORD PTR DS:[EBX+4]
  01356A66  |.  56            PUSH ESI
  01356A67  |.  8B70 10       MOV ESI,DWORD PTR DS:[EAX+10]
  01356A6A  |.  85F6          TEST ESI,ESI
  01356A6C  |.- 74 5B         JZ SHORT 01356AC9
  01356A6E  |.  8BC6          MOV EAX,ESI
  01356A70  |.  8D50 01       LEA EDX,[EAX+1]
  01356A73  |&gt;  8A08          /MOV CL,BYTE PTR DS:[EAX]
  01356A75  |.  40            |INC EAX
  01356A76  |.  84C9          |TEST CL,CL
  01356A78  |.- 75 F9         \JNZ SHORT 01356A73
  01356A7A  |.  2BC2          SUB EAX,EDX
  01356A7C  |.  57            PUSH EDI
  01356A7D  |.  8BF8          MOV EDI,EAX
  01356A7F  |.- 74 47         JZ SHORT 01356AC8
  </code></pre>
  
  <p>What I can understand is running this part of code is that at <code>EAX</code> there is for example "abcdefg" and at the <code>EDX</code> there is "bcdefg" (the same string without the first letter), and that during the loop, <code>EAX</code> is incremented eating a single letter each time...but for example <code>MOV CL,BYTE PTR DS:[EAX]</code>, what is its goal? Is there some pattern code in those lines that a newbie like me can't see?</p>
  
  <p>Thanks in advance</p>