VB稍繁琐的算法-吉他和弦帮手2.3
【破文标题】VB稍繁琐的算法-吉他和弦帮手2.3
【软件名称】吉他和弦帮手2.3
【软件介绍】收集大约1500个吉他和弦指法,多种MIDI乐器发声,可自定义右手弹奏指法界面还不错,开发环境VB6。这次的软件比以前的版本 增加了一个大家都要求的功能,这个功能就是可以播放一个完整的和弦和曲子。该软件附上多首古典名曲【爱的罗曼斯】、【阿尔罕布拉宫的 回忆】、【舒伯特小夜曲】等提供参考,虽然这个软件需要注册,但是,我不收大家的一分钱,我只是想收集大家用我的软件制作的音乐文件 。所以,大家只要提供一个用我的软件编出的古典名曲(gch文件),就可以免费获得注册码,绝不失言。当然,我收集的到的文件将会与大家 分享。 希望大家提供好一些的名曲。
【软件地址】http://www1.skycn.com/soft/11605.html
【破文作者】KiLlL[DFCG][FCG]
【破解时间】2005-09-21 23:02 -> 09-22 03:02
【破解声明】仅限技术交流!
【破解过程】
作者已经不更新了,后来似乎发布了免注册版,所以分析应该是没有问题吧。这个是很好的一个和弦助手,可惜我不会用。软件使用30次,但 是在注册窗口输入之后没有比较,而是保存到软件目录的reg.ini文件里面。重启后验证程序,注册码必须为20位。
00507BA8 > \8B55 E0 MOV EDX,DWORD PTR SS:[EBP-20]
00507BAB . 52 PUSH EDX ; 下面开始读取注册文件
00507BAC . 68 30034500 PUSH GtChrdHl.00450330 ; UNICODE "\Reg.ini"
00507BB1 . FF15 64104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaStrCa>; MSVBVM60.__vbaStrCat
00507BB7 . 8B3D 88124000 MOV EDI,DWORD PTR DS:[<&MSVBVM60.__vbaSt>; MSVBVM60.__vbaStrMove
00507BBD . 8BD0 MOV EDX,EAX ; 获得完整路径
00507BBF . 8D4D E8 LEA ECX,DWORD PTR SS:[EBP-18]
00507BC2 . FFD7 CALL EDI ; <&MSVBVM60.__vbaStrMove>
00507BC4 . 8D4D E0 LEA ECX,DWORD PTR SS:[EBP-20]
00507BC7 . FF15 CC124000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFreeS>; MSVBVM60.__vbaFreeStr
00507BCD . 8D4D D4 LEA ECX,DWORD PTR SS:[EBP-2C]
00507BD0 . FF15 C8124000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFreeO>; MSVBVM60.__vbaFreeObj
00507BD6 . 8D4D C4 LEA ECX,DWORD PTR SS:[EBP-3C]
00507BD9 . 8D45 E8 LEA EAX,DWORD PTR SS:[EBP-18]
00507BDC . 53 PUSH EBX
00507BDD . 51 PUSH ECX
00507BDE . 8945 CC MOV DWORD PTR SS:[EBP-34],EAX
00507BE1 . C745 C4 08400>MOV DWORD PTR SS:[EBP-3C],4008 ; 判断是否存在这个文件
00507BE8 . FF15 DC114000 CALL DWORD PTR DS:[<&MSVBVM60.#645>] ; MSVBVM60.rtcDir
00507BEE . 8BD0 MOV EDX,EAX
00507BF0 . 8D4D E0 LEA ECX,DWORD PTR SS:[EBP-20]
00507BF3 . FFD7 CALL EDI
00507BF5 . 8B1D 28114000 MOV EBX,DWORD PTR DS:[<&MSVBVM60.__vbaSt>; MSVBVM60.__vbaStrCmp
00507BFB . 50 PUSH EAX
00507BFC . 68 18DB4400 PUSH GtChrdHl.0044DB18
00507C01 . FFD3 CALL EBX ; <&MSVBVM60.__vbaStrCmp>
00507C03 . 8BF0 MOV ESI,EAX
00507C05 . 8D4D E0 LEA ECX,DWORD PTR SS:[EBP-20]
00507C08 . F7DE NEG ESI
00507C0A . 1BF6 SBB ESI,ESI
00507C0C . 46 INC ESI
00507C0D . F7DE NEG ESI
00507C0F . FF15 CC124000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFreeS>; MSVBVM60.__vbaFreeStr
00507C15 . 66:85F6 TEST SI,SI
00507C18 . 0F85 8D000000 JNZ GtChrdHl.00507CAB ; 不存在就跳走
00507C1E . 8B55 E8 MOV EDX,DWORD PTR SS:[EBP-18]
00507C21 . 52 PUSH EDX
00507C22 . 6A 01 PUSH 1
00507C24 . 6A FF PUSH -1
00507C26 . 6A 01 PUSH 1 ; 存在就打开
00507C28 . FF15 E8114000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFileO>; MSVBVM60.__vbaFileOpen
00507C2E . 8D45 E4 LEA EAX,DWORD PTR SS:[EBP-1C]
00507C31 . 6A 01 PUSH 1
00507C33 . 50 PUSH EAX ; 读取一行,就是读取出注册码
00507C34 . FF15 28104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaLineI>; MSVBVM60.__vbaLineInputStr
00507C3A . 6A 01 PUSH 1
00507C3C . FF15 18114000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFileC>; MSVBVM60.__vbaFileClose
00507C42 . E8 C9FCFFFF CALL GtChrdHl.00507910 ; 这个是一个关键函数,应该是获取机器码的。
到这里看看
00507910 $ 55 PUSH EBP
00507911 . 8BEC MOV EBP,ESP
00507913 . 83EC 18 SUB ESP,18
00507916 . 68 06334000 PUSH <JMP.&MSVBVM60.__vbaExceptHandler> ; SE handler installation
0050791B . 64:A1 0000000>MOV EAX,DWORD PTR FS:[0]
00507921 . 50 PUSH EAX
00507922 . 64:8925 00000>MOV DWORD PTR FS:[0],ESP
00507929 . B8 AC000000 MOV EAX,0AC
0050792E . E8 CDB9EFFF CALL <JMP.&MSVBVM60.__vbaChkstk>
00507933 . 53 PUSH EBX
00507934 . 56 PUSH ESI
00507935 . 57 PUSH EDI
00507936 . 8965 E8 MOV DWORD PTR SS:[EBP-18],ESP
00507939 . C745 EC 10304>MOV DWORD PTR SS:[EBP-14],GtChrdHl.00403>
00507940 . C745 F0 00000>MOV DWORD PTR SS:[EBP-10],0
00507947 . C745 F4 00000>MOV DWORD PTR SS:[EBP-C],0
0050794E . C745 FC 01000>MOV DWORD PTR SS:[EBP-4],1
00507955 . C745 FC 02000>MOV DWORD PTR SS:[EBP-4],2
0050795C . 6A FF PUSH -1
0050795E . FF15 B4104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaOnErr>; MSVBVM60.__vbaOnError
00507964 . C745 FC 03000>MOV DWORD PTR SS:[EBP-4],3
0050796B . 8D45 CC LEA EAX,DWORD PTR SS:[EBP-34]
0050796E . 50 PUSH EAX
0050796F . E8 FCFBFFFF CALL GtChrdHl.00507570
00507974 . 8945 B8 MOV DWORD PTR SS:[EBP-48],EAX
00507977 . C745 B0 08000>MOV DWORD PTR SS:[EBP-50],8
0050797E . 8D55 B0 LEA EDX,DWORD PTR SS:[EBP-50]
00507981 . 8D4D D0 LEA ECX,DWORD PTR SS:[EBP-30]
00507984 . FF15 14104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaVarMo>; MSVBVM60.__vbaVarMove
0050798A . C745 FC 04000>MOV DWORD PTR SS:[EBP-4],4
00507991 . C785 48FFFFFF>MOV DWORD PTR SS:[EBP-B8],0
0050799B . 8D8D 48FFFFFF LEA ECX,DWORD PTR SS:[EBP-B8]
005079A1 . 51 PUSH ECX
005079A2 . E8 F9ECFFFF CALL GtChrdHl.005066A0 ; 这个函数是获取原始机器码后半部分
005079A7 . 8BD0 MOV EDX,EAX
005079A9 . 8D4D C4 LEA ECX,DWORD PTR SS:[EBP-3C]
005079AC . FF15 88124000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaStrMo>; MSVBVM60.__vbaStrMove
005079B2 . C745 FC 05000>MOV DWORD PTR SS:[EBP-4],5
005079B9 . 8D55 CC LEA EDX,DWORD PTR SS:[EBP-34]
005079BC . 8995 78FFFFFF MOV DWORD PTR SS:[EBP-88],EDX
005079C2 . C785 70FFFFFF>MOV DWORD PTR SS:[EBP-90],4008
005079CC . 8D85 70FFFFFF LEA EAX,DWORD PTR SS:[EBP-90]
005079D2 . 50 PUSH EAX
005079D3 . 8D4D B0 LEA ECX,DWORD PTR SS:[EBP-50]
005079D6 . 51 PUSH ECX
005079D7 . FF15 E4104000 CALL DWORD PTR DS:[<&MSVBVM60.#520>] ; MSVBVM60.rtcTrimVar
005079DD . C785 68FFFFFF>MOV DWORD PTR SS:[EBP-98],GtChrdHl.00450>; UNICODE "March3"
005079E7 . C785 60FFFFFF>MOV DWORD PTR SS:[EBP-A0],8
005079F1 . 8D55 C4 LEA EDX,DWORD PTR SS:[EBP-3C]
005079F4 . 8995 58FFFFFF MOV DWORD PTR SS:[EBP-A8],EDX
005079FA . C785 50FFFFFF>MOV DWORD PTR SS:[EBP-B0],4008
00507A04 . 8D85 50FFFFFF LEA EAX,DWORD PTR SS:[EBP-B0]
00507A0A . 50 PUSH EAX
00507A0B . 8D4D 90 LEA ECX,DWORD PTR SS:[EBP-70]
00507A0E . 51 PUSH ECX
00507A0F . FF15 E4104000 CALL DWORD PTR DS:[<&MSVBVM60.#520>] ; MSVBVM60.rtcTrimVar
00507A15 . 8D55 B0 LEA EDX,DWORD PTR SS:[EBP-50]
00507A18 . 52 PUSH EDX
00507A19 . 8D85 60FFFFFF LEA EAX,DWORD PTR SS:[EBP-A0]
00507A1F . 50 PUSH EAX
00507A20 . 8D4D A0 LEA ECX,DWORD PTR SS:[EBP-60]
00507A23 . 51 PUSH ECX
00507A24 . FF15 CC114000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaVarCa>; MSVBVM60.__vbaVarCat
00507A2A . 50 PUSH EAX
00507A2B . 8D55 90 LEA EDX,DWORD PTR SS:[EBP-70]
00507A2E . 52 PUSH EDX
00507A2F . 8D45 80 LEA EAX,DWORD PTR SS:[EBP-80]
00507A32 . 50 PUSH EAX
00507A33 . FF15 CC114000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaVarCa>; MSVBVM60.__vbaVarCat
00507A39 . 50 PUSH EAX
00507A3A . FF15 20104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaStrVa>; MSVBVM60.__vbaStrVarMove
00507A40 . 8BD0 MOV EDX,EAX ; EAX=0016DCDC, (UNICODE "MRG101K1C1KD7CMarch3000000000000")
00507A42 . 8D4D C8 LEA ECX,DWORD PTR SS:[EBP-38]
00507A45 . FF15 88124000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaStrMo>; MSVBVM60.__vbaStrMove
00507A4B . 8D4D 80 LEA ECX,DWORD PTR SS:[EBP-80]
00507A4E . 51 PUSH ECX
00507A4F . 8D55 90 LEA EDX,DWORD PTR SS:[EBP-70]
00507A52 . 52 PUSH EDX
00507A53 . 8D45 A0 LEA EAX,DWORD PTR SS:[EBP-60]
00507A56 . 50 PUSH EAX
00507A57 . 8D4D B0 LEA ECX,DWORD PTR SS:[EBP-50]
00507A5A . 51 PUSH ECX
00507A5B . 6A 04 PUSH 4
00507A5D . FF15 30104000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFreeV>; MSVBVM60.__vbaFreeVarList
00507A63 . 83C4 14 ADD ESP,14
00507A66 . C745 FC 06000>MOV DWORD PTR SS:[EBP-4],6
00507A6D . 66:C785 4CFFF>MOV WORD PTR SS:[EBP-B4],0A ; 上面获得原始机器码
00507A76 . 8D95 4CFFFFFF LEA EDX,DWORD PTR SS:[EBP-B4]
00507A7C . 52 PUSH EDX
00507A7D . 8D45 C8 LEA EAX,DWORD PTR SS:[EBP-38]
00507A80 . 50 PUSH EAX
00507A81 . E8 FADDFFFF CALL GtChrdHl.00505880
00507A86 . 8BD0 MOV EDX,EAX
00507A88 . 8D4D C0 LEA ECX,DWORD PTR SS:[EBP-40]
00507A8B . FF15 88124000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaStrMo>; MSVBVM60.__vbaStrMove
00507A91 . 68 EC7A5000 PUSH GtChrdHl.00507AEC ; 获得机器码
明白了。取得临时机器码后计算得出真正机器码。
00507C3C . FF15 18114000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFileC>; MSVBVM60.__vbaFileClose
00507C42 . E8 C9FCFFFF CALL GtChrdHl.00507910 ; 这个是一个关键函数,应该是获取机器码的。
00507C47 . 8BD0 MOV EDX,EAX ; 取得了机器码
00507C49 . 8D4D D8 LEA ECX,DWORD PTR SS:[EBP-28]
00507C4C . FFD7 CALL EDI
00507C4E . 8B55 D8 MOV EDX,DWORD PTR SS:[EBP-28]
00507C51 . 8D4D E0 LEA ECX,DWORD PTR SS:[EBP-20]
00507C54 . C745 C0 14000>MOV DWORD PTR SS:[EBP-40],14
00507C5B . C745 D8 00000>MOV DWORD PTR SS:[EBP-28],0
00507C62 . FFD7 CALL EDI
00507C64 . 8B4D E4 MOV ECX,DWORD PTR SS:[EBP-1C] ; 假码
00507C67 . 8D55 C0 LEA EDX,DWORD PTR SS:[EBP-40] ; 机器码
00507C6A . 51 PUSH ECX
00507C6B . 8D45 E0 LEA EAX,DWORD PTR SS:[EBP-20]
00507C6E . 52 PUSH EDX
00507C6F . 50 PUSH EAX
00507C70 . E8 0BDCFFFF CALL GtChrdHl.00505880 ; 计算注册码过程,得到真正的注册码
00507C75 . 8BD0 MOV EDX,EAX ; 真码,可作内存注册机
00507C77 . 8D4D DC LEA ECX,DWORD PTR SS:[EBP-24]
00507C7A . FFD7 CALL EDI
00507C7C . 50 PUSH EAX
00507C7D . FFD3 CALL EBX
00507C7F . 8BF0 MOV ESI,EAX
00507C81 . 8D4D D8 LEA ECX,DWORD PTR SS:[EBP-28]
00507C84 . F7DE NEG ESI
00507C86 . 8D55 DC LEA EDX,DWORD PTR SS:[EBP-24]
00507C89 . 51 PUSH ECX
00507C8A . 1BF6 SBB ESI,ESI
00507C8C . 8D45 E0 LEA EAX,DWORD PTR SS:[EBP-20]
00507C8F . 52 PUSH EDX
00507C90 . 46 INC ESI
00507C91 . 50 PUSH EAX
00507C92 . 6A 03 PUSH 3
00507C94 . F7DE NEG ESI
00507C96 . FF15 1C124000 CALL DWORD PTR DS:[<&MSVBVM60.__vbaFreeS>; MSVBVM60.__vbaFreeStrList
00507C9C . 83C4 10 ADD ESP,10
00507C9F . 66:85F6 TEST SI,SI
00507CA2 . 74 07 JE SHORT GtChrdHl.00507CAB ; 关键跳转
====================================================
下面来详细跟踪一下注册码生成过程吧:
00505880 $ 55 PUSH EBP ; 机器码与注册码共用函数
00505881 . 8BEC MOV EBP,ESP
00505883 . 83EC 0C SUB ESP,0C
00505886 . 68 06334000 push <jmp.&MSVBVM60.__vbaExceptHandler> ; SE handler installation
0050588B . 64:A1 00000>mov eax,dword ptr fs:[0]
00505891 . 50 push eax
00505892 . 64:8925 000>mov dword ptr fs:[0],esp
00505899 . 81EC 480100>sub esp,148
0050589F . 53 push ebx
005058A0 . 56 push esi
005058A1 . 57 push edi
005058A2 . 8965 F4 mov dword ptr ss:[ebp-C],esp
005058A5 . C745 F8 802>mov dword ptr ss:[ebp-8],GtChrdHl.00402F80
005058AC . 8B45 08 mov eax,dword ptr ss:[ebp+8]
005058AF . 33DB xor ebx,ebx
005058B1 . 895D E0 mov dword ptr ss:[ebp-20],ebx
005058B4 . 895D DC mov dword ptr ss:[ebp-24],ebx
005058B7 . 8B08 mov ecx,dword ptr ds:[eax] ; 硬件号"w2CsM2O2Q2"
005058B9 . 895D D8 mov dword ptr ss:[ebp-28],ebx
005058BC . 51 push ecx
005058BD . 68 18DB4400 push GtChrdHl.0044DB18
省略若干初始化代码...
00505B8D . 6A 04 push 4
00505B8F . FFD7 call edi
00505B91 . 83C4 14 add esp,14
00505B94 > E8 C7090000 call GtChrdHl.00506560
00505B99 . 8B35 881240>mov esi,dword ptr ds:[<&MSVBVM60.__vbaStrMove>; MSVBVM60.__vbaStrMove
00505B9F > 66:8B45 E0 mov ax,word ptr ss:[ebp-20]
00505BA3 . 8B4D 0C mov ecx,dword ptr ss:[ebp+C]
00505BA6 . 66:05 0100 add ax,1
00505BAA . 66:8B19 mov bx,word ptr ds:[ecx]
00505BAD . 0F80 A20900>jo GtChrdHl.00506555
00505BB3 . 66:035D E0 add bx,word ptr ss:[ebp-20]
00505BB7 . 8985 DCFEFF>mov dword ptr ss:[ebp-124],eax
00505BBD . 0F80 920900>jo GtChrdHl.00506555
00505BC3 > 66:C1F8 0F sar ax,0F
00505BC7 . 8BD0 mov edx,eax
00505BC9 . B9 00010000 mov ecx,100 ; 100位
00505BCE . 33D1 xor edx,ecx
00505BD0 . 33C3 xor eax,ebx
00505BD2 . 66:3BC2 cmp ax,dx ; 第15位
00505BD5 . 7F 66 jg short GtChrdHl.00505C3D
00505BD7 . 0FBFC3 movsx eax,bx
00505BDA . 48 dec eax
00505BDB . 3BC1 cmp eax,ecx
00505BDD . 8985 E4FEFF>mov dword ptr ss:[ebp-11C],eax
00505BE3 . 72 0C jb short GtChrdHl.00505BF1
00505BE5 . FF15 201140>call dword ptr ds:[<&MSVBVM60.__vbaGenerateBo>; MSVBVM60.__vbaGenerateBoundsError
00505BEB . 8B85 E4FEFF>mov eax,dword ptr ss:[ebp-11C]
00505BF1 > 8B15 B06051>mov edx,dword ptr ds:[5160B0] ; 长字串
这里有个表,也就是长字符串了。
str="N Z^%@*&(HGUINKNUIGBF%kfinkcG76U^GUI766f^%SyI@(Ifdkj(*8g7^&f65fFdIUYf6I^GjkdBUDhuipdfyig% $fjL**.x02ytPHDOIDTphHPPiofDmllfl44190$#&*JKho4o00wjdhFDK*jo:;JUIp(B[ApIuy^R&ubrYUi%6ge4uyU7OTd la;fyp0s0-2htdf!Jhfu7IK (*$$#g%(m0FG[D688g^6fI8HDGF9[y44NT87%u9**r4EU."
00505BF7 . 8B4D D4 mov ecx,dword ptr ss:[ebp-2C]
00505BFA . 51 push ecx
00505BFB . 8A0410 mov al,byte ptr ds:[eax+edx] ; 逐位取ascii G->47
00505BFE . 50 push eax
00505BFF . FF15 881140>call dword ptr ds:[<&MSVBVM60.__vbaStrUI1>] ; MSVBVM60.__vbaStrUI1
00505C05 . 8BD0 mov edx,eax ; 变成字符串 47->71
00505C07 . 8D4D C4 lea ecx,dword ptr ss:[ebp-3C]
00505C0A . FFD6 call esi
00505C0C . 50 push eax
00505C0D . FF15 641040>call dword ptr ds:[<&MSVBVM60.__vbaStrCat>] ; MSVBVM60.__vbaStrCat
00505C13 . 8BD0 mov edx,eax
00505C15 . 8D4D D4 lea ecx,dword ptr ss:[ebp-2C]
00505C18 . FFD6 call esi
00505C1A . 8D4D C4 lea ecx,dword ptr ss:[ebp-3C]
00505C1D . FF15 CC1240>call dword ptr ds:[<&MSVBVM60.__vbaFreeStr>] ; MSVBVM60.__vbaFreeStr
00505C23 . 66:8B8D DCF>mov cx,word ptr ss:[ebp-124]
00505C2A . 8B85 DCFEFF>mov eax,dword ptr ss:[ebp-124]
00505C30 . 66:03CB add cx,bx ; 循环变量增加
00505C33 . 0F80 1C0900>jo GtChrdHl.00506555
00505C39 . 8BD9 mov ebx,ecx
00505C3B .^ EB 86 jmp short GtChrdHl.00505BC3
00505C3D > 66:8B55 E0 mov dx,word ptr ss:[ebp-20]
00505C41 . 8B45 D4 mov eax,dword ptr ss:[ebp-2C] ; 得到转换后的长串
第一个循环,从第二十位开始取str的ascii,组成新的常串str1
for i=20 to len(str)
str1=str1 & asc(mid(str,i,1))
next
str1=left(str1,40)
00505C44 . 66:83C2 01 add dx,1
00505C48 . 50 push eax
00505C49 . 0F80 060900>jo GtChrdHl.00506555
00505C4F . 8955 E0 mov dword ptr ss:[ebp-20],edx
00505C52 . FF15 241040>call dword ptr ds:[<&MSVBVM60.__vbaLenBstr>] ; MSVBVM60.__vbaLenBstr
00505C58 . 8B4D 0C mov ecx,dword ptr ss:[ebp+C] ; len=557
00505C5B . 66:8B11 mov dx,word ptr ds:[ecx] ; 14,机器码长度
00505C5E . 66:6BD2 02 imul dx,dx,2 ; 14*2
00505C62 . 0F80 ED0800>jo GtChrdHl.00506555
00505C68 . 0FBFCA movsx ecx,dx
00505C6B . 3BC1 cmp eax,ecx ; 比较28跟22d
00505C6D .^ 0F8C 2CFFFF>jl GtChrdHl.00505B9F
00505C73 . 8B45 0C mov eax,dword ptr ss:[ebp+C]
00505C76 . 8D55 D4 lea edx,dword ptr ss:[ebp-2C]
00505C79 . 8995 44FFFF>mov dword ptr ss:[ebp-BC],edx
00505C7F . C785 3CFFFF>mov dword ptr ss:[ebp-C4],4008
00505C89 . 66:8B08 mov cx,word ptr ds:[eax]
00505C8C . 8D85 3CFFFF>lea eax,dword ptr ss:[ebp-C4]
00505C92 . 66:6BC9 02 imul cx,cx,2
00505C96 . 0F80 B90800>jo GtChrdHl.00506555
00505C9C . 0FBFD1 movsx edx,cx
00505C9F . 52 push edx
00505CA0 . 8D4D 9C lea ecx,dword ptr ss:[ebp-64]
00505CA3 . 50 push eax
00505CA4 . 51 push ecx
00505CA5 . FF15 701240>call dword ptr ds:[<&MSVBVM60.#617>] ; MSVBVM60.rtcLeftCharVar
00505CAB . 8D55 9C lea edx,dword ptr ss:[ebp-64] ; left(str,40)
00505CAE . 52 push edx
00505CAF . FF15 201040>call dword ptr ds:[<&MSVBVM60.__vbaStrVarMove>; MSVBVM60.__vbaStrVarMove
00505CB5 . 8BD0 mov edx,eax ; "7166703710710210511010799715554859471857"
00505CB7 . 8D4D D4 lea ecx,dword ptr ss:[ebp-2C]
00505CBA . FFD6 call esi
00505CBC . 8D4D 9C lea ecx,dword ptr ss:[ebp-64]
00505CBF . FF15 1C1040>call dword ptr ds:[<&MSVBVM60.__vbaFreeVar>] ; MSVBVM60.__vbaFreeVar
00505CC5 . 8B45 08 mov eax,dword ptr ss:[ebp+8]
00505CC8 . 8B08 mov ecx,dword ptr ds:[eax]
00505CCA . 51 push ecx ; 机器码
00505CCB . FF15 241040>call dword ptr ds:[<&MSVBVM60.__vbaLenBstr>] ; MSVBVM60.__vbaLenBstr
00505CD1 . 8BC8 mov ecx,eax ; 机器码长度
00505CD3 . FF15 341140>call dword ptr ds:[<&MSVBVM60.__vbaI2I4>] ; MSVBVM60.__vbaI2I4
00505CD9 . 8985 D0FEFF>mov dword ptr ss:[ebp-130],eax ; a
00505CDF . BB 01000000 mov ebx,1
00505CE4 > 66:3B9D D0F>cmp bx,word ptr ss:[ebp-130] ; 设置循环
00505CEB . 0F8F D50000>jg GtChrdHl.00505DC6
00505CF1 . 8B55 08 mov edx,dword ptr ss:[ebp+8]
00505CF4 . 8D45 9C lea eax,dword ptr ss:[ebp-64]
00505CF7 . 0FBFCB movsx ecx,bx
00505CFA . 8995 44FFFF>mov dword ptr ss:[ebp-BC],edx
00505D00 . 50 push eax
00505D01 . 8D95 3CFFFF>lea edx,dword ptr ss:[ebp-C4]
00505D07 . 51 push ecx
00505D08 . 8D45 8C lea eax,dword ptr ss:[ebp-74]
00505D0B . 52 push edx
00505D0C . 50 push eax
00505D0D . C745 A4 010>mov dword ptr ss:[ebp-5C],1
00505D14 . C745 9C 020>mov dword ptr ss:[ebp-64],2
00505D1B . C785 3CFFFF>mov dword ptr ss:[ebp-C4],4008
00505D25 . FF15 0C1140>call dword ptr ds:[<&MSVBVM60.#632>] ; MSVBVM60.rtcMidCharVar
00505D2B . 8D4D 8C lea ecx,dword ptr ss:[ebp-74] ; mid(str,i,1)
00505D2E . 8D55 C4 lea edx,dword ptr ss:[ebp-3C]
00505D31 . 51 push ecx
00505D32 . 52 push edx
00505D33 . FF15 C41140>call dword ptr ds:[<&MSVBVM60.__vbaStrVarVal>>; MSVBVM60.__vbaStrVarVal
00505D39 . 50 push eax ; w
00505D3A . FF15 481040>call dword ptr ds:[<&MSVBVM60.#516>] ; MSVBVM60.rtcAnsiValueBstr
00505D40 . 50 push eax ; asc("w")=0x77
00505D41 . FF15 041040>call dword ptr ds:[<&MSVBVM60.__vbaStrI2>] ; MSVBVM60.__vbaStrI2
00505D47 . 8945 84 mov dword ptr ss:[ebp-7C],eax ; 0x77->119
00505D4A . 8D85 7CFFFF>lea eax,dword ptr ss:[ebp-84]
00505D50 . 6A 01 push 1
00505D52 . 8D8D 6CFFFF>lea ecx,dword ptr ss:[ebp-94]
00505D58 . 50 push eax
00505D59 . 51 push ecx
00505D5A . C785 7CFFFF>mov dword ptr ss:[ebp-84],8
00505D64 . FF15 9C1240>call dword ptr ds:[<&MSVBVM60.#619>] ; MSVBVM60.rtcRightCharVar
00505D6A . 8D95 6CFFFF>lea edx,dword ptr ss:[ebp-94] ; right("119",1)
00505D70 . 52 push edx
00505D71 . FF15 941240>call dword ptr ds:[<&MSVBVM60.__vbaI2ErrVar>] ; MSVBVM60.__vbaI2ErrVar
00505D77 . 66:0345 D0 add ax,word ptr ss:[ebp-30]
00505D7B . 8D4D C4 lea ecx,dword ptr ss:[ebp-3C]
00505D7E . 0F80 D10700>jo GtChrdHl.00506555
00505D84 . 8945 D0 mov dword ptr ss:[ebp-30],eax
00505D87 . FF15 CC1240>call dword ptr ds:[<&MSVBVM60.__vbaFreeStr>] ; MSVBVM60.__vbaFreeStr
上面是第二个循环,逐位取机器码的ascii,并取右边的第一位,加起来为j:
for i= 1 to len(mc)
j= j + cint(right(cstr(asc(mid(mc,i,1))),1))
next