帖这个的注册机,嵌入了一点汇编(没有办法的)不知道这个在TC下能否成功,在VC下这个是可以的 (1千字)
#include "stdio.h"#include "string.h"
#define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
void main()
{FILE *p=fopen("sn.txt","wt");
unsigned char string[80];
int i,d,c;
int tb1[16]={0x12,0x5c,0x34,0x22,0xab,0x9d,0x54,0x00,0xdd,0x84,0xae,0x66,0x31,0x78,0x73,0xcf};
unsigned tb2[18];
char key[18]="KEYGENNING4NEWBIES";
unsigned long f=0,e=0x68656865;
printf("*********KEYGENME #3*********\nThis keygen is made by Pretender\nPlease input your name : ");
gets(string);
fputs("Name : ",p);
fputs(string,p);
fputc('\015',p);
fputc('\012',p);
fputs("SN : ",p);
printf("Your Register code is : ");
strcat(string," is a whore.");
d=strlen(string);
if(d%4!=0)
{for(i=d;i<d+4-d%4;i++)
string[i]='\0';
d=i;}
for(i=0;i<16;i++)
{if(i*4<d)
f=string[i*4]+string[i*4+1]*256+string[i*4+2]*65536+string[i*4+3]*256*65536;
else f=0;
c=tb1[i]^i;
f+=c;
f=ROTATE(f,7);
e^=f;}
for(i=0;i<18;i++)
{
tb2[i]=e%26;
tb2[i]+=65;
__asm {mov eax,e
shl eax,3
mov edx,0x12345
imul eax
add eax,edx
mov e,eax
}
}
for(i=0;i<18;i++)
{c=key[i];
tb2[i]^=i;
c^=tb2[i];
c+=0x30;
printf("%c",c);
fputc(c,p);
}
printf("\nYou can get the code in sn.txt");
printf("\n ***************************** --- --- ---\n *Welcome to WWW.CRACKNOW.COM* / / / --\n ***************************** --- --- --/\n");
}
