大贏家4.5演算法分析
作者:ssljx/iPB
時間:2002。10。5
級別:最簡單
原因:朋友老周要找個足彩的軟體,在網上找到的都是爆破的序號產生器都不能用,沒法就把它連根拔了。。。
:004C66DE BB01000000 mov
ebx, 00000001
:004C66E3 8D4DCC
lea ecx, dword ptr [ebp-34]
* Referenced by a (U)nconditional
or (C)onditional Jump at Address:
|:004C6728(C)
|
:004C66E6 4E
dec esi
:004C66E7 83FE07
cmp esi, 00000007
:004C66EA
7605 jbe
004C66F1
:004C66EC E81BD3F3FF
call 00403A0C
* Referenced by a (U)nconditional or (C)onditional Jump
at Address:
|:004C66EA(C)
|
:004C66F1 46
inc esi
:004C66F2 8B04B7
mov eax, dword ptr [edi+4*esi]
:004C66F5 4B
dec ebx
:004C66F6 85C0
test eax, eax
:004C66F8 7405
je 004C66FF
:004C66FA 3B58FC
cmp ebx, dword ptr [eax-04]
:004C66FD 7205
jb 004C6704
* Referenced by a (U)nconditional or (C)onditional
Jump at Address:
|:004C66F8(C)
|
:004C66FF E808D3F3FF
call 00403A0C
* Referenced by a (U)nconditional
or (C)onditional Jump at Address:
|:004C66FD(C)
|
:004C6704 43
inc ebx
:004C6705 0FB64418FF movzx
eax, byte ptr [eax+ebx-01] //逐一取出第n組字串的字元的ASCII碼
:004C670A 03C3
add eax, ebx
//加上內迴圈的值
:004C670C 7105
jno 004C6713
:004C670E E801D3F3FF
call 00403A14
* Referenced by a (U)nconditional or (C)onditional
Jump at Address:
|:004C670C(C)
|
:004C6713 3301
xor eax, dword ptr [ecx]
//與機械碼的各位數字作異或運算
:004C6715 51
push ecx
:004C6716
B90A000000 mov ecx, 0000000A
//edx=eax mod $a;
:004C671B
99
cdq
:004C671C F7F9
idiv ecx
:004C671E 59
pop ecx
:004C671F 8911
mov dword ptr [ecx], edx
//將運算結果逐位替換機械碼,留著下迴圈
:004C6721 43
inc ebx
:004C6722
83C104 add ecx,
00000004
:004C6725 83FB0B
cmp ebx, 0000000B
//內迴圈10次
:004C6728 75BC
jne 004C66E6
:004C672A 46
inc esi
:004C672B 83FE09
cmp esi, 00000009
//外迴圈8次
:004C672E
75AE jne
004C66DE
===================================================================================================
八個字串為:
Code[1]:='@SY^&+@!%Q';
Code[2]:='!$!@$!#@^&';
Code[3]:='&1ASDFqw#@';
Code[4]:='S@#%6BbNQ|';
Code[5]:='@4^3%6345#';
Code[6]:='<>?SW1243t';
Code[7]:='$#@%^$&**(';
Code[8]:='HYK(^#cas_';
演算法總結:
@
S Y ^ &
+ @ ! %
Q
40 53 59
5e 26 2b 40
21 25 51
+
1
2 3 4 5
6 7 8 9
a
41 55
5c 62 2b
31 47 29 2e
5b
xor
7
3 2 3 2
8 8 5 6
0
46 56
5e 61 29
39 4f 2c 28
5b
mod $a
0
6 4 7 1
7 9 4
0 1
:
:
:
再把這些數字跟下一個字串用上面方法計算得出的結果在與下一個字串。。迴圈8次計算最終得出結果!!