#include <stdio.h>
#define bswap_32(x) \
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
char name[25]= {0};
unsigned int hash;
int i,namelen,temp1,temp2,temp3,temp4,temp5,temp6,temp7,temp8, \
temp9,temp10,temp11,temp12,temp13,temp14,temp15,temp16,temp17, \
temp18,temp19,temp20;
int main ()
{
printf("kami13x keygen name hash craeator\n"

;
scanf("%[a-zA-Z0-9]%n",&name,&namelen);
if(namelen<5)
{
printf("you need a bigger name\n"

;
}
else
{
for(i=4;i<namelen;i++)
{
hash += (unsigned int)name[I];
}
printf("the hash is %x\n",hash);
temp1 = hash << 8;
printf("the hash is %x\n",temp1);
temp1 = temp1 | hash;
printf("the hash is %x\n",temp1);
temp2 = temp1 << 16;
printf("the hash is %x\n",temp2);
temp2 = temp2 | temp1;
printf("the hash is %x\n",temp2);
for(i=3;i>0;i--)
{
temp3 = temp3 | name[I];
temp3 = temp3 << 8;
}
temp3 = temp3 | name[0];
printf("the hash is %x\n",temp3);
temp4 = temp3 ^ temp2;
printf("the hash is %x\n",temp4);
temp5 = bswap_32(temp4);
printf("the hash is %x\n",temp5);
temp5 = temp5 + 0x3022006;
printf("the hash is %x\n",temp5);
temp6 = bswap_32(temp5);
printf("the hash is %x\n",temp6);
temp6 = temp6 - 0xdeadc0de;
printf("the hash is %x\n",temp6);
temp7 = bswap_32(temp6);
printf("the hash is %x\n",temp7);
temp7 = temp7 + 0x00000101;
printf("the hash is %x\n",temp7);
temp8 = bswap_32(temp7);
printf("the hash is %x\n",temp8);
temp8 = temp8 - 0x00000101;
printf("the hash is %x\n",temp8);
temp9 = bswap_32(temp8);
printf("the hash is %x\n",temp9);
temp9 = temp9 ^ 0xedb88320;
printf("the hash is %x\n",temp9);
temp10 = bswap_32(temp9);
printf("the hash is %x\n",temp10);
temp10 = temp10 + 0xd76aa478;
printf("the hash is %x\n",temp10);
temp11 = bswap_32(temp10);
printf("the hash is %x\n",temp11);
temp11 = temp11 - 0xb00bface;
printf("the hash is %x\n",temp11);
temp12 = bswap_32(temp11);
printf("the hash is %x\n",temp12);
temp12 = temp12 + 0x0badbeef;
printf("the hash is %x\n",temp12);
temp13 = bswap_32(temp12);
printf("the hash is %x\n",temp13);
temp13 = temp13 +1;
printf("the hash is %x\n",temp13);
temp14 = bswap_32(temp13);
printf("the hash is %x\n",temp14);
temp14 = temp14 -1;
printf("the hash is %x\n",temp14);
temp15 = bswap_32(temp14);
printf("the hash is %x\n",temp15);
temp15 = temp15 + temp3;
printf("the hash is %x\n",temp15);
temp16 = bswap_32(temp15);
printf("the hash is %x\n",temp16);
temp16 = temp16 + 1;
printf("the hash is %x\n",temp16);
temp17 = bswap_32(temp16);
printf("the hash is %x\n",temp17);
temp17 = temp17 + 1;
printf("the hash is %x\n",temp17);
temp18 = bswap_32(temp17);
printf("the final hash is %x\n",temp18);
}
return 1;
}