r1(void);
unsigned char Buff[18];
unsigned int keyrom;
unsigned int sum,sumi,sumj;
unsigned int far *pt=
(unsigned int far *)0xf000fff6L;
unsigned int i=0,j=0,m;
unsigned char p;
unsigned int nn,nn1,nn2;
unsigned char rbuff[100],cc,cc1,cc2;
int fp;
void main(int argc,char *argv)
{ if((argc>3)||((argc==2)&&(argv!='':''))){
printf("USAGE:READKEY 程序路径及名称.\n");
scanf("%s",rbuff); //手工输入加密密钥
printf("sss:%s,%u\n",rbuff,strlen(rbuff));
j=strlen(rbuff);
if(j!=20) exit(1);
for(i=0;i<20;i++){
if((rbuff[i]>=''a'')&&(rbuff[i]<=''f'')) rbuff[i]&=0xdf;
if((rbuff[i]>=''A'')&&(rbuff[i]<=''F'')) rbuff[i]-=0x37;
else if((rbuff[i]>=''0'')&&(rbuff[i]<=''9'')) rbuff[i]-=0x30;
else exit(1);
}
printf("num:");
for(i=0;i<5;i++){
cc1=rbuff[i*4]&0xf;
cc2=rbuff[i*4+1]&0xf;
cc=(cc1<<4)|cc2;
nn1=(unsigned int)cc;
cc1=rbuff[i*4+2]&0xf;
cc2=rbuff[i*4+3]&0xf;
cc=(cc1<<4)|cc2;
nn2=(unsigned int)cc;
nn=(nn1<<8)|nn2;
keyrom[i]=nn;
printf("%04x",keyrom[i]);
}
printf("\n");
sum=0x2020;
for(sumj=0;sumj<4;sumj++){ //形成16位密钥
for(sumi=0;sumi<5;sumi++)
sum-=keyrom[sumi]; //形成解密密钥
sum^=0x0404< sprintf(Buff+4*sumj,"%04x",sum);
}
printf(Buff);
exit(1);
}
if(argc>1){
strlwr(argv);
&n