How can you XOR the value stored in EAX?
The problem is at this line:
xor eax, key
EAX contains the address of the value i want to XOR. How can I accomplish this? I though it would be something along the lines of:
xor [eax], key
but that doesn't work (syntax error)
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