环境:
Windows xp sp3
查壳,这次不用脱壳了,但是还是Delphi程序。
打开后看随便输点东西进去,发现Nome什么都能输入,但最多10个字符,而
Codice可以是数字或者是“$”,在输入“$”后就可以输入“a,b,c,d,e,f",大小写都行或者输入“x”也可以输入“abcdef”了。点一下Cancella,清零了。
嗯?难道这个是用来清空的?
OK又点不了。点一下About-help看看有什么用。
发现原来这次程序的要求是使得下面两个按钮都消失,可以看到那张logo。
OD载入,有了前两次对付Delphi的程序的经验,查字符串,看看有什么事件:
0044297C . /782C4400 dd aLoNg3x_.00442C78
00442980 . |0C db 0C
00442981 . |43 6F 64 69 6>ascii "CodiceChange"
0044298D |0E db 0E
0044298E |00 db 00
0044298F . |642D4400 dd aLoNg3x_.00442D64
00442993 . |07 db 07
00442994 . |4F 6B 43 6C 6>ascii "OkClick"
0044299B |11 db 11
0044299C |00 db 00
0044299D . |042E4400 dd aLoNg3x_.00442E04
004429A1 . |0A db 0A
004429A2 . |4E 6F 6D 65 4>ascii "NomeChange"
004429AC |14 db 14
004429AD |00 db 00
004429AE . |A82E4400 dd aLoNg3x_.00442EA8
004429B2 . |0D db 0D
004429B3 . |43 61 6E 63 6>ascii "CancellaClick"
004429C0 |11 db 11
004429C1 |00 db 00
004429C2 . |4C2F4400 dd aLoNg3x_.00442F4C
004429C6 . |0A db 0A
004429C7 . |41 62 6F 75 7>ascii "AboutClick"
最后一个AboutClick我猜就是不用跟进去的,它就是帮助文档。
先跟CodiceChange进去看看:
根据名字猜测,这段函数如果下了断点每次输入都会运行。
00442C78 /. 55 push ebp
00442C79 |. 8BEC mov ebp,esp
00442C7B |. 33C9 xor ecx,ecx
00442C7D |. 51 push ecx
00442C7E |. 51 push ecx
00442C7F |. 51 push ecx
00442C80 |. 51 push ecx
00442C81 |. 53 push ebx
00442C82 |. 56 push esi
00442C83 |. 8BD8 mov ebx,eax
00442C85 |. 33C0 xor eax,eax
00442C87 |. 55 push ebp
00442C88 |. 68 562D4400 push aLoNg3x_.00442D56
00442C8D |. 64:FF30 push dword ptr fs:[eax]
00442C90 |. 64:8920 mov dword ptr fs:[eax],esp
00442C93 |. 8D55 F8 lea edx,[local.2] ; 这里应该是选择输入的codies保存的位置
00442C96 |. 8B83 E0020000 mov eax,dword ptr ds:[ebx+0x2E0]
00442C9C |. E8 1F06FEFF call aLoNg3x_.004232C0 ; 这个函数应该是获得输入codies
00442CA1 |. 8B45 F8 mov eax,[local.2] ; 出来后可以看到输入的Codies在[local.2]
00442CA4 |. 8D55 FC lea edx,[local.1]
00442CA7 |. E8 ACFCFBFF call aLoNg3x_.00402958 ; 这个是计算输入的Codies的
00442CAC |. 8BF0 mov esi,eax ; 发现[00402958]将输入的内容转为16进制
00442CAE |. 837D FC 00 cmp [local.1],0x0
00442CB2 |. 74 18 je XaLoNg3x_.00442CCC
00442CB4 |. 8D55 F4 lea edx,[local.3]
00442CB7 |. 8BC6 mov eax,esi
00442CB9 |. E8 8249FCFF call aLoNg3x_.00407640
00442CBE |. 8B55 F4 mov edx,[local.3]
00442CC1 |. 8B83 E0020000 mov eax,dword ptr ds:[ebx+0x2E0]
00442CC7 |. E8 2406FEFF call aLoNg3x_.004232F0
00442CCC |> 8B83 D0020000 mov eax,dword ptr ds:[ebx+0x2D0]
00442CD2 |. 8078 47 00 cmp byte ptr ds:[eax+0x47],0x0
00442CD6 |. 75 0F jnz XaLoNg3x_.00442CE7
00442CD8 |. B2 01 mov dl,0x1
00442CDA |. 8B83 CC020000 mov eax,dword ptr ds:[ebx+0x2CC]
00442CE0 |. 8B08 mov ecx,dword ptr ds:[eax]
00442CE2 |. FF51 60 call dword ptr ds:[ecx+0x60]
00442CE5 |. EB 49 jmp XaLoNg3x_.00442D30
00442CE7 |> 8D55 F8 lea edx,[local.2]
00442CEA |. 8B83 E0020000 mov eax,dword ptr ds:[ebx+0x2E0]
00442CF0 |. E8 CB05FEFF call aLoNg3x_.004232C0
00442CF5 |. 8B45 F8 mov eax,[local.2] ;
00442CF8 |. 50 push eax
00442CF9 |. 8D55 F0 lea edx,[local.4] ; 用户名保存位置
00442CFC |. 8B83 DC020000 mov eax,dword ptr ds:[ebx+0x2DC]
00442D02 |. E8 B905FEFF call aLoNg3x_.004232C0 ; 这里调用的函数和上面的一样,也是[4232C0]
00442D07 |. 8B45 F0 mov eax,[local.4] ; 这样输入的Nmae就在Local.4里面了
00442D0A |. 5A pop edx
00442D0B |. E8 2CFDFFFF call aLoNg3x_.00442A3C ; 这里有个call,下面有个跳转,跟进去看一看
00442D10 |. 84C0 test al,al
00442D12 |. 74 0F je XaLoNg3x_.00442D23
00442D14 |. B2 01 mov dl,0x1
00442D16 |. 8B83 CC020000 mov eax,dword ptr ds:[ebx+0x2CC]
00442D1C |. 8B08 mov ecx,dword ptr ds:[eax]
00442D1E |. FF51 60 call dword ptr ds:[ecx+0x60]
00442D21 |. EB 0D jmp XaLoNg3x_.00442D30
00442D23 |> 33D2 xor edx,edx
00442D25 |. 8B83 CC020000 mov eax,dword ptr ds:[ebx+0x2CC]
00442D2B |. 8B08 mov ecx,dword ptr ds:[eax]
00442D2D |. FF51 60 call dword ptr ds:[ecx+0x60]
00442D30 |> 33C0 xor eax,eax
00442D32 |. 5A pop edx
00442D33 |. 59 pop ecx
00442D34 |. 59 pop ecx
00442D35 |. 64:8910 mov dword ptr fs:[eax],edx
00442D38 |. 68 5D2D4400 push aLoNg3x_.00442D5D
00442D3D |> 8D45 F0 lea eax,[local.4]
00442D40 |. E8 730AFCFF call aLoNg3x_.004037B8
00442D45 |. 8D45 F4 lea eax,[local.3]
00442D48 |. E8 6B0AFCFF call aLoNg3x_.004037B8
00442D4D |. 8D45 F8 lea eax,[local.2]
00442D50 |. E8 630AFCFF call aLoNg3x_.004037B8
00442D55 \. C3 retn
跟到这里来:
00442A3C /$ 55 push ebp ; 计算第一个要求使得ok显示
00442A3D |. 8BEC mov ebp,esp
00442A3F |. 83C4 F8 add esp,-0x8
00442A42 |. 53 push ebx
00442A43 |. 56 push esi
00442A44 |. 8955 F8 mov [local.2],edx
00442A47 |. 8945 FC mov [local.1],eax
00442A4A |. 8B45 FC mov eax,[local.1]
00442A4D |. E8 9611FCFF call aLoNg3x_.00403BE8
00442A52 |. 8B45 F8 mov eax,[local.2]
00442A55 |. E8 8E11FCFF call aLoNg3x_.00403BE8
00442A5A |. 33C0 xor eax,eax
00442A5C |. 55 push ebp
00442A5D |. 68 E52A4400 push aLoNg3x_.00442AE5
00442A62 |. 64:FF30 push dword ptr fs:[eax]
00442A65 |. 64:8920 mov dword ptr fs:[eax],esp
00442A68 |. 8B45 FC mov eax,[local.1]
00442A6B |. E8 C40FFCFF call aLoNg3x_.00403A34 ; 猜这里是获得Name的长度
00442A70 |. 83F8 05 cmp eax,0x5 ; 用户名长度不能小于等于5
00442A73 |. 7E 53 jle XaLoNg3x_.00442AC8
00442A75 |. 8B45 FC mov eax,[local.1]
00442A78 |. E8 B70FFCFF call aLoNg3x_.00403A34 ; 这里和上面是同一个函数,所以也是获得长度
00442A7D |. 8BD8 mov ebx,eax ; 把长度记录下来
00442A7F |. 8B45 FC mov eax,[local.1]
00442A82 |. E8 AD0FFCFF call aLoNg3x_.00403A34 ; 同上
00442A87 |. 8BD0 mov edx,eax ; 将长度L给edx
00442A89 |. 4A dec edx ; edx = edx - 1
00442A8A |. 85D2 test edx,edx
00442A8C |. 7E 20 jle XaLoNg3x_.00442AAE
00442A8E |. B8 01000000 mov eax,0x1 ; eax赋值为1
00442A93 |> 8B4D FC /mov ecx,[local.1]
00442A96 |. 0FB64C01 FF |movzx ecx,byte ptr ds:[ecx+eax-0x1] ; 这里有个计算
00442A9B |. 8B75 FC |mov esi,[local.1] ;
00442A9E |. 0FB63406 |movzx esi,byte ptr ds:[esi+eax] ;
00442AA2 |. 0FAFCE |imul ecx,esi ;
00442AA5 |. 0FAFC8 |imul ecx,eax
00442AA8 |. 03D9 |add ebx,ecx
00442AAA |. 40 |inc eax
00442AAB |. 4A |dec edx
00442AAC |.^ 75 E5 \jnz XaLoNg3x_.00442A93
00442AAE |> 8B45 F8 mov eax,[local.2]
00442AB1 |. E8 BA4BFCFF call aLoNg3x_.00407670 ; 将输入的Codies转成16进制,保存在eax中
00442AB6 |. 2BD8 sub ebx,eax ; 将上面计算出来的结果相减
00442AB8 |. 81FB 9A020000 cmp ebx,0x29A ;比较差值是不是0x29A
00442ABE |. 75 04 jnz XaLoNg3x_.00442AC4
00442AC0 |. B3 01 mov bl,0x1
00442AC2 |. EB 06 jmp XaLoNg3x_.00442ACA
00442AC4 |> 33DB xor ebx,ebx
00442AC6 |. EB 02 jmp XaLoNg3x_.00442ACA
00442AC8 |> 33DB xor ebx,ebx
00442ACA |> 33C0 xor eax,eax
00442ACC |. 5A pop edx
00442ACD |. 59 pop ecx
00442ACE |. 59 pop ecx
00442ACF |. 64:8910 mov dword ptr fs:[eax],edx
00442AD2 |. 68 EC2A4400 push aLoNg3x_.00442AEC
00442AD7 |> 8D45 F8 lea eax,[local.2]
00442ADA |. BA 02000000 mov edx,0x2
00442ADF |. E8 F80CFCFF call aLoNg3x_.004037DC
00442AE4 \. C3 retn
分析上面计算过程就是:
设:
输入的Nome为数组name
输入的name的长度为L,即:
strlen(name) == L
sum 为计算结果,有:
sum += name[i-1]*name[i]*(i+1) i的取值范围是[0,L)
最后记得sum+=L,因为一开始计算的时候ebx的值是L
得出来的sum -= 0x29A,得到的结果填到Codice里面
填进去之后发现OK亮了,怀着紧张激动的心情点一下,发现回到原点。。。。
那点Cancella呢?也是一样。那就跟到CancellaClick看一看
00442EA8 /. 55 push ebp
00442EA9 |. 8BEC mov ebp,esp
00442EAB |. 6A 00 push 0x0
00442EAD |. 53 push ebx
00442EAE |. 8BD8 mov ebx,eax
00442EB0 |. 33C0 xor eax,eax
00442EB2 |. 55 push ebp
00442EB3 |. 68 322F4400 push aLoNg3x_.00442F32
00442EB8 |. 64:FF30 push dword ptr fs:[eax]
00442EBB |. 64:8920 mov dword ptr fs:[eax],esp
00442EBE |. 8D55 FC lea edx,[local.1]
00442EC1 |. 8B83 E0020000 mov eax,dword ptr ds:[ebx+0x2E0]
00442EC7 |. E8 F403FEFF call aLoNg3x_.004232C0 ; 将输入的读到local.1
00442ECC |. 8B45 FC mov eax,[local.1]
00442ECF |. E8 9C47FCFF call aLoNg3x_.00407670
00442ED4 |. 50 push eax ; 转成内容
00442ED5 |. 8D55 FC lea edx,[local.1]
00442ED8 |. 8B83 DC020000 mov eax,dword ptr ds:[ebx+0x2DC]
00442EDE |. E8 DD03FEFF call aLoNg3x_.004232C0 ; 读name
00442EE3 |. 8B45 FC mov eax,[local.1]
00442EE6 |. 5A pop edx
00442EE7 |. E8 08FCFFFF call aLoNg3x_.00442AF4 ; 这个和上面那个差不多,call完就test,后面就接着跳,跟进去看一看
00442EEC |. 84C0 test al,al
00442EEE |. 74 1C je XaLoNg3x_.00442F0C ; 输入的内容不符合要求就跳,那就看看怎样使得它不跳
00442EF0 |. 33D2 xor edx,edx
00442EF2 |. 8B83 D0020000 mov eax,dword ptr ds:[ebx+0x2D0]
00442EF8 |. E8 B302FEFF call aLoNg3x_.004231B0
00442EFD |. B2 01 mov dl,0x1
00442EFF |. 8B83 CC020000 mov eax,dword ptr ds:[ebx+0x2CC]
00442F05 |. 8B08 mov ecx,dword ptr ds:[eax]
00442F07 |. FF51 60 call dword ptr ds:[ecx+0x60]
00442F0A |. EB 10 jmp XaLoNg3x_.00442F1C
00442F0C |> BA 482F4400 mov edx,aLoNg3x_.00442F48 ; 0
00442F11 |. 8B83 E0020000 mov eax,dword ptr ds:[ebx+0x2E0]
00442F17 |. E8 D403FEFF call aLoNg3x_.004232F0
00442F1C |> 33C0 xor eax,eax
00442F1E |. 5A pop edx
00442F1F |. 59 pop ecx
00442F20 |. 59 pop ecx
00442F21 |. 64:8910 mov dword ptr fs:[eax],edx
00442F24 |. 68 392F4400 push aLoNg3x_.00442F39
00442F29 |> 8D45 FC lea eax,[local.1]
00442F2C |. E8 8708FCFF call aLoNg3x_.004037B8
00442F31 \. C3 retn
00442AF4:
00442AF4 /$ 55 push ebp ; 发现和刚才的差不多,也是有个计算
00442AF5 |. 8BEC mov ebp,esp
00442AF7 |. 83C4 F8 add esp,-0x8
00442AFA |. 53 push ebx
00442AFB |. 56 push esi
00442AFC |. 8955 F8 mov [local.2],edx ;local.2是Codies的16进制
00442AFF |. 8945 FC mov [local.1],eax ;local.1是Nome
00442B02 |. 8B45 FC mov eax,[local.1]
00442B05 |. E8 DE10FCFF call aLoNg3x_.00403BE8
00442B0A |. 33C0 xor eax,eax
00442B0C |. 55 push ebp
00442B0D |. 68 902B4400 push aLoNg3x_.00442B90
00442B12 |. 64:FF30 push dword ptr fs:[eax]
00442B15 |. 64:8920 mov dword ptr fs:[eax],esp
00442B18 |. 8B45 FC mov eax,[local.1]
00442B1B |. E8 140FFCFF call aLoNg3x_.00403A34 ; 取长度
00442B20 |. 83F8 05 cmp eax,0x5
00442B23 |. 7E 53 jle XaLoNg3x_.00442B78
00442B25 |. 8B45 FC mov eax,[local.1]
00442B28 |. 0FB640 04 movzx eax,byte ptr ds:[eax+0x4] ; 拿到第5个字符
00442B2C |. B9 07000000 mov ecx,0x7
00442B31 |. 33D2 xor edx,edx
00442B33 |. F7F1 div ecx
00442B35 |. 8BC2 mov eax,edx ; 除以0x7的余数给eax
00442B37 |. 83C0 02 add eax,0x2 ; 余数加上2
00442B3A |. E8 E1FEFFFF call aLoNg3x_.00442A20 ; 计算余数的阶乘
00442B3F |. 8BF0 mov esi,eax
00442B41 |. 33DB xor ebx,ebx
00442B43 |. 8B45 FC mov eax,[local.1]
00442B46 |. E8 E90EFCFF call aLoNg3x_.00403A34 ; 取长度
00442B4B |. 85C0 test eax,eax
00442B4D |. 7E 16 jle XaLoNg3x_.00442B65
00442B4F |. BA 01000000 mov edx,0x1
00442B54 |> 8B4D FC /mov ecx,[local.1]
00442B57 |. 0FB64C11 FF |movzx ecx,byte ptr ds:[ecx+edx-0x1]
00442B5C |. 0FAFCE |imul ecx,esi ; 余数的阶乘乘以每一个位上的值
00442B5F |. 03D9 |add ebx,ecx
00442B61 |. 42 |inc edx
00442B62 |. 48 |dec eax
00442B63 |.^ 75 EF \jnz XaLoNg3x_.00442B54
00442B65 |> 2B5D F8 sub ebx,[local.2] ; 减去它的16进制的值
00442B68 |. 81FB 697A0000 cmp ebx,0x7A69 ; 和0x7A69比较
00442B6E |. 75 04 jnz XaLoNg3x_.00442B74
00442B70 |. B3 01 mov bl,0x1
00442B72 |. EB 06 jmp XaLoNg3x_.00442B7A
00442B74 |> 33DB xor ebx,ebx
00442B76 |. EB 02 jmp XaLoNg3x_.00442B7A
00442B78 |> 33DB xor ebx,ebx
00442B7A |> 33C0 xor eax,eax
00442B7C |. 5A pop edx
00442B7D |. 59 pop ecx
00442B7E |. 59 pop ecx
00442B7F |. 64:8910 mov dword ptr fs:[eax],edx
00442B82 |. 68 972B4400 push aLoNg3x_.00442B97
00442B87 |> 8D45 FC lea eax,[local.1]
00442B8A |. E8 290CFCFF call aLoNg3x_.004037B8
00442B8F \. C3 retn
计算过程如下:
有:Name[4](这个是第5个字符)
x = Name[4]%7+2
x = x!(这里是x的阶乘)
sum += x*Name[i] i的取值是[0,L)
sum -= 0x7A69
上次是0x29A,这次是0x7A69。难道输入的Nome和Codice都要符合要求?
写个程序出来看看能不能猜出来,猜了一会发现没这个技术,那就穷举吧。
举了好一会,都没有出结果。会不会是猜错了?
反正Cancella的要求是0x7A69,搞个符合要求的就好了。
按照上面的计算过程,得到:
Nome:goodname
Codice::4212343
点一下Cancella,居然消失,哈哈哈!
那我在点一下Ok,没反应。。。
那看来,Ok的要求又不一样了。那就跟到OkClick看一看:
00442D64 /. 55 push ebp ; OK click
00442D65 |. 8BEC mov ebp,esp
00442D67 |. 6A 00 push 0x0
00442D69 |. 53 push ebx
00442D6A |. 8BD8 mov ebx,eax
00442D6C |. 33C0 xor eax,eax
00442D6E |. 55 push ebp
00442D6F |. 68 ED2D4400 push aLoNg3x_.00442DED
00442D74 |. 64:FF30 push dword ptr fs:[eax]
00442D77 |. 64:8920 mov dword ptr fs:[eax],esp
00442D7A |. 8B83 D0020000 mov eax,dword ptr ds:[ebx+0x2D0]
00442D80 |. 8078 47 01 cmp byte ptr ds:[eax+0x47],0x1 ; 判断后面那个按钮是否隐藏了
00442D84 |. 75 12 jnz XaLoNg3x_.00442D98
00442D86 |. BA 002E4400 mov edx,aLoNg3x_.00442E00 ; 0
00442D8B |. 8B83 E0020000 mov eax,dword ptr ds:[ebx+0x2E0]
00442D91 |. E8 5A05FEFF call aLoNg3x_.004232F0
00442D96 |. EB 3F jmp XaLoNg3x_.00442DD7
00442D98 |> 8D55 FC lea edx,[local.1]
00442D9B |. 8B83 E0020000 mov eax,dword ptr ds:[ebx+0x2E0]
00442DA1 |. E8 1A05FEFF call aLoNg3x_.004232C0 ;这里使得local.1的内容是输入的Codeis
00442DA6 |. 8B45 FC mov eax,[local.1]
00442DA9 |. E8 C248FCFF call aLoNg3x_.00407670 ;这里是转成16进制
00442DAE |. 50 push eax
00442DAF |. 8D55 FC lea edx,[local.1] ;
00442DB2 |. 8B83 DC020000 mov eax,dword ptr ds:[ebx+0x2DC] ;
00442DB8 |. E8 0305FEFF call aLoNg3x_.004232C0 ; 这里是读到输入的Nome
00442DBD |. 8B45 FC mov eax,[local.1]
00442DC0 |. 5A pop edx ; pop出来的内容是Codies的16进制
00442DC1 |. E8 DAFDFFFF call aLoNg3x_.00442BA0 ; 这里还是有个test,这个call的后面的格式,让人不跟进去都难啊
00442DC6 |. 84C0 test al,al
00442DC8 |. 74 0D je XaLoNg3x_.00442DD7
00442DCA |. 33D2 xor edx,edx
00442DCC |. 8B83 CC020000 mov eax,dword ptr ds:[ebx+0x2CC]
00442DD2 |. E8 D903FEFF call aLoNg3x_.004231B0
00442DD7 |> 33C0 xor eax,eax
00442DD9 |. 5A pop edx
00442DDA |. 59 pop ecx
00442DDB |. 59 pop ecx
00442DDC |. 64:8910 mov dword ptr fs:[eax],edx
00442DDF |. 68 F42D4400 push aLoNg3x_.00442DF4
00442DE4 |> 8D45 FC lea eax,[local.1]
00442DE7 |. E8 CC09FCFF call aLoNg3x_.004037B8
00442DEC \. C3 retn
[442BA0]跟进去看一看:
00442BA0 /$ 55 push ebp ;
00442BA1 |. 8BEC mov ebp,esp
00442BA3 |. 6A 00 push 0x0
00442BA5 |. 6A 00 push 0x0
00442BA7 |. 6A 00 push 0x0
00442BA9 |. 53 push ebx
00442BAA |. 56 push esi
00442BAB |. 8BF2 mov esi,edx
00442BAD |. 8945 FC mov [local.1],eax
00442BB0 |. 8B45 FC mov eax,[local.1]
00442BB3 |. E8 3010FCFF call aLoNg3x_.00403BE8
00442BB8 |. 33C0 xor eax,eax
00442BBA |. 55 push ebp
00442BBB |. 68 672C4400 push aLoNg3x_.00442C67
00442BC0 |. 64:FF30 push dword ptr fs:[eax]
00442BC3 |. 64:8920 mov dword ptr fs:[eax],esp
00442BC6 |. 33DB xor ebx,ebx
00442BC8 |. 8D55 F8 lea edx,[local.2]
00442BCB |. 8BC6 mov eax,esi
00442BCD |. E8 6E4AFCFF call aLoNg3x_.00407640 ; 这里将输入的Codies保存在local.2中
00442BD2 |. 8D45 F4 lea eax,[local.3]
00442BD5 |. 8B55 F8 mov edx,[local.2]
00442BD8 |. E8 730CFCFF call aLoNg3x_.00403850
00442BDD |. 8B45 F8 mov eax,[local.2]
00442BE0 |. E8 4F0EFCFF call aLoNg3x_.00403A34 ;这个是拿到输入Codies的长度
00442BE5 |. 83F8 05 cmp eax,0x5 ; 长度要大于5
00442BE8 |. 7E 60 jle XaLoNg3x_.00442C4A
00442BEA |. 8B45 F8 mov eax,[local.2]
00442BED |. E8 420EFCFF call aLoNg3x_.00403A34 ; 继续拿到Codies的长度
00442BF2 |. 8BF0 mov esi,eax
00442BF4 |. 83FE 01 cmp esi,0x1
00442BF7 |. 7C 2F jl XaLoNg3x_.00442C28
00442BF9 |> 8D45 F4 /lea eax,[local.3]
00442BFC |. E8 0310FCFF |call aLoNg3x_.00403C04
00442C01 |. 8D4430 FF |lea eax,dword ptr ds:[eax+esi-0x1]
00442C05 |. 50 |push eax
00442C06 |. 8B45 F8 |mov eax,[local.2]
00442C09 |. 0FB64430 FF |movzx eax,byte ptr ds:[eax+esi-0x1]
00442C0E |. F7E8 |imul eax ; eax*eax
00442C10 |. 0FBFC0 |movsx eax,ax ; 取后4位
00442C13 |. F7EE |imul esi ; *esi
00442C15 |. B9 19000000 |mov ecx,0x19
00442C1A |. 99 |cdq
00442C1B |. F7F9 |idiv ecx ; /0x19
00442C1D |. 83C2 41 |add edx,0x41 ; 余数+0x41
00442C20 |. 58 |pop eax
00442C21 |. 8810 |mov byte ptr ds:[eax],dl
00442C23 |. 4E |dec esi
00442C24 |. 85F6 |test esi,esi
00442C26 |.^ 75 D1 \jnz XaLoNg3x_.00442BF9
00442C28 |> 8B45 F4 mov eax,[local.3] ;经过上面的计算local.3生成一个字符串
00442C2B |. 8B55 FC mov edx,[local.1] ;local.1是输入的Nome
00442C2E |. E8 110FFCFF call aLoNg3x_.00403B44 :这个是比较
00442C33 |. 75 17 jnz XaLoNg3x_.00442C4C ;不等就跳
00442C35 |. 8B45 FC mov eax,[local.1]
00442C38 |. 8B55 F4 mov edx,[local.3]
00442C3B |. E8 040FFCFF call aLoNg3x_.00403B44
00442C40 |. 75 04 jnz XaLoNg3x_.00442C46
00442C42 |. B3 01 mov bl,0x1
00442C44 |. EB 06 jmp XaLoNg3x_.00442C4C
00442C46 |> 33DB xor ebx,ebx
00442C48 |. EB 02 jmp XaLoNg3x_.00442C4C
00442C4A |> 33DB xor ebx,ebx
00442C4C |> 33C0 xor eax,eax
00442C4E |. 5A pop edx
00442C4F |. 59 pop ecx
00442C50 |. 59 pop ecx
00442C51 |. 64:8910 mov dword ptr fs:[eax],edx
00442C54 |. 68 6E2C4400 push aLoNg3x_.00442C6E
00442C59 |> 8D45 F4 lea eax,[local.3]
00442C5C |. BA 03000000 mov edx,0x3
00442C61 |. E8 760BFCFF call aLoNg3x_.004037DC
00442C66 \. C3 retn
上面的计算过程是:
设:
首先将输入的Codice转为字符串ss
计算最终会生成一个字符串与输入的字符串进行比较,
所以设N为生成的字符串。
ss的长度为L(这个L不等于上面的L)
sum为结果
这次是从后往前计算:
sum = ss[i] * ss[i] *(i+1) % 0x19 + 0x41
N[i] = sum
i的取值范围是[0,L-1)
这样就生成了一个N了,这次这个N是由Codies生成的。
输入个什么鬼东西会生成个goodname呢?
不可能,因为那个求余0x19+0x41使得取值范围在[65,90],所以Nome都是大写字母来的
找出符合要求的Nome和Codies,
Nome:BADQUV
Codice:123456
输入完后点击Ok,这样Ok也不见了。可以看到RingZer0这个logo了
这里有个问题:
首先输入个Nome和Codice(称它们为X),这个X是符合CancellaClick的要求的,这样就可以把Cancella隐藏了
但是这个X未必是符合OkClick的要求的,但是在Cancella隐藏后,X是可以更改的,将它们改为符合Y(即符合OkClick事件)
的要求就行了。
那有没有都符合CancellaClick事件的要求也符合OkClick事件的要求呢?写个程序,由于CPU太菜且作者太懒
这里只有Nome为6位符合要求的Nome和Codies:
AADQAE -21425
AAIAUG -28793
ACMQFA -30487
这个是穷举出来的,代码根据上面的计算过程可以写出。