#include int main() { unsigned char name[80], ch; int i, len; short int wkey = 0x3a97; long lkey = 0x29a; printf("PC Baby v5.0 Registration Key generator\n"); printf("Enter the name that will appear on your registration\n>"); gets(name); len = strlen(name); for (i=0; i < len; i++) { ch = name[i] ^ (wkey >> 8); wkey += ch; wkey = wkey * 0xce6d + 0x58bf; lkey += ch * (i + 1); } printf("\nName\t\t : %s\n", name); printf("Registration Code : %d\n", lkey); printf("\nEnter the above information into your PC Baby 98 Registration\n"); printf("dialog located in 'Help' menu.\n"); printf("NOTE: the name is case-sensitive\n"); return 0; }