EAX に保存されている値をどのように XOR できますか?
問題は次の行にあります。
xor eax, key
EAXには、XORしたい値のアドレスが含まれています。どうすればこれを達成できますか? 私はそれが次のようなものになると思いました:
xor [eax], key
しかし、それは機能しません (構文エラー)
decrypt proc startAddress:DWORD , sizeOfSegment:DWORD , key:DWORD
xor ecx, ecx ; clear the ecx register for the counter
mov eax, startAddress ; copy the start address to eax
.while ecx < sizeOfSegment ; loop through the code
xor eax, key ; XOR decrypt the word
inc eax
inc ecx
.endw
ret
decrypt endp