Valve Posted May 1, 2012 Posted May 1, 2012 HL1 Key Algorithm a tutorial example on how to build the algorithm to your hl (half life keygen) in C++ /* The following is the simple algorithm used by Half-Life to know if a CD-Key is valid or not. by Luigi Auriemma e-mail: aluigi@autistici.org web: aluigi.org */ unsigned char cdkey[], /* buffer that contains the Half-life CD-KEY */ /* the key must be 13 bytes long and all the */ /* '-' chars must be removed */ *ptr; // a pointer for faster operations unsigned long eax, edx, edi, i; // counter eax = 3; ptr = cdkey; for(i = 0; i < 12; i++, ptr++) { edi = eax << 1; edx = *ptr - 0x30; // char '0' edx ^= edi; eax += edx; } eax %= 10; eax -= *ptr; if(eax == 0xFFFFFFD0) fputs("CD-Key is OK!\n", stdout); else fputs("CD-Key is invalid\n", stdout); So for those who didn't understood, basically this tutorial is on how to build a hl1 key algorithm to make your hl keygen in C++ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.