- UID
- 26814
注册时间2007-2-2
阅读权限20
最后登录1970-1-1
以武会友
TA的每日心情 | 开心 2020-11-19 11:04 |
---|
签到天数: 1 天 [LV.1]初来乍到
|
本帖最后由 DaShanRen 于 2016-6-17 16:52 编辑
1、注册码校验
0069846E CALL 006983D8 ; 注册码去掉“-”
00698473 MOV EAX,DWORD PTR SS:[EBP-4] ; 结果
00698476 TEST EAX,EAX
00698478 JE SHORT 0069847F
0069847A SUB EAX,4
0069847D MOV EAX,DWORD PTR DS:[EAX] ; 读取注册码长度
0069847F CMP EAX,1C ; 长度与28比较
00698482 JNZ SHORT 006984C0 ; 不等则跳
00698484 LEA EAX,DWORD PTR SS:[EBP-8]
00698487 PUSH EAX ; /Arg1
00698488 MOV ECX,4 ; |
0069848D MOV EDX,19 ; |
00698492 MOV EAX,DWORD PTR SS:[EBP-4] ; |
00698495 CALL 00408884 ; \截取后四位
0069849A LEA EAX,DWORD PTR SS:[EBP-4]
0069849D MOV EDX,18
006984A2 CALL 0040863C ; 截取前24位
006984A7 LEA EDX,DWORD PTR SS:[EBP-C]
006984AA MOV EAX,DWORD PTR SS:[EBP-4]
006984AD CALL 006982A4 ; 计算前24位的校验码
006984B2 MOV EDX,DWORD PTR SS:[EBP-C] ; 计算结果
006984B5 MOV EAX,DWORD PTR SS:[EBP-8] ; 注册码后4位
006984B8 CALL 0040884C ; 比较
006984BD SETE BL
========校验算法
006982C8 MOV DX,56 ; tmp1=0x56
006982CC MOV AX,0AF ; tmp2=0xAF
006982D0 MOV ECX,DWORD PTR SS:[EBP-4] ; 指向注册码前24位
006982D3 TEST ECX,ECX
006982D5 JE SHORT 006982DC
006982D7 SUB ECX,4
006982DA MOV ECX,DWORD PTR DS:[ECX] ; 读取长度值
006982DC TEST ECX,ECX
006982DE JLE SHORT 00698311
006982E0 TEST ECX,ECX
006982E2 JLE SHORT 00698311
006982E4 MOV EBX,1 ; i=1
006982E9 /MOV ESI,DWORD PTR SS:[EBP-4] ; 指向前24位
006982EC |MOVZX ESI,BYTE PTR DS:[ESI+EBX*2-2]
006982F1 |ADD AX,SI ; tmp2+=第i位
006982F4 |CMP AX,0FF ; 结果与255比较
006982F8 |JBE SHORT 006982FE ; 不大于则跳
006982FA |SUB AX,0FF ; 否则tmp2-=255
006982FE |ADD DX,AX ; tmp1+=tmp2
00698301 |CMP DX,0FF ; 结果与255比较
00698306 |JBE SHORT 0069830D ; 不大于则跳
00698308 |SUB DX,0FF ; 否则tmp1-=255
0069830D |INC EBX ; i++
0069830E |DEC ECX
0069830F \JNZ SHORT 006982E9 ; 未完继续
00698311 MOV EBX,EDX ; tmp=tmp1--tmp2=F3,tmp1=FE
00698313 SHL EBX,8 ; tmp<<8
00698316 ADD BX,AX ; tmp+=tmp2--重组tmp=FEF3
00698319 MOV ECX,DWORD PTR SS:[EBP-8]
0069831C MOVZX EAX,BX ; 转移结果
0069831F MOV EDX,4
00698324 CALL 00420C04 ; 结果转化为4位Hex字符串
========
2、注册码合法性检验
0069851E CALL 00698150 ; 长度检测,长度不小于25,不大于200
00698523 TEST AL,AL
00698525 JE 006988CB
0069852B MOV EAX,EBX ; 注册码
0069852D CALL 0069844C ; 注册码校验值检测
00698532 TEST AL,AL
00698534 JE 006988CB
0069853A LEA EDX,DWORD PTR SS:[EBP-4]
0069853D MOV EAX,EBX ; 注册码
0069853F CALL 006983D8 ; 去掉连接符“-”
00698544 MOV ESI,1
00698549 MOV EBX,DWORD PTR DS:[7BEED0] ; ImgConve.007BCF88
0069854F /LEA EDX,DWORD PTR SS:[EBP-C]
00698552 |MOV EAX,DWORD PTR DS:[EBX] ; "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX"
00698554 |CALL 006983D8 ; 去掉连接符“-”
00698559 |LEA EAX,DWORD PTR SS:[EBP-10]
0069855C |MOV EDX,DWORD PTR SS:[EBP-4] ; 无连接符的注册码
0069855F |CALL 00407B4C
00698564 |MOV EDX,DWORD PTR SS:[EBP-10] ; 无连接符的注册码
00698567 |MOV EAX,DWORD PTR SS:[EBP-C] ; "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
0069856A |CALL 0045CF88 ; 比较
0069856F |TEST AL,AL
00698571 |JE SHORT 0069857D
00698573 |MOV ESI,3
00698578 |JMP 006988CB
0069857D |ADD EBX,4
00698580 |DEC ESI
00698581 \JNZ SHORT 0069854F
3、注册名计算
0147B1AC 77 00 77 00 77 00 2E 00 D8 98 91 4E 01 96 2E 00 www.飘云阁.
0147B1BC 63 00 6F 00 6D 00 2F 00 77 00 77 00 77 00 2E 00 com/www.
0147B1CC 35 00 32 00 70 00 6F 00 6A 00 69 00 65 00 2E 00 52pojie.
0147B1DC 63 00 6E 00 2F 00 65 00 78 00 70 00 61 00 73 00 cn/expas
0147B1EC 79 00 y
00698209 XOR EBX,EBX ; tmp=0
0069820B MOV EAX,DWORD PTR SS:[EBP-4]
0069820E CALL 00698150
00698213 TEST AL,AL
00698215 JE SHORT 0069826B
00698217 LEA EAX,DWORD PTR SS:[EBP-8]
0069821A MOV EDX,DWORD PTR SS:[EBP-4]
0069821D CALL 00407B4C
00698222 MOV EAX,DWORD PTR SS:[EBP-8]
00698225 TEST EAX,EAX
00698227 JE SHORT 0069822E
00698229 SUB EAX,4
0069822C MOV EAX,DWORD PTR DS:[EAX] ; 注册名长度
0069822E MOV EDX,EAX
00698230 TEST EDX,EDX
00698232 JLE SHORT 0069826B
00698234 MOV EAX,1 ; i=1
00698239 /CMP EAX,1 ; i与1比较
0069823C |JLE SHORT 00698254 ; 不大于则跳
0069823E |MOV ECX,DWORD PTR SS:[EBP-8] ; 指向注册名
00698241 |MOVZX ECX,WORD PTR DS:[ECX+EAX*2-2] ; 读取第i位
00698246 |ADD EBX,ECX ; tmp+=结果
00698248 |MOV ECX,DWORD PTR SS:[EBP-8] ; 指向注册名
0069824B |MOVZX ECX,WORD PTR DS:[ECX+EAX*2-4] ; 读取第i-1位
00698250 |ADD EBX,ECX ; tmp+=结果
00698252 |JMP SHORT 00698267
00698254 |MOV ECX,DWORD PTR SS:[EBP-8] ; 指向注册名
00698257 |MOVZX ECX,WORD PTR DS:[ECX+EAX*2-2] ; 读取第1位
0069825C |ADD EBX,ECX ; tmp+=结果
0069825E |MOV ECX,DWORD PTR SS:[EBP-8] ; 指向注册名
00698261 |MOVZX ECX,WORD PTR DS:[ECX+EAX*2] ; 读取第2位
00698265 |ADD EBX,ECX ; tmp+=结果
00698267 |INC EAX ; i++
00698268 |DEC EDX
00698269 \JNZ SHORT 00698239 ; 未完继续
0069826B MOV EAX,EBX ; 转移累计和
0069826D CDQ
0069826E MOV DWORD PTR SS:[EBP-10],EAX ; 保存结果
00698271 MOV DWORD PTR SS:[EBP-C],EDX
值得注意的是,注册名字符使用的是宽代码模式。
4、跟随第二步
00698583 MOV ESI,4
00698588 MOV EAX,DWORD PTR SS:[EBP-14] ; 94857
0069858B CDQ
0069858C PUSH EDX
0069858D PUSH EAX
0069858E MOV EAX,EDI ; 指向注册名
00698590 CALL 006981E4 ; 注册名计算累计和
00698595 CALL 004093E4 ; 累计和*94857=4700AACF2=19059617010
0069859A MOV DWORD PTR SS:[EBP-20],EAX ; 保存结果
0069859D MOV DWORD PTR SS:[EBP-1C],EDX
006985A0 LEA EAX,DWORD PTR SS:[EBP-8]
5、分步计算与检验注册码的合理性
5.1、注册码1-2位
006985A3 PUSH EAX ; /Arg1
006985A4 MOV ECX,2 ; |
006985A9 MOV EDX,1 ; |
006985AE MOV EAX,DWORD PTR SS:[EBP-4] ; |注册码
006985B1 CALL 00408884 ; \读取1-2位
006985B6 PUSH DWORD PTR SS:[EBP-1C] ; /4
006985B9 PUSH DWORD PTR SS:[EBP-20] ; |700AACF2--乘积结果
006985BC MOV CL,91 ; |0x91=145
006985BE MOV DL,0B ; |11=11
006985C0 MOV AL,5E ; |0x5E=94
006985C2 CALL 0069834C ; \计算两位注册码
========计算两位注册码
后面的计算仅参数不同,公式相同,不再一一叙述。
0069834C PUSH EBP
0069834D MOV EBP,ESP
0069834F PUSH ECX
00698350 PUSH EBX
00698351 MOV BYTE PTR SS:[EBP-2],CL ; 0x91
00698354 MOV BYTE PTR SS:[EBP-1],DL ; 11
00698357 MOV EBX,EAX
00698359 MOVZX EAX,BL ; 0x5E
0069835C MOV ECX,0C
00698361 XOR EDX,EDX
00698363 DIV ECX ; 0x5E mod 12 =10
00698365 MOV EBX,EDX ; 转移余数
00698367 MOVZX EAX,BYTE PTR SS:[EBP-1] ; 11
0069836B MOV ECX,22
00698370 XOR EDX,EDX
00698372 DIV ECX
00698374 MOV BYTE PTR SS:[EBP-1],DL ; 11 mod 34
00698377 MOVZX EAX,BL ; 10
0069837A AND EAX,1 ; and 1
0069837D TEST EAX,EAX
0069837F JNZ SHORT 006983AA ; 非0则跳
00698381 MOV EAX,DWORD PTR SS:[EBP+8]
00698384 MOV EDX,DWORD PTR SS:[EBP+C] ; 积
00698387 MOV ECX,EBX ; 10
00698389 CALL 004095CC ; 积\2^10
0069838E AND AL,0FF ; 商 and FF
00698390 PUSH EAX ; 暂存
00698391 MOV EAX,DWORD PTR SS:[EBP+8] ; 积
00698394 MOV EDX,DWORD PTR SS:[EBP+C]
00698397 MOVZX ECX,BYTE PTR SS:[EBP-1] ; 11
0069839B CALL 004095CC ; 积\2^11
006983A0 OR AL,BYTE PTR SS:[EBP-2] ; 结果 or 0x91
006983A3 MOV EDX,EAX ; 转移结果
006983A5 POP EAX ; 暂存值
006983A6 XOR AL,DL ; 两结果 xor
006983A8 JMP SHORT 006983D1
006983AA MOV EAX,DWORD PTR SS:[EBP+8] ; 积--非0时的算法
006983AD MOV EDX,DWORD PTR SS:[EBP+C]
006983B0 MOV ECX,EBX ; 10
006983B2 CALL 004095CC ; 积\2^10
006983B7 AND AL,0FF ; 商 and FF
006983B9 PUSH EAX
006983BA MOV EAX,DWORD PTR SS:[EBP+8]
006983BD MOV EDX,DWORD PTR SS:[EBP+C]
006983C0 MOVZX ECX,BYTE PTR SS:[EBP-1]
006983C4 CALL 004095CC
006983C9 AND AL,BYTE PTR SS:[EBP-2] ; 结果 and 0x91--不同算法
006983CC MOV EDX,EAX
006983CE POP EAX
006983CF XOR AL,DL
006983D1 POP EBX
006983D2 POP ECX
006983D3 POP EBP
006983D4 RETN 8
========
006985C7 MOV EBX,EAX ; 转移结果
006985C9 LEA ECX,DWORD PTR SS:[EBP-24]
006985CC MOVZX EAX,BL ; 转移
006985CF MOV EDX,2 ; 2
006985D4 CALL 00420C04 ; 结果转化为2位Hex字符
006985D9 MOV EDX,DWORD PTR SS:[EBP-24] ; 转化的结果
006985DC MOV EAX,DWORD PTR SS:[EBP-8] ; 注册码1-2位
006985DF CALL 0040884C ; 比较
006985E4 JNZ 006988CB ; 不等则跳
后续的算法与差异:
5.2、注册码的3-4位
006985EA LEA EAX,DWORD PTR SS:[EBP-8]
006985ED PUSH EAX ; /Arg1
006985EE MOV ECX,2 ; |
006985F3 MOV EDX,3 ; |
006985F8 MOV EAX,DWORD PTR SS:[EBP-4] ; |
006985FB CALL 00408884 ; \ImgConve.00408884
00698600 PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
00698603 PUSH DWORD PTR SS:[EBP-20] ; |Arg1
00698606 MOV CL,0AB ; |=171
00698608 MOV DL,4B ; |=75
0069860A MOV AL,37 ; |=55
0069860C CALL 0069834C ; \计算两位注册码
00698611 MOV EBX,EAX
00698613 LEA ECX,DWORD PTR SS:[EBP-28]
00698616 MOVZX EAX,BL
00698619 MOV EDX,2
0069861E CALL 00420C04
00698623 MOV EDX,DWORD PTR SS:[EBP-28]
00698626 MOV EAX,DWORD PTR SS:[EBP-8]
00698629 CALL 0040884C
0069862E JNZ 006988CB
5.3、注册码的5-6位
00698634 LEA EAX,DWORD PTR SS:[EBP-8]
00698637 PUSH EAX ; /Arg1
00698638 MOV ECX,2 ; |
0069863D MOV EDX,5 ; |
00698642 MOV EAX,DWORD PTR SS:[EBP-4] ; |
00698645 CALL 00408884 ; \ImgConve.00408884
0069864A PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
0069864D PUSH DWORD PTR SS:[EBP-20] ; |Arg1
00698650 MOV CL,85 ; |=133
00698652 MOV DL,49 ; |=73
00698654 MOV AL,47 ; |=71
00698656 CALL 0069834C ; \计算两位注册码
0069865B MOV EBX,EAX
0069865D LEA ECX,DWORD PTR SS:[EBP-2C]
00698660 MOVZX EAX,BL
00698663 MOV EDX,2
00698668 CALL 00420C04
0069866D MOV EDX,DWORD PTR SS:[EBP-2C]
00698670 MOV EAX,DWORD PTR SS:[EBP-8]
00698673 CALL 0040884C
00698678 JNZ 006988CB
5.4、注册码的7-8位
0069867E LEA EAX,DWORD PTR SS:[EBP-8]
00698681 PUSH EAX ; /Arg1
00698682 MOV ECX,2 ; |
00698687 MOV EDX,7 ; |
0069868C MOV EAX,DWORD PTR SS:[EBP-4] ; |
0069868F CALL 00408884 ; \ImgConve.00408884
00698694 PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
00698697 PUSH DWORD PTR SS:[EBP-20] ; |Arg1
0069869A MOV CL,70 ; |=112
0069869C MOV DL,18 ; |=24
0069869E MOV AL,0E ; |=14
006986A0 CALL 0069834C ; \计算两位注册码
006986A5 MOV EBX,EAX
006986A7 LEA ECX,DWORD PTR SS:[EBP-30]
006986AA MOVZX EAX,BL
006986AD MOV EDX,2
006986B2 CALL 00420C04
006986B7 MOV EDX,DWORD PTR SS:[EBP-30]
006986BA MOV EAX,DWORD PTR SS:[EBP-8]
006986BD CALL 0040884C
006986C2 JNZ 006988CB
5.5、注册码的9-410位
006986C8 LEA EAX,DWORD PTR SS:[EBP-8]
006986CB PUSH EAX ; /Arg1
006986CC MOV ECX,2 ; |
006986D1 MOV EDX,9 ; |
006986D6 MOV EAX,DWORD PTR SS:[EBP-4] ; |
006986D9 CALL 00408884 ; \ImgConve.00408884
006986DE PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
006986E1 PUSH DWORD PTR SS:[EBP-20] ; |Arg1
006986E4 MOV CL,9D ; |=157
006986E6 MOV DL,29 ; |=41
006986E8 MOV AL,0F ; |=15
006986EA CALL 0069834C ; \计算两位注册码
006986EF MOV EBX,EAX
006986F1 LEA ECX,DWORD PTR SS:[EBP-34]
006986F4 MOVZX EAX,BL
006986F7 MOV EDX,2
006986FC CALL 00420C04
00698701 MOV EDX,DWORD PTR SS:[EBP-34]
00698704 MOV EAX,DWORD PTR SS:[EBP-8]
00698707 CALL 0040884C
0069870C JNZ 006988CB
5.6、注册码的11-12位
00698712 LEA EAX,DWORD PTR SS:[EBP-8]
00698715 PUSH EAX ; /Arg1
00698716 MOV ECX,2 ; |
0069871B MOV EDX,0B ; |
00698720 MOV EAX,DWORD PTR SS:[EBP-4] ; |
00698723 CALL 00408884 ; \ImgConve.00408884
00698728 PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
0069872B PUSH DWORD PTR SS:[EBP-20] ; |Arg1
0069872E MOV CL,8E ; |=142
00698730 MOV DL,58 ; |=88
00698732 MOV AL,3A ; |=58
00698734 CALL 0069834C ; \计算两位注册码
00698739 MOV EBX,EAX
0069873B LEA ECX,DWORD PTR SS:[EBP-38]
0069873E MOVZX EAX,BL
00698741 MOV EDX,2
00698746 CALL 00420C04
0069874B MOV EDX,DWORD PTR SS:[EBP-38]
0069874E MOV EAX,DWORD PTR SS:[EBP-8]
00698751 CALL 0040884C
00698756 JNZ 006988CB
5.7、注册码的13-14位
0069875C LEA EAX,DWORD PTR SS:[EBP-8]
0069875F PUSH EAX ; /Arg1
00698760 MOV ECX,2 ; |
00698765 MOV EDX,0D ; |
0069876A MOV EAX,DWORD PTR SS:[EBP-4] ; |
0069876D CALL 00408884 ; \ImgConve.00408884
00698772 PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
00698775 PUSH DWORD PTR SS:[EBP-20] ; |Arg1
00698778 MOV CL,6F ; |=111
0069877A MOV DL,23 ; |=35
0069877C MOV AL,3B ; |=59
0069877E CALL 0069834C ; \计算两位注册码
00698783 MOV EBX,EAX
00698785 LEA ECX,DWORD PTR SS:[EBP-3C]
00698788 MOVZX EAX,BL
0069878B MOV EDX,2
00698790 CALL 00420C04
00698795 MOV EDX,DWORD PTR SS:[EBP-3C]
00698798 MOV EAX,DWORD PTR SS:[EBP-8]
0069879B CALL 0040884C
006987A0 JNZ 006988CB
5.8、注册码的15-16位
006987A6 LEA EAX,DWORD PTR SS:[EBP-8]
006987A9 PUSH EAX ; /Arg1
006987AA MOV ECX,2 ; |
006987AF MOV EDX,0F ; |
006987B4 MOV EAX,DWORD PTR SS:[EBP-4] ; |
006987B7 CALL 00408884 ; \ImgConve.00408884
006987BC PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
006987BF PUSH DWORD PTR SS:[EBP-20] ; |Arg1
006987C2 MOV CL,0AA ; |=170
006987C4 MOV DL,19 ; |=25
006987C6 MOV AL,43 ; |=67
006987C8 CALL 0069834C ; \计算两位注册码
006987CD MOV EBX,EAX
006987CF LEA ECX,DWORD PTR SS:[EBP-40]
006987D2 MOVZX EAX,BL
006987D5 MOV EDX,2
006987DA CALL 00420C04
006987DF MOV EDX,DWORD PTR SS:[EBP-40]
006987E2 MOV EAX,DWORD PTR SS:[EBP-8]
006987E5 CALL 0040884C
006987EA JNZ 006988CB
5.9、注册码的17-18位
006987F0 LEA EAX,DWORD PTR SS:[EBP-8]
006987F3 PUSH EAX ; /Arg1
006987F4 MOV ECX,2 ; |
006987F9 MOV EDX,11 ; |
006987FE MOV EAX,DWORD PTR SS:[EBP-4] ; |
00698801 CALL 00408884 ; \ImgConve.00408884
00698806 PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
00698809 PUSH DWORD PTR SS:[EBP-20] ; |Arg1
0069880C MOV CL,0A4 ; |=164
0069880E MOV DL,15 ; |=21
00698810 MOV AL,54 ; |=84
00698812 CALL 0069834C ; \计算两位注册码
00698817 MOV EBX,EAX
00698819 LEA ECX,DWORD PTR SS:[EBP-44]
0069881C MOVZX EAX,BL
0069881F MOV EDX,2
00698824 CALL 00420C04
00698829 MOV EDX,DWORD PTR SS:[EBP-44]
0069882C MOV EAX,DWORD PTR SS:[EBP-8]
0069882F CALL 0040884C
00698834 JNZ 006988CB
5.10、注册码的19-20位
0069883A LEA EAX,DWORD PTR SS:[EBP-8]
0069883D PUSH EAX ; /Arg1
0069883E MOV ECX,2 ; |
00698843 MOV EDX,13 ; |
00698848 MOV EAX,DWORD PTR SS:[EBP-4] ; |
0069884B CALL 00408884 ; \ImgConve.00408884
00698850 PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
00698853 PUSH DWORD PTR SS:[EBP-20] ; |Arg1
00698856 MOV CL,0E7 ; |=231
00698858 MOV DL,2A ; |=42
0069885A MOV AL,1B ; |=27
0069885C CALL 0069834C ; \计算两位注册码
00698861 MOV EBX,EAX
00698863 LEA ECX,DWORD PTR SS:[EBP-48]
00698866 MOVZX EAX,BL
00698869 MOV EDX,2
0069886E CALL 00420C04
00698873 MOV EDX,DWORD PTR SS:[EBP-48]
00698876 MOV EAX,DWORD PTR SS:[EBP-8]
00698879 CALL 0040884C
0069887E JNZ SHORT 006988CB
5.11、注册码的21-22位
00698880 LEA EAX,DWORD PTR SS:[EBP-8]
00698883 PUSH EAX ; /Arg1
00698884 MOV ECX,2 ; |
00698889 MOV EDX,15 ; |
0069888E MOV EAX,DWORD PTR SS:[EBP-4] ; |
00698891 CALL 00408884 ; \ImgConve.00408884
00698896 PUSH DWORD PTR SS:[EBP-1C] ; /Arg2
00698899 PUSH DWORD PTR SS:[EBP-20] ; |Arg1
0069889C MOV CL,0A6 ; |=166
0069889E MOV DL,1B ; |=27
006988A0 MOV AL,42 ; |=66
006988A2 CALL 0069834C ; \计算两位注册码
006988A7 MOV EBX,EAX
006988A9 LEA ECX,DWORD PTR SS:[EBP-4C]
006988AC MOVZX EAX,BL
006988AF MOV EDX,2
006988B4 CALL 00420C04
006988B9 MOV EDX,DWORD PTR SS:[EBP-4C]
006988BC MOV EAX,DWORD PTR SS:[EBP-8]
006988BF CALL 0040884C
006988C4 JNZ SHORT 006988CB
006988C6 MOV ESI,1
为了不用编译平台写注册机,使众多的人能从高大上中解脱出来,特地用VBS写的注册机。可看可不看、可复制也可不复制、可使用也可不使用,反正不保密不收费。如果复制,保存为文本文件后就扩展名改为vbs,双击之后就是个对话框式的注册机:
[Visual Basic] 纯文本查看 复制代码 'ImgConverter
Dim ID, Dtmp, SN, yuzhi
yuzhi = "www.飘云阁.com/www.52pojie.cn/expasy"
ID = InputBox("请输入注册名","提示",yuzhi)
Do While ID<>""
If Len(ID) < 25 Or Len(ID) > 200 Then
MsgBox "注册名长度应该在 25 至 200 个字符范围内选择。", vbInformation + vbOKOnly, "提示"
Exit Do
End If
Dtmp = CalName(ID)
Dtmp = Dtmp * 94857
SN = SN & CalSN(94, 11, 145, Dtmp)
SN = SN & CalSN(55, 75, 171, Dtmp)
SN = SN & CalSN(71, 73, 133, Dtmp)
SN = SN & CalSN(14, 24, 112, Dtmp)
SN = SN & CalSN(15, 41, 157, Dtmp)
SN = SN & CalSN(58, 88, 142, Dtmp)
SN = SN & CalSN(59, 35, 111, Dtmp)
SN = SN & CalSN(67, 25, 170, Dtmp)
SN = SN & CalSN(84, 21, 164, Dtmp)
SN = SN & CalSN(27, 42, 231, Dtmp)
SN = SN & CalSN(66, 27, 166, Dtmp)
SN = SN & CalSN(11, 11, 111, Dtmp)
SN = SN & CalSum(SN)
SN = Mid(SN, 1, 4) & "-" & Mid(SN, 5, 4) & "-" & Mid(SN, 9, 4) & "-" & Mid(SN, 13, 4) & "-" & Mid(SN, 17, 4) & "-" & Mid(SN, 21, 4) & "-" & Mid(SN, 25, 4)
InputBox "对应的注册码结果是:","请复制",SN
SN = ""
ID = InputBox("继续输入注册名?","提示",yuzhi)
Loop
Function CalSum(in1)
Dim Ltmp1, Ltmp2, n, i
Ltmp1 = 86
Ltmp2 = 175
n = Len(in1)
For i = 1 To n
Ltmp2 = Ltmp2 + Asc(Mid(in1, i, 1))
If Ltmp2 > 255 Then Ltmp2 = Ltmp2 - 255
Ltmp1 = Ltmp1 + Ltmp2
If Ltmp1 > 255 Then Ltmp1 = Ltmp1 - 255
Next
Ltmp1 = Ltmp1 * 256 + Ltmp2
CalSum = Right("000" & Hex(Ltmp1), 4)
End Function
Function CalName(in1)
Dim n, i, Ltmp, Itmp
n = Len(in1)
For i = 1 To n
If i = 1 Then
Itmp = AscW(Mid(in1, 1, 1))
If Itmp < 0 Then Itmp = Itmp + 65536
Ltmp = Ltmp + Itmp
Itmp = AscW(Mid(in1, 2, 1))
If Itmp < 0 Then Itmp = Itmp + 65536
Ltmp = Ltmp + Itmp
Else
Itmp = AscW(Mid(in1, i, 1))
If Itmp < 0 Then Itmp = Itmp + 65536
Ltmp = Ltmp + Itmp
Itmp = AscW(Mid(in1, i - 1, 1))
If Itmp < 0 Then Itmp = Itmp + 65536
Ltmp = Ltmp + Itmp
End If
Next
CalName = Ltmp
End Function
Function CalSN(in1, in2, in3, in4)
'in1,in2,in3为软件内定的参数,in4为注册名计算结果
Dim Itmp1, Itmp2, Ltmp1, Ltmp2
Itmp1 = in1 Mod 12
Itmp2 = in2 Mod 34
Ltmp1 = Int(in4 / 2 ^ Itmp1)
Ltmp2 = Int(in4 / 2 ^ Itmp2)
Ltmp1 = Ltmp1 - 256 * Int(Ltmp1 / 256) '相当于 Ltmp1 And 255
Ltmp2 = Ltmp2 - 256 * Int(Ltmp2 / 256) '相当于 Ltmp2 And 255
If (Itmp1 And 1) = 0 Then
Ltmp2 = Ltmp2 Or in3
Else
Ltmp2 = Ltmp2 And in3
End If
Ltmp1 = Ltmp1 Xor Ltmp2
CalSN = Right("0" & Hex(Ltmp1), 2)
End Function
|
评分
-
查看全部评分
|