Shine PSP Video Converter 4.00.817的算法分析

Shine PSP Video Converter是一款优秀的视频转换软件,帮助你转换你喜爱的影片格式,如AVI, MPEG, WMV, DivX, MOV, RM, VCD, 3GP……

软件的下载地址见:[url=http://www.newhua.com/soft/77822.htm][color=#FF0000]http://www.newhua.com/soft/77822.htm[/color][/url]

一组可用的注册码:
你的用户名是:[color=#0000FF]VS88T6-Vs86[/color]
你的注册码是:[color=#0000FF]134202116[/color]

004C8ADC   |.  68 04010000          push 104                             ; /BufSize = 104 (260.)
004C8AE1   |.  8D85 F7FEFFFF        lea eax,dword ptr ss:[ebp-109]       ; |
004C8AE7   |.  50                   push eax                             ; |Buffer
004C8AE8   |.  E8 0FE4F3FF          call <jmp.&kernel32.GetSystemDirecto>; \GetSystemDirectoryA
004C8AED   |.  8D45 FC              lea eax,dword ptr ss:[ebp-4]         ;  获取系统路径
004C8AF0   |.  8D95 F7FEFFFF        lea edx,dword ptr ss:[ebp-109]
004C8AF6   |.  B9 05010000          mov ecx,105
004C8AFB   |.  E8 E8BEF3FF          call PSP_Vide.004049E8
004C8B00   |.  8D45 FC              lea eax,dword ptr ss:[ebp-4]
004C8B03   |.  BA FC8B4C00          mov edx,PSP_Vide.004C8BFC            ;  ASCII "\softinfo.dat"
004C8B08   |.  E8 33BFF3FF          call PSP_Vide.00404A40
004C8B0D   |.  8B45 FC              mov eax,dword ptr ss:[ebp-4]
004C8B10   |.  E8 6F09F4FF          call PSP_Vide.00409484               ;  在系统下查找softinfo.dat文件
004C8B15   |.  84C0                 test al,al
004C8B17   |.  74 18                je short PSP_Vide.004C8B31           ;  没有找到则弹出提示窗口

004A549F   |> /8B45 F8              /mov eax,dword ptr ss:[ebp-8]
004A54A2   |. |8B16                 |mov edx,dword ptr ds:[esi]
004A54A4   |. |E8 DBF6F5FF          |call PSP_Vide.00404B84              ;  比较用户名,只能是ESI指向的字符串数组中的一个
004A54A9   |. |75 09                |jnz short PSP_Vide.004A54B4         ;  否则提示错误
004A54AB   |. |C605 C44D4D00 00     |mov byte ptr ds:[4D4DC4],0
004A54B2   |. |EB 06                |jmp short PSP_Vide.004A54BA
004A54B4   |> |83C6 04              |add esi,4
004A54B7   |. |4B                   |dec ebx
004A54B8   |.^\75 E5                \jnz short PSP_Vide.004A549F
004A54BA   |>  803D C44D4D00 00     cmp byte ptr ds:[4D4DC4],0
004A54C1   |.  74 1A                je short PSP_Vide.004A54DD
004A54C3   |.  6A 00                push 0                               ; /Arg1 = 00000000
004A54C5   |.  66:8B0D B0564A00     mov cx,word ptr ds:[4A56B0]          ; |
004A54CC   |.  B2 02                mov dl,2                             ; |
004A54CE   |.  B8 BC564A00          mov eax,PSP_Vide.004A56BC            ; |ASCII "Invalid register code! Please retry!"
004A54D3   |.  E8 0410F9FF          call PSP_Vide.004364DC               ; \PSP_Vide.004364DC
004A54D8   |.  E9 85010000          jmp PSP_Vide.004A5662

Esi指向的数据摘录如下:


004D29F8  004A4B50  ASCII "VS88T6-Vs86"
004D29FC  004A4B64  ASCII "TV66P6-TV66"
004D2A00  004A4B78  ASCII "S1R6P6-SV66"
004D2A04  004A4B8C  ASCII "TDR6p6-SV66"
004D2A08  004A4BA0  ASCII "TDR6p6-EVS"
004D2A0C  004A4BB4  ASCII "TDR6p6-ST1"
004D2A10  004A4BC8  ASCII "Tsf6p6-VB1"
004D2A14  004A4BDC  ASCII "B8sf6p6-VB1"
004D2A18  004A4BF0  ASCII "B8TDf6p6-VB1"
004D2A1C  004A4C08  ASCII "BS45f6p6-VB1"
004D2A20  004A4C20  ASCII "Osrf6p6-VB1"
004D2A24  004A4C34  ASCII "Ofrg6p6-VB1"
004D2A28  004A4C48  ASCII "ESrg6p6-VB1"
004D2A2C  004A4C5C  ASCII "IUrg6p6-VB1"
004D2A30  004A4C70  ASCII "IUDT6-BX1"
004D2A34  004A4C84  ASCII "DUIT6-tV1"
004D2A38  004A4C98  ASCII "S1IT6-DV1"
004D2A3C  004A4CAC  ASCII "SNMS6-DV1"
004D2A40  004A4CC0  ASCII "SNWS6-TN1"
004D2A44  004A4CD4  ASCII "SNWS6-MN3"
004D2A48  004A4CE8  ASCII "TDVS6-MN3"

004A5534   |> /8B4D F4              /mov ecx,dword ptr ss:[ebp-C]
004A5537   |. |0FB64C11 FF          |movzx ecx,byte ptr ds:[ecx+edx-1]
004A553C   |. |83F9 30              |cmp ecx,30
004A553F   |. |7C 05                |jl short PSP_Vide.004A5546
004A5541   |. |83F9 39              |cmp ecx,39
004A5544   |. |7E 1A                |jle short PSP_Vide.004A5560
004A5546   |> |6A 00                |push 0                              ; /Arg1 = 00000000
004A5548   |. |66:8B0D B0564A00     |mov cx,word ptr ds:[4A56B0]         ; |
004A554F   |. |B2 02                |mov dl,2                            ; |
004A5551   |. |B8 BC564A00          |mov eax,PSP_Vide.004A56BC           ; |ASCII "Invalid register code! Please retry!"
004A5556   |. |E8 810FF9FF          |call PSP_Vide.004364DC              ; \PSP_Vide.004364DC
004A555B   |. |E9 02010000          |jmp PSP_Vide.004A5662
004A5560   |> |42                   |inc edx
004A5561   |. |48                   |dec eax
004A5562   |.^\75 D0                \jnz short PSP_Vide.004A5534         ;  按位比较注册码,必须是9>=RegCode[i]>=0
004A5564   |>  33F6                 xor esi,esi                          ;  即,必须是数字


004A5577   |> /8B55 F8              /mov edx,dword ptr ss:[ebp-8]
004A557A   |. |0FB6541A FF          |movzx edx,byte ptr ds:[edx+ebx-1]
004A557F   |. |03F2                 |add esi,edx
004A5581   |. |43                   |inc ebx
004A5582   |. |48                   |dec eax
004A5583   |.^\75 F2                \jnz short PSP_Vide.004A5577         ;  求用户名ASCII值的累加和,并保存到ESI,记为nSumName


004A559C   |.  E8 DBF7F5FF          call PSP_Vide.00404D7C
004A55A1   |.  85C0                 test eax,eax
004A55A3   |.  75 27                jnz short PSP_Vide.004A55CC
004A55A5   |.  8B15 A0314D00        mov edx,dword ptr ds:[4D31A0]        ;  PSP_Vide.004D4E70
004A55AB   |.  8B12                 mov edx,dword ptr ds:[edx]
004A55AD   |.  8B45 FC              mov eax,dword ptr ss:[ebp-4]
004A55B0   |.  E8 3FF7FFFF          call PSP_Vide.004A4CF4                        ;返回值EAX
004A55B5   |.  8B0485 AC2A4D00      mov eax,dword ptr ds:[eax*4+4D2AAC]  ;  以EAX为索引,从4D2AAC指向的数组里取值
                   ;  (*4,是因为整数里的元素是4字节长)
004A55BC   |.  F7EE                 imul esi                             ;  然后*nSumName
004A55BE   |.  83C0 20              add eax,20                           ;  +0x20
004A55C1   |.  D1F8                 sar eax,1                            ;  >>1
004A55C3   |.  79 03                jns short PSP_Vide.004A55C8
004A55C5   |.  83D0 00              adc eax,0
004A55C8   |>  8BF0                 mov esi,eax                          ;  保存结果到ESI
004A55CA   |.  EB 25                jmp short PSP_Vide.004A55F1
004A55CC   |>  8B15 A0314D00        mov edx,dword ptr ds:[4D31A0]        ;  PSP_Vide.004D4E70
004A55D2   |.  8B12                 mov edx,dword ptr ds:[edx]
004A55D4   |.  8B45 FC              mov eax,dword ptr ss:[ebp-4]
004A55D7   |.  E8 18F7FFFF          call PSP_Vide.004A4CF4
004A55DC   |.  8B0485 482A4D00      mov eax,dword ptr ds:[eax*4+4D2A48]
004A55E3   |.  F7EE                 imul esi
004A55E5   |.  83C0 20              add eax,20
004A55E8   |.  D1F8                 sar eax,1
004A55EA   |.  79 03                jns short PSP_Vide.004A55EF
004A55EC   |.  83D0 00              adc eax,0
004A55EF   |>  8BF0                 mov esi,eax
004A55F1   |>  8B45 F4              mov eax,dword ptr ss:[ebp-C]
004A55F4   |.  E8 7B3AF6FF          call PSP_Vide.00409074
004A55F9   |.  3BF0                 cmp esi,eax
004A55FB   |.  75 50                jnz short PSP_Vide.004A564D

这里有两种计算方式,其区别仅在于数组的起始地址不同:
1\一个是从4D2A48开始
2\一个是从4D2AAC开始

其判断依据是主程序名里,是否含有”eztoo”字符串,有则从4D2A48开始索引
完整的数组如下:


//004D2A48  004A4CE8  ASCII "TDVS6-MN3"
004D2A4C  000DB0D2
004D2A50  000549AF
004D2A54  000F0188
004D2A58  000D6CCF
004D2A5C  000EDDF4
004D2A60  0003BF80
004D2A64  000715C6
004D2A68  000DA20D
004D2A6C  000548D4
004D2A70  000548D4
004D2A74  000548D4
004D2A78  0006994F
004D2A7C  000544ED
004D2A80  000B7F7E
004D2A84  00040886
004D2A88  00069A21
004D2A8C  0006C380
004D2A90  00058AEE
004D2A94  000B8442
004D2A98  000D0D8A
004D2A9C  00074129
004D2AA0  00041A91
004D2AA4  000A857C
004D2AA8  0003987B
004D2AAC  000D349B
004D2AB0  000DB0D6
004D2AB4  000549B4
004D2AB8  000F018E
004D2ABC  000D6CD4
004D2AC0  000EDDF8
004D2AC4  0003BF86
004D2AC8  000715C8
004D2ACC  000DA212
004D2AD0  000548D8
004D2AD4  000548D8
004D2AD8  000548D8
004D2ADC  00069954
004D2AE0  000544F0
004D2AE4  000B7F82
004D2AE8  00040888
004D2AEC  00069A26
004D2AF0  0006C384
004D2AF4  00058AF0
004D2AF8  000B8446
004D2AFC  000D0D8E
004D2B00  0007412E
004D2B04  00041A94
004D2B08  000A8582
004D2B0C  00039880
004D2B10  000D349E

待续^^^^

发表评论