// AIM Keys v2.01 KEYGENERATOR
// 122299 a cold december day..

#include <string.h>
main(void) {

  char name[30];
  int eax=0, ebp=0, ebx=1, ecx=0, edx=0;
  int edi=0, i, tot=0, counter=0;
  int flag=0;
                       
  printf("AIM Keys v2.01 KEYGENERATOR\n");
  printf("coded by metaray 122299, a cold december day\n");
  printf("\t F O R C E\n");
  printf("Enter Name: [min 5] \n");
  gets(name);

  counter = strlen(name);


  for (i = 0; i<counter; i++) {
    if (name[i] < 0x61 || name[i] > 0x7a) {
      i++;
    }
    ecx = tolower(name[i]);
     
    
    
   

    eax = ebx;
    edi = 3;
    edx = 0;
    edx = eax % edi;
    eax = eax / edi;
    printf("before major cals: eax:%d:edx:%d:edi:%d\n", eax, edx, edi);
    edx++;
    edx = edx * ecx;
    ebp = ebp + edx;
    edx = ebx;
    flag = edx % 2;
    printf("flag %d\n", flag);
      if (flag == 0) {
        edx =0;
        flag= 0;
        printf("edx set to 0");
      }
  else {
    edx =1;
    flag =0;
    printf("edx set to 1");
  }
  edx++;
  edx = ecx * edx;
  ecx = tot; // ebp+10
  ecx = ecx + edx;

  tot = ecx;
  ebx++;

  printf("ecx:%x:eax:%d:edi:%d:ebx:%d:edx:%x:tot:%x:ebp:%x\n",ecx, eax, edi, ebx, edx, tot, ebp);

 }
  eax = tot;
  printf("eax = tot %d", eax);
  ebp = ebp + 52;
  printf("ebp + 13 = %d", ebp);

  ecx = eax + 19;
  printf("ecx = eax + 13 = %d\n", ecx);
  eax = 5;
  ecx = ecx * eax;
  ebp = ebp * eax;

  printf("Your Registration Code is %d%d\n",ebp,ecx);

}

