#include #include long int EBP,ECX; unsigned char Offset; char Name[20]; void PartOne( void ) { EBP = 0x6B; for( Offset = 0 ; Offset <= strlen( Name ) ; Offset ++ ) { ECX = (int)Name[Offset]; EBP -= ECX; ECX = ECX*2+ECX; EBP = ECX*8+EBP; } printf( "%ld",EBP ); } void PartTwo( void ) { long int EDX; for( Offset = 0 ; Offset <= strlen( Name ) ; Offset ++ ) { ECX = (int)Name[Offset]; EDX = ECX; ECX = ECX*8+ECX; ECX = ECX*4+ECX; EDX = ECX*2+EDX; EBP = EDX*2+EBP; } printf( "-%ld",EBP ); } void PartThree( void ) { ECX = (int)Name[strlen(Name)-1]; EBP = ECX*4+ECX+0x85E; printf( "-%ld",EBP ); } void PartFour( void ) { long int EDX; ECX = (int)Name[strlen(Name)-1]; EDX = ECX*4+ECX; EBP = EDX*2+0x9A; printf( "-%ld\n",EBP ); } void main( void ) { printf( "\nDirectNet v1.1 -- KeyGen\nBy CoRN2 [mE'98/C4N]\nhttp://mex98.home.ml.org\n" ); printf( "\nName: " ); gets( Name ); printf( "S/N : " ); PartOne(); PartTwo(); PartThree(); PartFour(); }