能力值:
( LV9,RANK:210 )
5 楼
上次发的片断,承蒙看雪老大鼓励
本来呢觉得算法部分乏善可陈,不值得大家浪费眼睛
但是为了精华,还是拿出来吧,觉得新人会比较注意这块所以写的比较详细了,高手就不用看了。
接着上面的:
004A839E . 50 push eax
004A839F . E8 8CB6F6FF call 00413A30
004A83A4 . E8 579F0700 call 00522300 ; \关键CALL,检测用户号
004A83A9 . 85C0 test eax, eax
004A83AB .^ 74 B8 je short 004A8365
004A83AD . 51 push ecx
004A83AE . 8D4424 68 lea eax, dword ptr [esp+68]
004A83B2 . 8BCC mov ecx, esp
004A83B4 . 896424 30 mov dword ptr [esp+30], esp
004A83B8 . 50 push eax
004A83B9 . E8 72B6F6FF call 00413A30
004A83BE . 51 push ecx
004A83BF . C68424 880100>mov byte ptr [esp+188], 19
004A83C7 . 8D83 34050000 lea eax, dword ptr [ebx+534]
004A83CD . 8BCC mov ecx, esp
004A83CF . 896424 70 mov dword ptr [esp+70], esp
004A83D3 . 50 push eax
004A83D4 . E8 57B6F6FF call 00413A30
004A83D9 . 8D4C24 1C lea ecx, dword ptr [esp+1C]
004A83DD . 51 push ecx
004A83DE . C68424 8C0100>mov byte ptr [esp+18C], 18
004A83E6 . E8 15B20700 call 00523600 ; 转换机器号序列 逐位 被10减、模10,然后倒置,取奇数位+ 偶数位
004A83EB . 50 push eax
004A83EC . 8D5424 2C lea edx, dword ptr [esp+2C]
004A83F0 . 52 push edx
004A83F1 . E8 2AADF6FF call 00413120 ; 关键,比较合法性
004A83F6 . 83C4 08 add esp, 8
004A83F9 . 8D4C24 14 lea ecx, dword ptr [esp+14]
004A83FD . 884424 13 mov byte ptr [esp+13], al ; 保存比较的结果
004A8401 . E8 5AB1F6FF call 00413560
004A8406 . 8A4424 13 mov al, byte ptr [esp+13] ; 又拿出来了
004A840A . 84C0 test al, al ; 看看我们最后的结果吧
004A840C . 0F84 BB000000 je 004A84CD ; 跳,还是不跳,这是个问题
004A8412 . 8B7424 18 mov esi, dword ptr [esp+18]
004A8416 . 8BCE mov ecx, esi
比较重要的3个CALL,我们跟进去看看 00522300 |$ 6A FF push -1
00522302 |. 68 48105700 push 00571048 ; SE 处理程序安装
00522307 |. 64:A1 0000000>mov eax, dword ptr fs:[0]
0052230D |. 50 push eax
0052230E |. 64:8925 00000>mov dword ptr fs:[0], esp
00522315 |. 83EC 6C sub esp, 6C
00522318 |. A1 58A65A00 mov eax, dword ptr [5AA658]
0052231D |. 894424 68 mov dword ptr [esp+68], eax
00522321 |. 56 push esi
00522322 |. C74424 78 000>mov dword ptr [esp+78], 0
0052232A |. 8BB424 800000>mov esi, dword ptr [esp+80] ; 用户号指针送esi
00522331 |. 837E F4 19 cmp dword ptr [esi-C], 19 ; 比较用户号位数是否19H=25位
00522335 |. 74 29 je short 00522360 ; 是的话就跳了
00522337 |. 8D46 F0 lea eax, dword ptr [esi-10]
0052233A |. C74424 78 FFF>mov dword ptr [esp+78], -1
00522342 |. 8D48 0C lea ecx, dword ptr [eax+C]
00522345 |. 83CA FF or edx, FFFFFFFF
00522348 |. F0:0FC111 lock xadd dword ptr [ecx], edx
0052234C |. 4A dec edx
0052234D |. 85D2 test edx, edx
0052234F |. 7F 08 jg short 00522359
00522351 |. 8B08 mov ecx, dword ptr [eax]
00522353 |. 8B11 mov edx, dword ptr [ecx]
00522355 |. 50 push eax
00522356 |. FF52 04 call dword ptr [edx+4]
00522359 |> 33C0 xor eax, eax
0052235B |. E9 53080000 jmp 00522BB3
00522360 |> 53 push ebx ; 上面跳过来的
00522361 |. 57 push edi
00522362 |. E8 2C3E0200 call 00546193
00522367 |. 8B10 mov edx, dword ptr [eax]
00522369 |. 8BC8 mov ecx, eax
0052236B |. FF52 0C call dword ptr [edx+C]
0052236E |. 83C0 10 add eax, 10
00522371 |. 894424 10 mov dword ptr [esp+10], eax
00522375 |. 6A 00 push 0
00522377 |. 68 AC415800 push 005841AC
0052237C |. 8D4C24 18 lea ecx, dword ptr [esp+18]
00522380 |. C68424 880000>mov byte ptr [esp+88], 1
00522388 |. E8 E314EFFF call 00413870
0052238D |. 8D46 F0 lea eax, dword ptr [esi-10]
00522390 |. 50 push eax
00522391 |. 894424 30 mov dword ptr [esp+30], eax
00522395 |. E8 E615EFFF call 00413980
0052239A |. 8D58 10 lea ebx, dword ptr [eax+10]
0052239D |. 83C4 04 add esp, 4
005223A0 |. 895C24 28 mov dword ptr [esp+28], ebx
005223A4 |. C68424 800000>mov byte ptr [esp+80], 2
005223AC |. 8B43 F4 mov eax, dword ptr [ebx-C] ; 用户号位数送EAX
005223AF |. 33F6 xor esi, esi ; 清空计数器ESI
005223B1 |. 85C0 test eax, eax
005223B3 |. 7E 7C jle short 00522431
005223B5 |> 6A 01 /push 1 ; 循环开始啦;处理1位
005223B7 |. 56 |push esi ; 第SI位
005223B8 |. 8D4424 1C |lea eax, dword ptr [esp+1C]
005223BC |. 50 |push eax ; 下面这个CALL取出来的字符的地址就放在[EAX]指向的地址
005223BD |. 8D4C24 34 |lea ecx, dword ptr [esp+34] ; 指向用户号指针
005223C1 |. E8 CA0AEFFF |call 00412E90 ; 用户号取出第SI位
005223C6 |. 8B00 |mov eax, dword ptr [eax]
005223C8 |. 50 |push eax
005223C9 |. E8 F7340100 |call 005358C5 ; 用户号数列第SI位转换为十进制数,返回到AX中
005223CE |. 8BF8 |mov edi, eax ; 送到EDI了
005223D0 |. 8B4424 18 |mov eax, dword ptr [esp+18]
005223D4 |. 83C0 F0 |add eax, -10
005223D7 |. 83C4 04 |add esp, 4
005223DA |. 8D48 0C |lea ecx, dword ptr [eax+C]
005223DD |. 83CA FF |or edx, FFFFFFFF
005223E0 |. F0:0FC111 |lock xadd dword ptr [ecx], edx
005223E4 |. 4A |dec edx
005223E5 |. 85D2 |test edx, edx
005223E7 |. 7F 08 |jg short 005223F1
005223E9 |. 8B08 |mov ecx, dword ptr [eax]
005223EB |. 8B11 |mov edx, dword ptr [ecx]
005223ED |. 50 |push eax
005223EE |. FF52 04 |call dword ptr [edx+4]
005223F1 |> 6A 0A |push 0A ; /
005223F3 |. 8D4C24 64 |lea ecx, dword ptr [esp+64] ; |盯住EDI
005223F7 |. B8 09000000 |mov eax, 9 ; |eax=9
005223FC |. 2BC7 |sub eax, edi ; |eax=9-edi即求当前数位被9减的结果
005223FE |. 51 |push ecx ; |
005223FF |. 50 |push eax ; |
00522400 |. E8 7F750100 |call 00539984 ; \把EAX里的数转字符(+30H)
00522405 |. 83C4 0C |add esp, 0C
00522408 |. 85C0 |test eax, eax
0052240A |. 75 04 |jnz short 00522410
0052240C |. 33C9 |xor ecx, ecx
0052240E |. EB 0E |jmp short 0052241E
00522410 |> 8BC8 |mov ecx, eax
00522412 |. 8D79 01 |lea edi, dword ptr [ecx+1]
00522415 |> 8A11 |/mov dl, byte ptr [ecx]
00522417 |. 41 ||inc ecx
00522418 |. 84D2 ||test dl, dl
0052241A |.^ 75 F9 |\jnz short 00522415 ; 这个小循环测试要处理的位数
0052241C |. 2BCF |sub ecx, edi
0052241E |> 51 |push ecx
0052241F |. 50 |push eax
00522420 |. 8D4C24 18 |lea ecx, dword ptr [esp+18]
00522424 |. E8 570FEFFF |call 00413380 ; 这个CALL的作用是把转换后的数位附加到目标数列中
00522429 |. 8B43 F4 |mov eax, dword ptr [ebx-C] ; 需要处理的用户号总长度
0052242C |. 46 |inc esi ; 计数器+1
0052242D |. 3BF0 |cmp esi, eax
0052242F |.^ 7C 84 \jl short 005223B5 ; 循环19h次,这个循环把用户号逐位用9减,结果生成新用户号序列
00522431 |> E8 5D3D0200 call 00546193
00522436 |. 8B10 mov edx, dword ptr [eax]
00522438 |. 8BC8 mov ecx, eax
0052243A |. FF52 0C call dword ptr [edx+C]
0052243D |. 83C0 10 add eax, 10
00522440 |. 894424 18 mov dword ptr [esp+18], eax
00522444 |. C68424 800000>mov byte ptr [esp+80], 3
0052244C |. E8 423D0200 call 00546193
00522451 |. 8B10 mov edx, dword ptr [eax]
00522453 |. 8BC8 mov ecx, eax
00522455 |. FF52 0C call dword ptr [edx+C]
00522458 |. 83C0 10 add eax, 10
0052245B |. 894424 20 mov dword ptr [esp+20], eax
0052245F |. C68424 800000>mov byte ptr [esp+80], 4
00522467 |. E8 273D0200 call 00546193
0052246C |. 8B10 mov edx, dword ptr [eax]
0052246E |. 8BC8 mov ecx, eax
00522470 |. FF52 0C call dword ptr [edx+C]
00522473 |. 83C0 10 add eax, 10
00522476 |. 894424 1C mov dword ptr [esp+1C], eax
0052247A |. C68424 800000>mov byte ptr [esp+80], 5
00522482 |. E8 0C3D0200 call 00546193
00522487 |. 8B10 mov edx, dword ptr [eax]
00522489 |. 8BC8 mov ecx, eax
0052248B |. FF52 0C call dword ptr [edx+C]
0052248E |. 83C0 10 add eax, 10
00522491 |. 894424 24 mov dword ptr [esp+24], eax
00522495 |. C68424 800000>mov byte ptr [esp+80], 6
0052249D |. E8 F13C0200 call 00546193
005224A2 |. 8B10 mov edx, dword ptr [eax]
005224A4 |. 8BC8 mov ecx, eax
005224A6 |. FF52 0C call dword ptr [edx+C]
005224A9 |. 83C0 10 add eax, 10
005224AC |. 894424 14 mov dword ptr [esp+14], eax
005224B0 |. 6A 05 push 5
005224B2 |. 6A 00 push 0
005224B4 |. 8D4424 14 lea eax, dword ptr [esp+14]
005224B8 |. 50 push eax
005224B9 |. 8D4C24 1C lea ecx, dword ptr [esp+1C]
005224BD |. C68424 8C0000>mov byte ptr [esp+8C], 7
005224C5 |. E8 C609EFFF call 00412E90 ; 截取1-5位
005224CA |. 50 push eax
005224CB |. 8D4C24 1C lea ecx, dword ptr [esp+1C]
005224CF |. C68424 840000>mov byte ptr [esp+84], 8
005224D7 |. E8 2413EFFF call 00413800
005224DC |. C68424 800000>mov byte ptr [esp+80], 7
005224E4 |. 8B4424 0C mov eax, dword ptr [esp+C]
005224E8 |. 83C0 F0 add eax, -10
005224EB |. 8D48 0C lea ecx, dword ptr [eax+C]
005224EE |. 83CA FF or edx, FFFFFFFF
005224F1 |. F0:0FC111 lock xadd dword ptr [ecx], edx
005224F5 |. 4A dec edx
005224F6 |. 85D2 test edx, edx
005224F8 |. 7F 08 jg short 00522502
005224FA |. 8B08 mov ecx, dword ptr [eax]
005224FC |. 8B11 mov edx, dword ptr [ecx]
005224FE |. 50 push eax
005224FF |. FF52 04 call dword ptr [edx+4]
00522502 |> 6A 05 push 5 ; 取6-10位
00522504 |. 6A 05 push 5
00522506 |. 8D4424 14 lea eax, dword ptr [esp+14]
0052250A |. 50 push eax
0052250B |. 8D4C24 1C lea ecx, dword ptr [esp+1C]
0052250F |. E8 7C09EFFF call 00412E90
00522514 |. 50 push eax
00522515 |. 8D4C24 24 lea ecx, dword ptr [esp+24]
00522519 |. C68424 840000>mov byte ptr [esp+84], 9
00522521 |. E8 DA12EFFF call 00413800
00522526 |. C68424 800000>mov byte ptr [esp+80], 7
0052252E |. 8B4424 0C mov eax, dword ptr [esp+C]
00522532 |. 83C0 F0 add eax, -10
00522535 |. 8D48 0C lea ecx, dword ptr [eax+C]
00522538 |. 83CA FF or edx, FFFFFFFF
0052253B |. F0:0FC111 lock xadd dword ptr [ecx], edx
0052253F |. 4A dec edx
00522540 |. 85D2 test edx, edx
00522542 |. 7F 08 jg short 0052254C
00522544 |. 8B08 mov ecx, dword ptr [eax]
00522546 |. 8B11 mov edx, dword ptr [ecx]
00522548 |. 50 push eax
00522549 |. FF52 04 call dword ptr [edx+4]
0052254C |> 6A 05 push 5
0052254E |. 6A 0A push 0A ; 截取11-15位
00522550 |. 8D4424 14 lea eax, dword ptr [esp+14]
00522554 |. 50 push eax
00522555 |. 8D4C24 1C lea ecx, dword ptr [esp+1C]
00522559 |. E8 3209EFFF call 00412E90
0052255E |. 50 push eax
0052255F |. 8D4C24 20 lea ecx, dword ptr [esp+20]
00522563 |. C68424 840000>mov byte ptr [esp+84], 0A
0052256B |. E8 9012EFFF call 00413800
00522570 |. C68424 800000>mov byte ptr [esp+80], 7
00522578 |. 8B4424 0C mov eax, dword ptr [esp+C]
0052257C |. 83C0 F0 add eax, -10
0052257F |. 8D48 0C lea ecx, dword ptr [eax+C]
00522582 |. 83CA FF or edx, FFFFFFFF
00522585 |. F0:0FC111 lock xadd dword ptr [ecx], edx
00522589 |. 4A dec edx
0052258A |. 85D2 test edx, edx
0052258C |. 7F 08 jg short 00522596
0052258E |. 8B08 mov ecx, dword ptr [eax]
00522590 |. 8B11 mov edx, dword ptr [ecx]
00522592 |. 50 push eax
00522593 |. FF52 04 call dword ptr [edx+4]
00522596 |> 6A 05 push 5 ; 截取16-20位
00522598 |. 6A 0F push 0F
0052259A |. 8D4424 14 lea eax, dword ptr [esp+14]
0052259E |. 50 push eax
0052259F |. 8D4C24 1C lea ecx, dword ptr [esp+1C]
005225A3 |. E8 E808EFFF call 00412E90
005225A8 |. 50 push eax
005225A9 |. 8D4C24 28 lea ecx, dword ptr [esp+28]
005225AD |. C68424 840000>mov byte ptr [esp+84], 0B
005225B5 |. E8 4612EFFF call 00413800
005225BA |. C68424 800000>mov byte ptr [esp+80], 7
005225C2 |. 8B4424 0C mov eax, dword ptr [esp+C]
005225C6 |. 83C0 F0 add eax, -10
005225C9 |. 8D48 0C lea ecx, dword ptr [eax+C]
005225CC |. 83CA FF or edx, FFFFFFFF
005225CF |. F0:0FC111 lock xadd dword ptr [ecx], edx
005225D3 |. 4A dec edx
005225D4 |. 85D2 test edx, edx
005225D6 |. 7F 08 jg short 005225E0
005225D8 |. 8B08 mov ecx, dword ptr [eax]
005225DA |. 8B11 mov edx, dword ptr [ecx]
005225DC |. 50 push eax
005225DD |. FF52 04 call dword ptr [edx+4]
005225E0 |> 6A 05 push 5
005225E2 |. 6A 14 push 14 ; 截取21-25位
005225E4 |. 8D4424 14 lea eax, dword ptr [esp+14]
005225E8 |. 50 push eax
005225E9 |. 8D4C24 1C lea ecx, dword ptr [esp+1C]
005225ED |. E8 9E08EFFF call 00412E90
005225F2 |. 50 push eax
005225F3 |. 8D4C24 18 lea ecx, dword ptr [esp+18]
005225F7 |. C68424 840000>mov byte ptr [esp+84], 0C
005225FF |. E8 FC11EFFF call 00413800
00522604 |. C68424 800000>mov byte ptr [esp+80], 7
0052260C |. 8B4424 0C mov eax, dword ptr [esp+C]
00522610 |. 83C0 F0 add eax, -10
00522613 |. 8D48 0C lea ecx, dword ptr [eax+C]
00522616 |. 83CA FF or edx, FFFFFFFF
00522619 |. F0:0FC111 lock xadd dword ptr [ecx], edx
0052261D |. 4A dec edx
0052261E |. 85D2 test edx, edx
00522620 |. 7F 08 jg short 0052262A
00522622 |. 8B08 mov ecx, dword ptr [eax]
00522624 |. 8B11 mov edx, dword ptr [ecx]
00522626 |. 50 push eax
00522627 |. FF52 04 call dword ptr [edx+4] ; 到这里已经把用户名变换后的字符串顺次拆成5个子串,每个长度为5
0052262A |> 6A 04 push 4 ; 取4位数
0052262C |. 6A 01 push 1 ; 从第2位开始取,就是说截取后四位
0052262E |. 8D4424 14 lea eax, dword ptr [esp+14]
00522632 |. 50 push eax
00522633 |. 8D4C24 24 lea ecx, dword ptr [esp+24] ; 从第一个子串里取
00522637 |. E8 5408EFFF call 00412E90 ; 这个CALL已经出现过这么多次了,功能大概就是MID$
0052263C |. 8B00 mov eax, dword ptr [eax]
0052263E |. 50 push eax
0052263F |. E8 81320100 call 005358C5 ; 变成10进制数了
00522644 |. 894424 5C mov dword ptr [esp+5C], eax ; 保存这个数
00522648 |. 8B4424 10 mov eax, dword ptr [esp+10]
0052264C |. 83C0 F0 add eax, -10
0052264F |. 83C4 04 add esp, 4
00522652 |. 8D48 0C lea ecx, dword ptr [eax+C]
00522655 |. 83CA FF or edx, FFFFFFFF
00522658 |. F0:0FC111 lock xadd dword ptr [ecx], edx
0052265C |. 4A dec edx
0052265D |. 85D2 test edx, edx
0052265F |. 7F 08 jg short 00522669
00522661 |. 8B08 mov ecx, dword ptr [eax]
00522663 |. 8B11 mov edx, dword ptr [ecx]
00522665 |. 50 push eax
00522666 |. FF52 04 call dword ptr [edx+4]
00522669 |> 6A 04 push 4 ; 取4位数
0052266B |. 6A 01 push 1 ; 从第二个子串第二位
0052266D |. 8D4424 14 lea eax, dword ptr [esp+14]
00522671 |. 50 push eax
00522672 |. 8D4C24 2C lea ecx, dword ptr [esp+2C]
00522676 |. E8 1508EFFF call 00412E90
0052267B |. 8B00 mov eax, dword ptr [eax]
0052267D |. 50 push eax
0052267E |. E8 42320100 call 005358C5 ; 变成10进制数了
00522683 |. 894424 54 mov dword ptr [esp+54], eax ; 保存结果
00522687 |. 8B4424 10 mov eax, dword ptr [esp+10]
0052268B |. 83C0 F0 add eax, -10
0052268E |. 83C4 04 add esp, 4
00522691 |. 8D48 0C lea ecx, dword ptr [eax+C]
00522694 |. 83CA FF or edx, FFFFFFFF
00522697 |. F0:0FC111 lock xadd dword ptr [ecx], edx
0052269B |. 4A dec edx
0052269C |. 85D2 test edx, edx
0052269E |. 7F 08 jg short 005226A8
005226A0 |. 8B08 mov ecx, dword ptr [eax]
005226A2 |. 8B11 mov edx, dword ptr [ecx]
005226A4 |. 50 push eax
005226A5 |. FF52 04 call dword ptr [edx+4]
005226A8 |> 6A 04 push 4 ; 和上面的类似,取第三段的后四位
005226AA |. 6A 01 push 1
005226AC |. 8D4424 14 lea eax, dword ptr [esp+14]
005226B0 |. 50 push eax
005226B1 |. 8D4C24 28 lea ecx, dword ptr [esp+28]
005226B5 |. E8 D607EFFF call 00412E90
005226BA |. 8B00 mov eax, dword ptr [eax]
005226BC |. 50 push eax
005226BD |. E8 03320100 call 005358C5 ; 变成10进制数了
005226C2 |. 894424 4C mov dword ptr [esp+4C], eax ; 保存结果
005226C6 |. 8B4424 10 mov eax, dword ptr [esp+10]
005226CA |. 83C0 F0 add eax, -10
005226CD |. 83C4 04 add esp, 4
005226D0 |. 8D48 0C lea ecx, dword ptr [eax+C]
005226D3 |. 83CA FF or edx, FFFFFFFF
005226D6 |. F0:0FC111 lock xadd dword ptr [ecx], edx
005226DA |. 4A dec edx
005226DB |. 85D2 test edx, edx
005226DD |. 7F 08 jg short 005226E7
005226DF |. 8B08 mov ecx, dword ptr [eax]
005226E1 |. 8B11 mov edx, dword ptr [ecx]
005226E3 |. 50 push eax
005226E4 |. FF52 04 call dword ptr [edx+4]
005226E7 |> 6A 04 push 4 ; 不说了,这里截取子串的4次操作都差不多,怎么没用循环呢浪费篇幅
005226E9 |. 6A 01 push 1
005226EB |. 8D4424 14 lea eax, dword ptr [esp+14]
005226EF |. 50 push eax
005226F0 |. 8D4C24 30 lea ecx, dword ptr [esp+30]
005226F4 |. E8 9707EFFF call 00412E90
005226F9 |. 8B00 mov eax, dword ptr [eax]
005226FB |. 50 push eax
005226FC |. E8 C4310100 call 005358C5 ; 变成10进制数了
00522701 |. 894424 44 mov dword ptr [esp+44], eax ; 保存结果
00522705 |. 8B4424 10 mov eax, dword ptr [esp+10]
00522709 |. 83C0 F0 add eax, -10
0052270C |. 83C4 04 add esp, 4
0052270F |. 8D48 0C lea ecx, dword ptr [eax+C]
00522712 |. 83CA FF or edx, FFFFFFFF
00522715 |. F0:0FC111 lock xadd dword ptr [ecx], edx
00522719 |. 4A dec edx
0052271A |. 85D2 test edx, edx
0052271C |. 7F 08 jg short 00522726
0052271E |. 8B08 mov ecx, dword ptr [eax]
00522720 |. 8B11 mov edx, dword ptr [ecx]
00522722 |. 50 push eax
00522723 |. FF52 04 call dword ptr [edx+4]
00522726 |> 55 push ebp
00522727 |. 6A 01 push 1
00522729 |. 6A 04 push 4
0052272B |. 8D4424 44 lea eax, dword ptr [esp+44]
0052272F |. 50 push eax
00522730 |. 8D4C24 24 lea ecx, dword ptr [esp+24]
00522734 |. E8 5707EFFF call 00412E90 ; 取第五个子串最后一位
00522739 |. 8BF0 mov esi, eax
0052273B |. 6A 01 push 1
0052273D |. 6A 00 push 0
0052273F |. 8D4C24 40 lea ecx, dword ptr [esp+40]
00522743 |. 51 push ecx
00522744 |. 8D4C24 34 lea ecx, dword ptr [esp+34]
00522748 |. C68424 900000>mov byte ptr [esp+90], 0D
00522750 |. E8 3B07EFFF call 00412E90 ; 取第四个第1位
00522755 |. 8BF8 mov edi, eax
00522757 |. 6A 01 push 1
00522759 |. 6A 00 push 0
0052275B |. 8D5424 60 lea edx, dword ptr [esp+60]
0052275F |. 52 push edx
00522760 |. 8D4C24 2C lea ecx, dword ptr [esp+2C]
00522764 |. C68424 900000>mov byte ptr [esp+90], 0E
0052276C |. E8 1F07EFFF call 00412E90 ; 取第三个第1位
00522771 |. 8BE8 mov ebp, eax
00522773 |. 6A 01 push 1
00522775 |. 6A 00 push 0
00522777 |. 8D4424 50 lea eax, dword ptr [esp+50]
0052277B |. 50 push eax
0052277C |. 8D4C24 30 lea ecx, dword ptr [esp+30]
00522780 |. C68424 900000>mov byte ptr [esp+90], 0F
00522788 |. E8 0307EFFF call 00412E90 ; 取第二个第1位
0052278D |. 8BD8 mov ebx, eax
0052278F |. 6A 01 push 1
00522791 |. 6A 00 push 0
00522793 |. 8D4C24 68 lea ecx, dword ptr [esp+68]
00522797 |. 51 push ecx
00522798 |. 8D4C24 28 lea ecx, dword ptr [esp+28]
0052279C |. C68424 900000>mov byte ptr [esp+90], 10
005227A4 |. E8 E706EFFF call 00412E90 ; 取第一个第1位
005227A9 |. 53 push ebx
005227AA |. 50 push eax
005227AB |. 8D5424 48 lea edx, dword ptr [esp+48]
005227AF |. 52 push edx
005227B0 |. C68424 900000>mov byte ptr [esp+90], 11
005227B8 |. E8 B307EFFF call 00412F70
005227BD |. 55 push ebp
005227BE |. 50 push eax
005227BF |. 8D4424 48 lea eax, dword ptr [esp+48]
005227C3 |. 50 push eax
005227C4 |. C68424 9C0000>mov byte ptr [esp+9C], 12
005227CC |. E8 9F07EFFF call 00412F70
005227D1 |. 57 push edi
005227D2 |. 50 push eax
005227D3 |. 8D4C24 70 lea ecx, dword ptr [esp+70]
005227D7 |. B3 13 mov bl, 13
005227D9 |. 51 push ecx
005227DA |. 889C24 A80000>mov byte ptr [esp+A8], bl
005227E1 |. E8 8A07EFFF call 00412F70
005227E6 |. 56 push esi
005227E7 |. 50 push eax
005227E8 |. 8D5424 3C lea edx, dword ptr [esp+3C]
005227EC |. 52 push edx
005227ED |. C68424 B40000>mov byte ptr [esp+B4], 14
005227F5 |. E8 7607EFFF call 00412F70 ; 调用412f704次组合5位数字符串
005227FA |. 8B00 mov eax, dword ptr [eax]
005227FC |. 50 push eax
005227FD |. E8 C3300100 call 005358C5 ; 变成10进制数了
00522802 |. 8BF0 mov esi, eax ; 结果放进SI了
00522804 |. 8B4424 44 mov eax, dword ptr [esp+44]
00522808 |. 83C0 F0 add eax, -10
0052280B |. 83C4 34 add esp, 34
0052280E |. 8D48 0C lea ecx, dword ptr [eax+C]
00522811 |. 83CF FF or edi, FFFFFFFF
00522814 |. 8BD7 mov edx, edi
00522816 |. F0:0FC111 lock xadd dword ptr [ecx], edx
0052281A |. 4A dec edx
0052281B |. 85D2 test edx, edx
0052281D |. 5D pop ebp
0052281E |. 7F 08 jg short 00522828
00522820 |. 8B08 mov ecx, dword ptr [eax]
00522822 |. 8B11 mov edx, dword ptr [ecx]
00522824 |. 50 push eax
00522825 |. FF52 04 call dword ptr [edx+4]
00522828 |> 889C24 800000>mov byte ptr [esp+80], bl
0052282F |. 8B4424 4C mov eax, dword ptr [esp+4C]
00522833 |. 83C0 F0 add eax, -10
00522836 |. 8D48 0C lea ecx, dword ptr [eax+C]
00522839 |. 8BD7 mov edx, edi
0052283B |. F0:0FC111 lock xadd dword ptr [ecx], edx
0052283F |. 4A dec edx
00522840 |. 85D2 test edx, edx
00522842 |. 7F 08 jg short 0052284C
00522844 |. 8B08 mov ecx, dword ptr [eax]
00522846 |. 8B11 mov edx, dword ptr [ecx]
00522848 |. 50 push eax
00522849 |. FF52 04 call dword ptr [edx+4]
0052284C |> C68424 800000>mov byte ptr [esp+80], 12
00522854 |. 8B4424 30 mov eax, dword ptr [esp+30]
00522858 |. 83C0 F0 add eax, -10
0052285B |. 8D48 0C lea ecx, dword ptr [eax+C]
0052285E |. 8BD7 mov edx, edi
00522860 |. F0:0FC111 lock xadd dword ptr [ecx], edx
00522864 |. 4A dec edx
00522865 |. 85D2 test edx, edx
00522867 |. 7F 08 jg short 00522871
00522869 |. 8B08 mov ecx, dword ptr [eax]
0052286B |. 8B11 mov edx, dword ptr [ecx]
0052286D |. 50 push eax
0052286E |. FF52 04 call dword ptr [edx+4]
00522871 |> C68424 800000>mov byte ptr [esp+80], 11
00522879 |. 8B4424 3C mov eax, dword ptr [esp+3C]
0052287D |. 83C0 F0 add eax, -10
00522880 |. 8D48 0C lea ecx, dword ptr [eax+C]
00522883 |. 8BD7 mov edx, edi
00522885 |. F0:0FC111 lock xadd dword ptr [ecx], edx
00522889 |. 4A dec edx
0052288A |. 85D2 test edx, edx
0052288C |. 7F 08 jg short 00522896
0052288E |. 8B08 mov ecx, dword ptr [eax]
00522890 |. 8B11 mov edx, dword ptr [ecx]
00522892 |. 50 push eax
00522893 |. FF52 04 call dword ptr [edx+4]
00522896 |> C68424 800000>mov byte ptr [esp+80], 10
0052289E |. 8B4424 5C mov eax, dword ptr [esp+5C]
005228A2 |. 83C0 F0 add eax, -10
005228A5 |. 8D48 0C lea ecx, dword ptr [eax+C]
005228A8 |. 8BD7 mov edx, edi
005228AA |. F0:0FC111 lock xadd dword ptr [ecx], edx
005228AE |. 4A dec edx
005228AF |. 85D2 test edx, edx
005228B1 |. 7F 08 jg short 005228BB
005228B3 |. 8B08 mov ecx, dword ptr [eax]
005228B5 |. 8B11 mov edx, dword ptr [ecx]
005228B7 |. 50 push eax
005228B8 |. FF52 04 call dword ptr [edx+4]
005228BB |> C68424 800000>mov byte ptr [esp+80], 0F
005228C3 |. 8B4424 44 mov eax, dword ptr [esp+44]
005228C7 |. 83C0 F0 add eax, -10
005228CA |. 8D48 0C lea ecx, dword ptr [eax+C]
005228CD |. 8BD7 mov edx, edi
005228CF |. F0:0FC111 lock xadd dword ptr [ecx], edx
005228D3 |. 4A dec edx
005228D4 |. 85D2 test edx, edx
005228D6 |. 7F 08 jg short 005228E0
005228D8 |. 8B08 mov ecx, dword ptr [eax]
005228DA |. 8B11 mov edx, dword ptr [ecx]
005228DC |. 50 push eax
005228DD |. FF52 04 call dword ptr [edx+4]
005228E0 |> C68424 800000>mov byte ptr [esp+80], 0E
005228E8 |. 8B4424 54 mov eax, dword ptr [esp+54]
005228EC |. 83C0 F0 add eax, -10
005228EF |. 8D48 0C lea ecx, dword ptr [eax+C]
005228F2 |. 8BD7 mov edx, edi
005228F4 |. F0:0FC111 lock xadd dword ptr [ecx], edx
005228F8 |. 4A dec edx
005228F9 |. 85D2 test edx, edx
005228FB |. 7F 08 jg short 00522905
005228FD |. 8B08 mov ecx, dword ptr [eax]
005228FF |. 8B11 mov edx, dword ptr [ecx]
00522901 |. 50 push eax
00522902 |. FF52 04 call dword ptr [edx+4]
00522905 |> C68424 800000>mov byte ptr [esp+80], 0D
0052290D |. 8B4424 34 mov eax, dword ptr [esp+34]
00522911 |. 83C0 F0 add eax, -10
00522914 |. 8D48 0C lea ecx, dword ptr [eax+C]
00522917 |. 8BD7 mov edx, edi
00522919 |. F0:0FC111 lock xadd dword ptr [ecx], edx
0052291D |. 4A dec edx
0052291E |. 85D2 test edx, edx
00522920 |. 7F 08 jg short 0052292A
00522922 |. 8B08 mov ecx, dword ptr [eax]
00522924 |. 8B11 mov edx, dword ptr [ecx]
00522926 |. 50 push eax
00522927 |. FF52 04 call dword ptr [edx+4]
0052292A |> C68424 800000>mov byte ptr [esp+80], 7
00522932 |. 8B4424 38 mov eax, dword ptr [esp+38]
00522936 |. 83C0 F0 add eax, -10
00522939 |. 8D48 0C lea ecx, dword ptr [eax+C]
0052293C |. 8BD7 mov edx, edi
0052293E |. F0:0FC111 lock xadd dword ptr [ecx], edx
00522942 |. 4A dec edx
00522943 |. 85D2 test edx, edx
00522945 |. 7F 08 jg short 0052294F
00522947 |. 8B08 mov ecx, dword ptr [eax]
00522949 |. 8B11 mov edx, dword ptr [ecx]
0052294B |. 50 push eax
0052294C |. FF52 04 call dword ptr [edx+4]
0052294F |> 8B4424 40 mov eax, dword ptr [esp+40] ; 取出第一个四位数十进制值
00522953 |. 8B4C24 48 mov ecx, dword ptr [esp+48] ; 取出第二个四位数十进制值
00522957 |. 8B5C24 50 mov ebx, dword ptr [esp+50] ; 第三个四位数十进制值
0052295B |. 8B5424 58 mov edx, dword ptr [esp+58] ; 第四个四位数十进制值
0052295F |. 03C1 add eax, ecx
00522961 |. 03C3 add eax, ebx
00522963 |. 03C2 add eax, edx ; 他们的和
00522965 |. C68424 800000>mov byte ptr [esp+80], 6
0052296D |. 3BF0 cmp esi, eax ; 与那个5位数比较
0052296F |. 8B4424 14 mov eax, dword ptr [esp+14]
00522973 |. 0F84 1D010000 je 00522A96 ; 不相等就完蛋
00522979 |. 83C0 F0 add eax, -10
0052297C |. 8D50 0C lea edx, dword ptr [eax+C]
0052297F |. 8BCF mov ecx, edi
下一个
00523600 /$ 6A FF push -1
00523602 |. 68 50245700 push 00572450 ; SE 处理程序安装
00523607 |. 64:A1 0000000>mov eax, dword ptr fs:[0]
0052360D |. 50 push eax
0052360E |. 64:8925 00000>mov dword ptr fs:[0], esp
00523615 |. 83EC 28 sub esp, 28
00523618 |. A1 58A65A00 mov eax, dword ptr [5AA658]
0052361D |. 53 push ebx
0052361E |. 56 push esi
0052361F |. 33DB xor ebx, ebx
00523621 |. 894424 2C mov dword ptr [esp+2C], eax
00523625 |. 57 push edi
00523626 |. 895C24 10 mov dword ptr [esp+10], ebx
0052362A |. 68 AC415800 push 005841AC
0052362F |. 8D4C24 10 lea ecx, dword ptr [esp+10]
00523633 |. C74424 40 010>mov dword ptr [esp+40], 1
0052363B |. E8 7005EFFF call 00413BB0
00523640 |. C64424 3C 02 mov byte ptr [esp+3C], 2
00523645 |. 55 push ebp
00523646 |> 6A 01 /push 1
00523648 |. 53 |push ebx
00523649 |. 8D4424 1C |lea eax, dword ptr [esp+1C]
0052364D |. 50 |push eax
0052364E |. 8D4C24 58 |lea ecx, dword ptr [esp+58]
00523652 |. E8 39F8EEFF |call 00412E90 ; 取字符‘9’
00523657 |. 8BF0 |mov esi, eax
00523659 |. 6A 01 |push 1
0052365B |. 53 |push ebx
0052365C |. 8D4C24 24 |lea ecx, dword ptr [esp+24]
00523660 |. 51 |push ecx
00523661 |. 8D4C24 5C |lea ecx, dword ptr [esp+5C]
00523665 |. C64424 4C 03 |mov byte ptr [esp+4C], 3
0052366A |. E8 21F8EEFF |call 00412E90 ; 取当前位字符
0052366F |. 8BF8 |mov edi, eax
00523671 |. C64424 40 04 |mov byte ptr [esp+40], 4
00523676 |. 8B06 |mov eax, dword ptr [esi]
00523678 |. 8B48 FC |mov ecx, dword ptr [eax-4]
0052367B |. 83E8 10 |sub eax, 10
0052367E |. 83F9 01 |cmp ecx, 1
00523681 |. 7E 0B |jle short 0052368E
00523683 |. 8B50 04 |mov edx, dword ptr [eax+4]
00523686 |. 52 |push edx
00523687 |. 8BCE |mov ecx, esi
00523689 |. E8 32FFEEFF |call 004135C0
0052368E |> 8B07 |mov eax, dword ptr [edi]
00523690 |. 8B48 FC |mov ecx, dword ptr [eax-4]
00523693 |. 8B2E |mov ebp, dword ptr [esi]
00523695 |. 83E8 10 |sub eax, 10
00523698 |. 83F9 01 |cmp ecx, 1
0052369B |. 7E 0B |jle short 005236A8
0052369D |. 8B40 04 |mov eax, dword ptr [eax+4]
005236A0 |. 50 |push eax
005236A1 |. 8BCF |mov ecx, edi
005236A3 |. E8 18FFEEFF |call 004135C0
005236A8 |> 8B3F |mov edi, dword ptr [edi]
005236AA |. 57 |push edi
005236AB |. E8 15220100 |call 005358C5 ; ‘9’变为十进制数字
005236B0 |. 55 |push ebp
005236B1 |. 8BF0 |mov esi, eax ; ESI=9
005236B3 |. E8 0D220100 |call 005358C5 ; 当前位变10进制数字
005236B8 |. 03F0 |add esi, eax ; 当前位数字+9
005236BA |. C64424 48 03 |mov byte ptr [esp+48], 3
005236BF |. 8B4424 24 |mov eax, dword ptr [esp+24]
005236C3 |. 83C0 F0 |add eax, -10
005236C6 |. 83C4 08 |add esp, 8
005236C9 |. 8D48 0C |lea ecx, dword ptr [eax+C]
005236CC |. 83CA FF |or edx, FFFFFFFF
005236CF |. F0:0FC111 |lock xadd dword ptr [ecx], edx
005236D3 |. 4A |dec edx
005236D4 |. 85D2 |test edx, edx
005236D6 |. 7F 08 |jg short 005236E0
005236D8 |. 8B08 |mov ecx, dword ptr [eax]
005236DA |. 8B11 |mov edx, dword ptr [ecx]
005236DC |. 50 |push eax
005236DD |. FF52 04 |call dword ptr [edx+4]
005236E0 |> C64424 40 02 |mov byte ptr [esp+40], 2
005236E5 |. 8B4424 14 |mov eax, dword ptr [esp+14]
005236E9 |. 83C0 F0 |add eax, -10
005236EC |. 8D48 0C |lea ecx, dword ptr [eax+C]
005236EF |. 83CA FF |or edx, FFFFFFFF
005236F2 |. F0:0FC111 |lock xadd dword ptr [ecx], edx
005236F6 |. 4A |dec edx
005236F7 |. 85D2 |test edx, edx
005236F9 |. 7F 08 |jg short 00523703
005236FB |. 8B08 |mov ecx, dword ptr [eax]
005236FD |. 8B11 |mov edx, dword ptr [ecx]
005236FF |. 50 |push eax
00523700 |. FF52 04 |call dword ptr [edx+4]
00523703 |> 8BC6 |mov eax, esi ; ESI现在是当前位+9。送EAX
00523705 |. 99 |cdq
00523706 |. B9 0A000000 |mov ecx, 0A
0052370B |. F7F9 |idiv ecx ; 除10
0052370D |. B8 09000000 |mov eax, 9
00523712 |. 51 |push ecx ; /
00523713 |. 2BC2 |sub eax, edx ; |9减余数
00523715 |. 8D5424 24 |lea edx, dword ptr [esp+24] ; |上述运算应该是是9-(X+9) MOD 10,其实就是(10-X)MOD 10啦
00523719 |. 52 |push edx ; |
0052371A |. 50 |push eax ; |
0052371B |. E8 64620100 |call 00539984 ; \数字变成字符
00523720 |. 83C4 0C |add esp, 0C
00523723 |. 85C0 |test eax, eax
00523725 |. 75 04 |jnz short 0052372B
00523727 |. 33C9 |xor ecx, ecx
00523729 |. EB 0E |jmp short 00523739
0052372B |> 8BC8 |mov ecx, eax
0052372D |. 8D71 01 |lea esi, dword ptr [ecx+1]
00523730 |> 8A11 |/mov dl, byte ptr [ecx]
00523732 |. 41 ||inc ecx
00523733 |. 84D2 ||test dl, dl
00523735 |.^ 75 F9 |\jnz short 00523730
00523737 |. 2BCE |sub ecx, esi
00523739 |> 51 |push ecx
0052373A |. 50 |push eax
0052373B |. 8D4C24 18 |lea ecx, dword ptr [esp+18]
0052373F |. E8 3CFCEEFF |call 00413380 ; 当前位变换后的结果附加到目标串后
00523744 |. 43 |inc ebx ; 计数器++
00523745 |. 83FB 19 |cmp ebx, 19
00523748 |.^ 0F8C F8FEFFFF \jl 00523646 ; 这个循环,机器号逐位被10减并模10,连接成新串
0052374E |. 8B5424 10 mov edx, dword ptr [esp+10]
00523752 |. 8B6A FC mov ebp, dword ptr [edx-4]
00523755 |. 8B72 F4 mov esi, dword ptr [edx-C]
00523758 |. 8B42 F8 mov eax, dword ptr [edx-8]
0052375B |. B9 01000000 mov ecx, 1
00523760 |. 2BCD sub ecx, ebp
00523762 |. 2BC6 sub eax, esi
00523764 |. 0BC1 or eax, ecx
00523766 |. 5D pop ebp
00523767 |. 7D 0E jge short 00523777
00523769 |. 56 push esi
0052376A |. 8D4C24 10 lea ecx, dword ptr [esp+10]
0052376E |. E8 6DFDEEFF call 004134E0
00523773 |. 8B5424 0C mov edx, dword ptr [esp+C]
00523777 |> 52 push edx
00523778 |. E8 FA260100 call 00535E77 ; 倒置数列
0052377D |. 83C4 04 add esp, 4
00523780 |. 85F6 test esi, esi
00523782 |. 0F8C EC010000 jl 00523974
00523788 |. 8B4424 0C mov eax, dword ptr [esp+C]
0052378C |. 3B70 F8 cmp esi, dword ptr [eax-8]
0052378F |. 0F8F DF010000 jg 00523974
00523795 |. 8970 F4 mov dword ptr [eax-C], esi
00523798 |. 8B4424 0C mov eax, dword ptr [esp+C]
0052379C |. 68 AC415800 push 005841AC
005237A1 |. 8D4C24 18 lea ecx, dword ptr [esp+18]
005237A5 |. C60406 00 mov byte ptr [esi+eax], 0
005237A9 |. E8 0204EFFF call 00413BB0
005237AE |. B3 05 mov bl, 5
005237B0 |. 885C24 3C mov byte ptr [esp+3C], bl
005237B4 |. 33F6 xor esi, esi ; 计数器ESI=0
005237B6 |> 6A 01 /push 1 ; 从这里再次开始折腾
005237B8 |. 56 |push esi
005237B9 |. 8D4C24 18 |lea ecx, dword ptr [esp+18]
005237BD |. 51 |push ecx
005237BE |. 8D4C24 18 |lea ecx, dword ptr [esp+18]
005237C2 |. E8 C9F6EEFF |call 00412E90 ; 取字符
005237C7 |. C64424 3C 06 |mov byte ptr [esp+3C], 6
005237CC |. 8B00 |mov eax, dword ptr [eax]
005237CE |. 8B48 F4 |mov ecx, dword ptr [eax-C]
005237D1 |. 51 |push ecx
005237D2 |. 50 |push eax
005237D3 |. 8D4C24 1C |lea ecx, dword ptr [esp+1C]
005237D7 |. E8 A4FBEEFF |call 00413380 ; 组合新串
005237DC |. 885C24 3C |mov byte ptr [esp+3C], bl
005237E0 |. 8B4424 10 |mov eax, dword ptr [esp+10]
005237E4 |. 83C0 F0 |add eax, -10
005237E7 |. 8D50 0C |lea edx, dword ptr [eax+C]
005237EA |. 83C9 FF |or ecx, FFFFFFFF
005237ED |. F0:0FC10A |lock xadd dword ptr [edx], ecx
005237F1 |. 49 |dec ecx
005237F2 |. 85C9 |test ecx, ecx
005237F4 |. 7F 08 |jg short 005237FE
005237F6 |. 8B08 |mov ecx, dword ptr [eax]
005237F8 |. 8B11 |mov edx, dword ptr [ecx]
005237FA |. 50 |push eax
005237FB |. FF52 04 |call dword ptr [edx+4]
005237FE |> 83C6 02 |add esi, 2 ; 计数器每次+2,所以只取数列奇数位
00523801 |. 83FE 19 |cmp esi, 19
00523804 |.^ 7C B0 \jl short 005237B6
00523806 |. BE 01000000 mov esi, 1 ; 计数器ESI=1
0052380B |. EB 03 jmp short 00523810
0052380D | 8D49 00 lea ecx, dword ptr [ecx]
00523810 |> 6A 01 /push 1 ; 循环开始
00523812 |. 56 |push esi
00523813 |. 8D4424 18 |lea eax, dword ptr [esp+18]
00523817 |. 50 |push eax
00523818 |. 8D4C24 18 |lea ecx, dword ptr [esp+18]
0052381C |. E8 6FF6EEFF |call 00412E90 ; 取字符
00523821 |. C64424 3C 07 |mov byte ptr [esp+3C], 7
00523826 |. 8B00 |mov eax, dword ptr [eax]
00523828 |. 8B48 F4 |mov ecx, dword ptr [eax-C]
0052382B |. 51 |push ecx
0052382C |. 50 |push eax
0052382D |. 8D4C24 1C |lea ecx, dword ptr [esp+1C]
00523831 |. E8 4AFBEEFF |call 00413380 ; 组合
00523836 |. 885C24 3C |mov byte ptr [esp+3C], bl
0052383A |. 8B4424 10 |mov eax, dword ptr [esp+10]
0052383E |. 83C0 F0 |add eax, -10
00523841 |. 8D48 0C |lea ecx, dword ptr [eax+C]
00523844 |. 83CA FF |or edx, FFFFFFFF
00523847 |. F0:0FC111 |lock xadd dword ptr [ecx], edx
0052384B |. 4A |dec edx
0052384C |. 85D2 |test edx, edx
0052384E |. 7F 08 |jg short 00523858
00523850 |. 8B08 |mov ecx, dword ptr [eax]
00523852 |. 8B11 |mov edx, dword ptr [ecx]
00523854 |. 50 |push eax
00523855 |. FF52 04 |call dword ptr [edx+4]
00523858 |> 83C6 02 |add esi, 2 ; 计数器+=2
0052385B |. 83FE 19 |cmp esi, 19
0052385E |.^ 7C B0 \jl short 00523810 ; 这次取偶数位
00523860 |. 8B7424 14 mov esi, dword ptr [esp+14]
00523864 |. 8B4E F0 mov ecx, dword ptr [esi-10]
00523867 |. 8B01 mov eax, dword ptr [ecx]
下面这个
=================
00535E77 /$ 53 push ebx
00535E78 |. 56 push esi
00535E79 |. 8B7424 0C mov esi, dword ptr [esp+C]
00535E7D |. 57 push edi
00535E7E |. 8BDE mov ebx, esi
00535E80 |. 8BFE mov edi, esi ; EDI=ESI指向串首
00535E82 |. E8 213E0000 call 00539CA8
00535E87 |. 8B40 60 mov eax, dword ptr [eax+60]
00535E8A |. 3B05 C8EF5A00 cmp eax, dword ptr [5AEFC8]
00535E90 |. 74 05 je short 00535E97
00535E92 |. E8 68330000 call 005391FF
00535E97 |> 8378 08 00 cmp dword ptr [eax+8], 0
00535E9B |. 75 27 jnz short 00535EC4
00535E9D |. 56 push esi
00535E9E |. E8 7D5C0000 call 0053BB20
00535EA3 |. 59 pop ecx
00535EA4 |. EB 3C jmp short 00535EE2
00535EA6 |> 0FB6C9 /movzx ecx, cl ; 循环开始
00535EA9 |. 8A4C01 1D |mov cl, byte ptr [ecx+eax+1D]
00535EAD |. 80E1 04 |and cl, 4
00535EB0 |. 46 |inc esi
00535EB1 |. 84C9 |test cl, cl
00535EB3 |. 74 0F |je short 00535EC4
00535EB5 |. 8A0E |mov cl, byte ptr [esi]
00535EB7 |. 84C9 |test cl, cl
00535EB9 |. 74 11 |je short 00535ECC
00535EBB |. 8A56 FF |mov dl, byte ptr [esi-1]
00535EBE |. 8816 |mov byte ptr [esi], dl
00535EC0 |. 884E FF |mov byte ptr [esi-1], cl
00535EC3 |. 46 |inc esi
00535EC4 |> 8A0E mov cl, byte ptr [esi]
00535EC6 |. 84C9 |test cl, cl
00535EC8 |.^ 75 DC \jnz short 00535EA6 ; 通过这个循环,ESI指向串尾
00535ECA |. EB 0F jmp short 00535EDB
00535ECC |> 4E dec esi
00535ECD |. C606 00 mov byte ptr [esi], 0
00535ED0 |. EB 09 jmp short 00535EDB
00535ED2 |> 8A07 /mov al, byte ptr [edi] ; 取串首字符
00535ED4 |. 8A0E |mov cl, byte ptr [esi] ; 取串尾字符
00535ED6 |. 880F |mov byte ptr [edi], cl ; 串尾字符送串首
00535ED8 |. 47 |inc edi ; 串首指针++
00535ED9 |. 8806 |mov byte ptr [esi], al ; 串首字符送串尾
00535EDB |> 4E dec esi ; 串尾指针--
00535EDC |. 3BFE |cmp edi, esi ; 还没整完?
00535EDE |.^ 72 F2 \jb short 00535ED2 ; 继续
00535EE0 |. 8BC3 mov eax, ebx ; 上面这个小循环倒置机器码变换后的数列
00535EE2 |> 5F pop edi
00535EE3 |. 5E pop esi
00535EE4 |. 5B pop ebx
00535EE5 \. C3 retn
=============
这个。。。
00413120 /$ 8B4424 08 mov eax, dword ptr [esp+8]
00413124 |. 8B00 mov eax, dword ptr [eax]
00413126 |. 8B4C24 04 mov ecx, dword ptr [esp+4]
0041312A |. 8B09 mov ecx, dword ptr [ecx]
0041312C |. 50 push eax
0041312D |. 51 push ecx
0041312E |. E8 97271200 call 005358CA
00413133 |. 83C4 08 add esp, 8
00413136 |. F7D8 neg eax
00413138 |. 1BC0 sbb eax, eax
0041313A |. F7D8 neg eax
0041313C \. C3 retn
0053583D /$ 56 push esi
0053583E |. 57 push edi
0053583F |. E8 64440000 call 00539CA8
00535844 |. 8B78 64 mov edi, dword ptr [eax+64]
00535847 |. 3B3D 7CA95A00 cmp edi, dword ptr [5AA97C] ; 业绩管理.005AA928
0053584D |. 74 07 je short 00535856
0053584F |. E8 E0430000 call 00539C34
00535854 |. 8BF8 mov edi, eax
00535856 |> 8B7424 0C mov esi, dword ptr [esp+C]
0053585A |> 837F 28 01 /cmp dword ptr [edi+28], 1
0053585E |. 0FB606 |movzx eax, byte ptr [esi]
00535861 |. 7E 0E |jle short 00535871
00535863 |. 6A 08 |push 8
00535865 |. 50 |push eax
00535866 |. 57 |push edi
00535867 |. E8 C0410000 |call 00539A2C
0053586C |. 83C4 0C |add esp, 0C
0053586F |. EB 0A |jmp short 0053587B
00535871 |> 8B4F 48 |mov ecx, dword ptr [edi+48]
00535874 |. 0FB60441 |movzx eax, byte ptr [ecx+eax*2]
00535878 |. 83E0 08 |and eax, 8
0053587B |> 85C0 |test eax, eax
0053587D |. 74 03 |je short 00535882
0053587F |. 46 |inc esi
00535880 |.^ EB D8 \jmp short 0053585A
00535882 |> 0FB60E movzx ecx, byte ptr [esi] ; 数列的某位数字送ECX
00535885 |. 46 inc esi ; 指针+1
00535886 |. 83F9 2D cmp ecx, 2D ; 该位数等于2d?
00535889 |. 8BD1 mov edx, ecx ; 该位数字送dx
0053588B |. 74 05 je short 00535892
0053588D |. 83F9 2B cmp ecx, 2B ; 该位数字等于2b?
00535890 |. 75 04 jnz short 00535896
00535892 |> 0FB60E movzx ecx, byte ptr [esi] ; 取一位
00535895 |. 46 inc esi
00535896 |> 33C0 xor eax, eax
00535898 |> 83F9 30 /cmp ecx, 30 ; 小于0?
0053589B |. 7C 0A |jl short 005358A7
0053589D |. 83F9 39 |cmp ecx, 39 ; 大于9?
005358A0 |. 7F 05 |jg short 005358A7
005358A2 |. 83E9 30 |sub ecx, 30 ; 字符转换成数字
005358A5 |. EB 03 |jmp short 005358AA
005358A7 |> 83C9 FF |or ecx, FFFFFFFF
005358AA |> 83F9 FF |cmp ecx, -1
005358AD |. 74 0C |je short 005358BB
005358AF |. 8D0480 |lea eax, dword ptr [eax+eax*4] ; eax=eax*5
005358B2 |. 8D0441 |lea eax, dword ptr [ecx+eax*2] ; eax=eax*2+ecx
005358B5 |. 0FB60E |movzx ecx, byte ptr [esi] ; 取下一个
005358B8 |. 46 |inc esi ; 这段程序可以把1个字符数列转换为十进制数
005358B9 |.^ EB DD \jmp short 00535898
005358BB |> 83FA 2D cmp edx, 2D
005358BE |. 5F pop edi
005358BF |. 5E pop esi
005358C0 |. 75 02 jnz short 005358C4
005358C2 |. F7D8 neg eax
005358C4 |> C3 retn
005358C5 \$^ E9 73FFFFFF jmp 0053583D 005358CA $ 55 push ebp ; 业绩管理.005ADAF0
005358CB . 8BEC mov ebp, esp
005358CD . 56 push esi
005358CE . E8 D5430000 call 00539CA8
005358D3 . 8B70 60 mov esi, dword ptr [eax+60]
005358D6 . 3B35 C8EF5A00 cmp esi, dword ptr [5AEFC8]
005358DC . 74 07 je short 005358E5
005358DE . E8 1C390000 call 005391FF
005358E3 . 8BF0 mov esi, eax
005358E5 > 837E 08 00 cmp dword ptr [esi+8], 0
005358E9 . 75 07 jnz short 005358F2
005358EB . 5E pop esi
005358EC . 5D pop ebp
005358ED . E9 8E460000 jmp 00539F80
005358F2 > 57 push edi
005358F3 . 8B7D 0C mov edi, dword ptr [ebp+C]
005358F6 . 53 push ebx
005358F7 > 8B45 08 mov eax, dword ptr [ebp+8] ; 输入的注册码地址
005358FA . 66:0FB600 movzx ax, byte ptr [eax] ; 从用户输入的注册码里取字符
005358FE . FF45 08 inc dword ptr [ebp+8] ; 指向下一个
00535901 . 0FB6C8 movzx ecx, al
00535904 . F64431 1D 04 test byte ptr [ecx+esi+1D], 4
00535909 . 74 18 je short 00535923
0053590B . 8B4D 08 mov ecx, dword ptr [ebp+8]
0053590E . 8A09 mov cl, byte ptr [ecx]
00535910 . 84C9 test cl, cl
00535912 . 75 04 jnz short 00535918
00535914 . 33C0 xor eax, eax
00535916 . EB 0B jmp short 00535923
00535918 > 33D2 xor edx, edx
0053591A . FF45 08 inc dword ptr [ebp+8]
0053591D . 8AF0 mov dh, al
0053591F . 8AD1 mov dl, cl
00535921 . 8BC2 mov eax, edx
00535923 > 66:0FB60F movzx cx, byte ptr [edi] ; 从前面变换机器号后的字符串里取字符
00535927 . 0FB6D1 movzx edx, cl
0053592A . 47 inc edi ; 指向下一个字符
0053592B . F64432 1D 04 test byte ptr [edx+esi+1D], 4
00535930 . 74 13 je short 00535945
00535932 . 8A17 mov dl, byte ptr [edi]
00535934 . 84D2 test dl, dl
00535936 . 75 04 jnz short 0053593C
00535938 . 33C9 xor ecx, ecx
0053593A . EB 09 jmp short 00535945
0053593C > 33DB xor ebx, ebx
0053593E . 8AF9 mov bh, cl
00535940 . 47 inc edi
00535941 . 8ADA mov bl, dl
00535943 . 8BCB mov ecx, ebx
00535945 > 66:3BC8 cmp cx, ax ; 比较每一位输入的序列号和机器号变幻后数列是否一致
00535948 . 75 0C jnz short 00535956 ; 不相等的话就跳走
0053594A . 66:85C0 test ax, ax ; 相等的话,看看比较完了没有
0053594D .^ 75 A8 jnz short 005358F7 ; 没完下一位
0053594F . 33C0 xor eax, eax ; 全都一致的话,HIAHIA
00535951 > 5B pop ebx ; 这里的代码真乱,跳来跳去的
00535952 . 5F pop edi
00535953 . 5E pop esi
00535954 . 5D pop ebp
00535955 . C3 retn 最后的话:逆向分析很好玩,如果可以的话,下次写一些关于CM的文,希望大家喜欢。