anchor.diff:  using namespace std;
   
   int main(int argc, char *argv[]) {
  -	char name[100];
  -	double serial_number;
  +    char name[100];
  +    double serial_number;
   	
  -	cout << "name: ";
  +    cout << "name: ";
       cin >> setw(sizeof name) >> name;
   	
  -	serial_number = (long double)(-880 * (554445 * strlen(name) / 0x64));
  +    serial_number = (long double)(-880 * (554445 * strlen(name) / 0x64));
   	
  -	printf("%i-x019871\n", serial_number);
  -	//cout << "Hellow world" << endl;
  +    printf("%i-x019871\n", serial_number);
  +    //cout << "Hellow world" << endl;
   	
  -	system("pause");
  -	return 0;
  +    system("pause");
  +    return 0;
   }
  -...+....
positive.code: mov     [ebp+var_414], eax
  cmp     [ebp+var_414], 0
  jz      short loc_401719
  ...
  
  Putting that all together we get the following equation:
  ...
  int2str(((((strlen(name) * 554445) * 1374389535 ) /(2**32)) /32 ) * -880) + "-x019871"
  ...
  A bit of maths...
  
  ...
  1374389535/(2**32)/32
  =1/100
  ...
  can simplify the equation into: 
  
  ...
  ((strlen(name) * 554445  / 100) * -880)
  ...
  And there's our keygen algorithem. We could just get the output of sprintf or type up a keygen in our language of choosing.
  
  ...
  #include <iostream>
  #include <iomanip>
  #include <stdlib.h>
  
negative.code: lea     eax, [ebp+var_308]
  mov     [esp], eax      ; char *
  call    _sprintf
  ....
  
  ....
  lea     eax, [ebp+var_308]
  mov     [esp+4], eax    ; char *
  lea     eax, [ebp+szSerial]
  