title: How to know where's the first function argument?
body: <p>I was just wondering, If I have this ASM function:</p>
  
  <pre><code>PUSH EBP
  MOV EBP, ESP
  SUB ESP, 8
  LEAVE
  RETN 8
  </code></pre>
  
  <p>That does nothing and takes two 4-bytes arguments. It seems that the first argument is at <code>EBP+8</code> and the second at <code>EBP+12</code>. But, how to know that? Because if the function takes three 4-bytes parameters, then the third will be at <code>EBP+16</code>. Will the first argument be always at <code>EBP+8</code> and then I just have to add the argument size to get the next one? If yes, why 8?</p>
  
  <p>Thanks in advance.</p>