Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Assemble with:
- ; nasm -f bin key.asm -o key
- start:
- mov bx, [0x0DED] ; Get the WORD from [0x0DED]
- neg bx ; Negate it
- nop ; Need to wait at least one more instruction (3 total)
- ; before trying to read 0x0DED again
- add bx, [0x0DED] ; Add the current WORD value at [0x0DED] with BX
- ; safeAX = -BX+[0x0DED] = [0x0DED]-BX
- ; or safeAX = (-prevsafeAX)+[currentsafeAX] = [currentsafeAX]-(prevsafeAX)
- mov byte [bx], 060h ; Overwrite the first instruction of safe with 060h
- ; to terminate the safe.
- jmp $ ; Infinite loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement