http://www.cc.rim.or.jp/~hiroki/english
- 标 题:谁能破解WingGroov0.9E_E(一个优秀的软波表)下载地址: (41字)
- 作 者:1212
- 链 接:http://bbs.pediy.com
http://www.cc.rim.or.jp/~hiroki/english
注册机为(与用户名无关):
#include <stdio.h>
#include <string.h>
char UserID[16];
char Password[16];
int k;
char sum;
unsigned long ID;
void main(void)
{
//以下未检查输入是否合法
printf("Enter your user ID(3个字母后跟5个数字):");
gets(UserID);
strupr(UserID);
ID = 0;
sum = 0;
for(k = 0; k < 8; k++)
{
sum += UserID[k];
UserID[k] -= '0';
if (UserID[k] > 9)
{
UserID[k] -= 'A'-'0';
}
UserID[k] &= 0x0F;
ID <<= 4;
ID |= UserID[k];
}
ID ^= 0x19670109L; //作者生日?
__asm
{
push eax
push ecx
mov eax, [ID]
mov cl, [sum]
and cl, 0x1F
rol eax, cl //环型移位。虽然用C语句也可以实现
mov [ID], eax
pop ecx
pop eax
}
//以下是显示一个二十六进制数
printf("Your password is: ");
for(k = 0; k < 7; k++)
{
Password[k] = (ID % 26L) + 'A';
ID /= 26L;
}
putchar('Z');
for(k--; k >= 0; k--)
{
putchar(Password[k]);
}
}
把下面对应的代码分析清楚就ok:
1697:01BC PUSH ESI
1697:01BE LES BX,[1248]
1697:01C2 MOV AX,ES
1697:01C4 OR AX,BX
1697:01C6 JZ 0227
1697:01C8 MOV CX,0007
1697:01CB XOR ESI,ESI
1697:01CE MOV EAX,0000001A
1697:01D4 MUL ESI
1697:01D7 XCHG EAX,ESI
1697:01D9 MOV AL,ES:[BX]
1697:01DC SUB AL,41
1697:01DE MOVZX EAX,AL
1697:01E2 ADD ESI,EAX
1697:01E5 INC BX
1697:01E6 LOOP 01CE
1697:01E8 PUSH ESI
1697:01EA LES BX,[124C]
1697:01EE MOV CX,0008
1697:01F1 XOR ESI,ESI
1697:01F4 XOR DL,DL
1697:01F6 MOV AL,ES:[BX]
1697:01F9 ADD DL,AL
1697:01FB SUB AL,30
1697:01FD CMP AL,09
1697:01FF JBE 0205
1697:0201 SUB AL,11
1697:0203 AND AL,0F
1697:0205 SHL ESI,04
1697:0209 XOR AH,AH
1697:020B OR SI,AX
1697:020D INC BX
1697:020E LOOP 01F6
1697:0210 POP EAX
1697:0212 MOV CL,DL
1697:0214 AND CL,1F
1697:0217 ROR EAX,CL
1697:021A XOR EAX,19670109
1697:0220 SUB EAX,ESI
1697:0223 MOV [124C],EAX
1697:0227 XOR EAX,EAX
1697:022A MOV [1248],EAX
1697:022E POP ESI
1697:0230 RETF