W32Dasm来到:
:00411CC0 56 push esi
:00411CC1 8BF1 mov esi, ecx
:00411CC3 6A01 push 00000001
:00411CC5 E8277E0300 call 00449AF1
:00411CCA 8B465C mov eax, dword ptr [esi+5C] ; 订单号的十六进制
:00411CCD 3D801A0600 cmp eax, 00061A80
:00411CD2 7E35 jle 00411D09
:00411CD4 3DE9B00F00 cmp eax, 000FB0E9
:00411CD9 7D2E jge 00411D09
:00411CDB 3D44840600 cmp eax, 00068444
:00411CE0 7427 je 00411D09
:00411CE2 3D40420F00 cmp eax, 000F4240
:00411CE7 7420 je 00411D09
:00411CE9 3DF5340D00 cmp eax, 000D34F5
:00411CEE 7419 je 00411D09
:00411CF0 3D2A830800 cmp eax, 0008832A
:00411CF5 7412 je 00411D09
:00411CF7 3D40E20100 cmp eax, 0001E240
:00411CFC 740B je 00411D09
:00411CFE 6A01 push 00000001
:00411D00 8BCE mov ecx, esi
:00411D02 E87D500300 call 00446D84
:00411D07 5E pop esi
:00411D08 C3 ret
* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:00411CD2(C), :00411CD9(C), :00411CE0(C), :00411CE7(C), :00411CEE(C)
|:00411CF5(C), :00411CFC(C)
|
:00411D09 6A00 push 00000000
:00411D0B 6A00 push 00000000
* Possible StringData Ref from Data Obj ->"Invalid Code!"
|
:00411D0D 68E4B44700 push 0047B4E4
:00411D12 8BCE mov ecx, esi
:00411D14 E8EF700300 call 00448E08
:00411D19 6A00 push 00000000
:00411D1B 8BCE mov ecx, esi
:00411D1D E862500300 call 00446D84
:00411D22 5E pop esi
:00411D23 C3 ret
2.1 W32Dasm来到:
* Referenced by a (U)nconditional or (C)onditional Jump at Address:
|:004140EB(C)
|
:004140F9 57 push edi // 从00411D08 ret可到达这里
* Possible StringData Ref from Data Obj ->"10134"
|
:004140FA 6820A34700 push 0047A320
:004140FF E82CDAFFFF call 00411B30 // 取得key,保存
:00414104 83C404 add esp, 00000004
:00414107 8BCE mov ecx, esi
:00414109 8BF8 mov edi, eax
:0041410B E810010000 call 00414220 // 检查W32Dasm,SoftIce
:00414110 85FF test edi, edi
:00414112 5F pop edi
:00414113 0F84E0000000 je 004141F9
* Possible StringData Ref from Data Obj ->"SFV"
|
:00414119 6828A34700 push 0047A328
:0041411E 8D542408 lea edx, dword ptr [esp+08]
* Possible StringData Ref from Data Obj ->"10134"
|
:00414122 6820A34700 push 0047A320
:00414127 52 push edx
:00414128 E883DAFFFF call 00411BB0 // 取出key,计算
:0041412D 8B442410 mov eax, dword ptr [esp+10]
* Possible StringData Ref from Data Obj ->"SFV100-69"
|
:00414131 6838B54700 push 0047B538
:00414136 50 push eax
:00414137 C684248400000001 mov byte ptr [esp+00000084], 01
:0041413F E8D1370100 call 00427915 // 比较
:00414144 83C414 add esp, 00000014
:00414147 85C0 test eax, eax
:00414149 0F94C0 sete al
:0041414C 84C0 test al, al
:0041414E 0F8497000000 je 004141EB
:00414154 8A86DC010000 mov al, byte ptr [esi+000001DC]
:0041415A 84C0 test al, al
:0041415C 754B jne 004141A9
:0041415E 8BCE mov ecx, esi
:00414160 E81B090000 call 00414A80
:00414165 84C0 test al, al
:00414167 7540 jne 004141A9
:00414169 8BCE mov ecx, esi
:0041416B E8B0000000 call 00414220
:00414170 8BCE mov ecx, esi
:00414172 E819020000 call 00414390
:00414177 6A00 push 00000000
* Possible StringData Ref from Data Obj ->"Reg Information"
|
:00414179 6888B54700 push 0047B588
* Possible StringData Ref from Data Obj ->"Registered OK,Thank You!"
|
:0041417E 686CB54700 push 0047B56C
...
* Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
|:0041415C(C), :00414167(C)
|
:004141A9 8BCE mov ecx, esi
:004141AB E870000000 call 00414220
:004141B0 6A00 push 00000000
* Possible StringData Ref from Data Obj ->"Try Again"
|
:004141B2 6850B54700 push 0047B550
* Possible StringData Ref from Data Obj ->"Invalid Key"
|
:004141B7 6844B54700 push 0047B544
参数一:87654321123456788765432112345678,
参数二:“SFV”=53 46 56
得到的edx=2或3,都是一样的计算:XOR CL,AL,NOT CL
参数一转换后:87 65 43 21 12 34 56 78 87 65 43 21 12 34 56 78,
运算值:
009221C4 2B DC EA 8D AB 9D FA C1 +荜??
009221CC 2E C9 FA 88 BE 8D FF D4 .生??
然后又计算了一次,不过运算参数不同,是第一次运算后的值:
100015F5 E8 36020000 call OLCHK32.10001830 ; 又计算了一次
参数一:009221CC 2E C9 FA 88 BE 8D FF D4 .生??
参数二:009221C4 2B DC EA 8D AB 9D FA C1 +荜??
顺取参数一,2个字节转换成1个字节,如果不能得到字符,就变为00,
比如:2E C9 FA 88 BE 8D FF D4转换成:00 00 00 00,
再顺取参数二:00921F3C 2B DC EA 8D AB 9D FA C1,
根据AND 3结果进行运算,
值:009236EC D4 FF 15 8D ???
第一次计算后得到:
009221C4 2B DC EA 8D AB 9D FA C1 2E C9 FA 88 BE 8D FF D4 +荜???生??
009221D4 3E CC EF 98 BB 98 EF D1 2B DC EA 8D AB 9D FA C1 >田???荜??
009221E4 2E C9 FA 88 .生??
这里又发现,程序只是取第1次运算值前8字节作为参数二:2B DC EA 8D AB 9D FA C1
剩下的为参数一:2E C9 FA 88 BE 8D FF D4 3E CC EF 98 BB 98 EF D1 2B DC EA 8D AB 9D FA C1 2E C9 FA 88
因此注册码不需要那么多位,只要:9×2×2+8×2=36+16=52位
8765432112345678 876543211234567887654321123456788765
第一次运算后:
2B DC EA 8D AB 9D FA C1
2E C9 FA 88 BE 8D FF D4 3E CC EF 98 BB 98 EF D1 2B DC 00
第一次运算后结果要为:
2B DC EA 8D AB 9D FA C1
38 37 49 39 34 33 49 4A 36 34 48 4B 32 38 4D 37 4C 4B
初步验证ok。
再反推第一次运算:
参数二:SFV=53 46 56
它们AND 3的结果为edx=2或者3,都是一样的运算:XOR CL,AL,NOT CL
结果要=2B DC EA 8D AB 9D FA C1 38 37 49 39 34 33 49 4A 36 34 48 4B 32 38 4D 37 4C 4B
前面8个字节对应8765432112345678,因为没动,所以不用反推。
只要反推后面的: 38 37 49 39 34 33 49 4A 36 34 48 4B 32 38 4D 37 4C 4B
NOT后的值: C7 C8 B6 C6 CB CC B6 B5 C9 CB B7 B4 CD C7 B2 C8 B3 B4
XOR: V S F V S F V S F V S F V S F V S F
即: 56 53 46 56 53 46 56 53 46 56 53 46 56 53 46 56 53 46
得到的值: 91 9B F0 90 98 8A E0 E6 8F 9D E4 F2 9B 94 F4 9E E0 F2
对应关系:数字+30,字母:A=48,B=49,C=4A,D=4B,E=4C,F=4D
逆运算后:
91 9B F0 90 98 8A E0 E6 8F 9D E4 F2 9B 94 F4 9E E0 F2
3931 3949 4D30 3930 3938 3848 4C30 4C36 384D 394B 4C34 4D32 3949 3934 4D34 394C 4C30 4D32
9 1 9 I M 0 9 0 9 8 8 H L 0 L 6 8 M 9 K L 4 M 2 9 I 9 4 M 4 9 L L 0 M 2