如何異或存儲在EAX中的值?異或存儲在EAX中的地址
的問題是在這條線:
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
對你沒有太大的幫助(並且可以隨意嘲笑我),但是這會在nasm中起作用。 nasm很棒。 – 2009-10-09 01:15:05