00000000004004e6 :
4004e6: 55 push rbp
4004e7: 48 89 e5 mov rbp,rsp
4004ea: 48 89 7d e8 mov QWORD PTR [rbp-0x18],rdi -- input
4004ee: 89 75 e4 mov DWORD PTR [rbp-0x1c],esi -- 28
4004f1: c7 45 fc 01 00 00 00 mov DWORD PTR [rbp-0x4],0x1 -- i=1
4004f8: eb 28 jmp 400522
4004fa: 8b 45 fc mov eax,DWORD PTR [rbp-0x4] -- eax = i
4004fd: 48 63 d0 movsxd rdx,eax -- rdx = i
400500: 48 8b 45 e8 mov rax,QWORD PTR [rbp-0x18] -- rax = *input[0]
400504: 48 01 d0 add rax,rdx -- rax = *input[0+i]
400507: 8b 55 fc mov edx,DWORD PTR [rbp-0x4] -- edx = i
40050a: 48 63 ca movsxd rcx,edx -- rcx = i
40050d: 48 8b 55 e8 mov rdx,QWORD PTR [rbp-0x18] -- rdx = *input[0]
400511: 48 01 ca add rdx,rcx -- rdx = *input[0+i]
400514: 0f b6 0a movzx ecx,BYTE PTR [rdx] -- ecx = *input[0+i]
400517: 8b 55 fc mov edx,DWORD PTR [rbp-0x4] -- edx = *i
40051a: 31 ca xor edx,ecx -- dl = i ^ input[i]
40051c: 88 10 mov BYTE PTR [rax],dl -- input[i] = dl
40051e: 83 45 fc 01 add DWORD PTR [rbp-0x4],0x1 -- i = i+1
400522: 8b 45 fc mov eax,DWORD PTR [rbp-0x4] -- eax = i
400525: 3b 45 e4 cmp eax,DWORD PTR [rbp-0x1c] -- if (eax <= i)
400528: 7e d0 jle 4004fa -- jmp...
40052a: 90 nop
40052b: 5d pop rbp
40052c: c3 ret
注册机如下:
input = [0x0, 0x67, 0x6e, 0x62, 0x63, 0x7e, 0x74, 0x62, 0x69, 0x6d,
0x55, 0x6a, 0x7f, 0x60, 0x51, 0x66, 0x63, 0x4e, 0x66, 0x7b,
0x71, 0x4a, 0x74, 0x76, 0x6b, 0x70, 0x79, 0x66 , 0x1c]
result = ""
for i in range(1, 29):
result = result + chr(input[i] ^ i)
print(result)