如何异或存储在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