title: assembler XOR encrypt/decrypt file
body: <p>Looking for a program written in assembler which will encrypt / decrypt files. I use NASM as a compiler. I found the sample code but it throws errors</p>
  
  <pre><code>encrypt_xor proc lpBuffor:dword, dwSize:dword, dwKey:dword
  
     mov eax,lpBuffor
     mov ecx,dwSize
     mov edx,dwKey
  
    next_byte:
  
     xor byte ptr[eax+ecx-1],dl
     dec ecx
     jne next_byte
  
     ret
  </code></pre>
  
  <p>encrypt _xor endp</p>
  
  <p>I have error in:</p>
  
  <pre><code> encrypt_xor proc lpBuffor:dword, dwSize:dword, dwKey:dword
  </code></pre>
  
  <p>and</p>
  
  <pre><code> encrypt_xor proc lpBuffor:dword, dwSize:dword, dwKey:dword
  </code></pre>
  
  <p>error parser: instruction expected
  and also here</p>
  
  <pre><code>xor byte ptr[eax+ecx-1],dl
  </code></pre>
  
  <p>error coma or end of line expected</p>
  
  <p>What is wrong in this code?</p>