好有趣呀:
传说中的算法:
00401059 /$ 55 push ebp
0040105A |. 8BEC mov ebp, esp
0040105C |. 83C4 F8 add esp, -8
0040105F |. B8 1B114000 mov eax, Butland'.0040111B
00401064 |. 50 push eax
00401065 |. E8 BA010000 call <jmp.&kernel32.SetUnhandledExce>
0040106A |. BA 8E104000 mov edx, Butland'.0040108E ; edx := 40108E;
0040106F |. B8 1B114000 mov eax, Butland'.0040111B ; eax := 40111B
00401074 |. 2BC2 sub eax, edx ; eax := eax - edx := $8D;
00401076 |. 8BC8 mov ecx, eax ; ecx := eax = $8D;
00401078 |. 33F6 xor esi, esi ; esi清零
0040107A |. 8B7D 08 mov edi, [arg.1] ; 注册名地址送edi
0040107D |> 8A86 8E104000 /mov al, byte ptr ds:[esi+40108E]
00401083 |. 3207 |xor al, byte ptr ds:[edi]
00401085 |. 8886 8E104000 |mov byte ptr ds:[esi+40108E], al
0040108B |. 46 |inc esi ; 依次累加
0040108C |.^ E2 EF \loopd short Butland'.0040107D ; 循环
0040108E |. FF75 08 push [arg.1] ; 压入注册名
00401091 |. E8 94010000 call <jmp.&kernel32.lstrlenA> ; 得到注册名长度
00401096 |. 8BC8 mov ecx, eax
00401098 |. 83F9 06 cmp ecx, 6 ; 与6比较
0040109B |. 75 7E jnz short Butland'.0040111B ; 不等,跳走,失败
0040109D |. FF75 0C push [arg.2] ; 压入注册码
004010A0 |. E8 85010000 call <jmp.&kernel32.lstrlenA> ; 得到注册码的长度
004010A5 |. 8BC8 mov ecx, eax
004010A7 |. 83F9 06 cmp ecx, 6 ; 与6比较
004010AA |. 75 6F jnz short Butland'.0040111B ; 不等,跳走,失败
004010AC |. 8B75 08 mov esi, [arg.1] ; 注册名
004010AF |. B9 04000000 mov ecx, 4 ; ecx = 4
004010B4 |. 33FF xor edi, edi
004010B6 |> 8A06 /mov al, byte ptr ds:[esi] ; 注册名奇数位的字符 -> al
004010B8 |. 8A5E 01 |mov bl, byte ptr ds:[esi+1] ; 注册名偶数位的字符 -> bl
004010BB |. 32C3 |xor al, bl ; al = al 异或 bl
004010BD |. 3E:88443D F8 |mov byte ptr ds:[ebp+edi-8], al ; 字节 结果依次放入
004010C2 |. 83C6 02 |add esi, 2
004010C5 |. 47 |inc edi
004010C6 |.^ E2 EE \loopd short Butland'.004010B6
004010C8 |. 8B75 0C mov esi, [arg.2] ; 注册码
004010CB |. B9 04000000 mov ecx, 4 ; ecx = 4
004010D0 |. 33FF xor edi, edi
004010D2 |> 8A06 /mov al, byte ptr ds:[esi] ; 注册码奇数位的字符 -> al
004010D4 |. 8A5E 01 |mov bl, byte ptr ds:[esi+1] ; 注册码偶数位的字符 -> bl
004010D7 |. 32C3 |xor al, bl ; al = al 异或 bl
004010D9 |. 3E:88443D FC |mov byte ptr ds:[ebp+edi-4], al ; 字节 结果依次放入
004010DE |. 83C6 02 |add esi, 2
004010E1 |. 47 |inc edi
004010E2 |.^ E2 EE \loopd short Butland'.004010D2
004010E4 |. B9 03000000 mov ecx, 3 ; ecx = 3
004010E9 |. 33FF xor edi, edi
004010EB |> 36:8A442F F8 /mov al, byte ptr ss:[edi+ebp-8] ; 依次取 注册名 的运算结果
004010F0 |. 36:8A5C2F FC |mov bl, byte ptr ss:[edi+ebp-4] ; 依次取 注册码 的运算结果
004010F5 |. 32C3 |xor al, bl ; al = al 异或 bl
004010F7 |. 88442F F8 |mov byte ptr ds:[edi+ebp-8], al ; 结果依次重写回 注册名 的结果处
004010FB |. 47 |inc edi
004010FC |.^ E2 ED \loopd short Butland'.004010EB
004010FE |. 8B45 F8 mov eax, [local.2] ; eax = 上面的结果
00401101 |. 2D 0E151C00 sub eax, 1C150E ; eax = eax - $1C150E;
00401106 |. 75 13 jnz short Butland'.0040111B ; 不为0,跳走,失败
00401108 |. 6A 00 push 0 ; /Style = MB_OK|MB_APPLMODAL
0040110A |. 68 15304000 push Butland'.00403015 ; |祝贺你!
0040110F |. 68 15304000 push Butland'.00403015 ; |祝贺你!
00401114 |. 6A 00 push 0 ; |hOwner = NULL
00401116 |. E8 27010000 call <jmp.&user32.MessageBoxA> ; \MessageBoxA
0040111B |> C9 leave
0040111C \. C2 0800 retn 8 ; 结束本子程序