Forgot your password?
typodupeerror
Apple

Journal: PlayerPro registration code generator

Journal by woggo
/* ***************
The source for PlayerPro was released, but you still need a registration code to run the binary.  For those of you who are too lazy to do so yourselves, here's a C program that generated a working registration code for me, mostly ripped from Registration.c in the PlayerPro source.  (however, there are definitions for some lingering Carbon-isms)

I didn't feel like figuring out what the second parameter to the code generation routine is for, because "37", the first thing I tried, worked.

If you're really lazy, just try this code, which "worked for me":  CID4PQXPSQXTTYRR

* ***************/

#include <stdlib.h>
#include <stdio.h>

typedef char Str255[256];
typedef char Str32[33];
typedef char* Ptr;

void pStrcpy(char* dest, char* src) {
    strcpy(dest+1, src);
}

void NumToString(int num, char* dest) {
    sprintf(dest+1, "%d", num);
}

void GenerateCodeNewID( Str255 strID, long num)
{
    Str32    tStr;
    Str32    Div19;
    long    microVal, i, tt;

    pStrcpy( strID, "CID4TTTTTTTTTTTTTTTTTTTTT");

    strID[ 0] = 4 + 6 + 5;

    tt = num * 13;

    sprintf( (Ptr) Div19, "%6ld", tt);
    for( i = 0; i < 6; i++) if( Div19[ i] == ' ') Div19[ i] = '0';

    Div19[ 0] = (Div19[ 0] - 0x30) + 0x51;
    Div19[ 1] = (Div19[ 1] - 0x30) + 0x50;
    Div19[ 2] = (Div19[ 2] - 0x30) + 0x51;
    Div19[ 3] = (Div19[ 3] - 0x30) + 0x50;
    Div19[ 4] = (Div19[ 4] - 0x30) + 0x51;
    Div19[ 5] = (Div19[ 5] - 0x30) + 0x51;

    microVal = tt & 0x0000000F;

    tt = 0x38;
    tt *= 0x21;

    NumToString( tt, tStr);

    tStr[ 0] = (tStr[ 1] - 0x30) + 0x50 - microVal;
    tStr[ 1] = (tStr[ 2] - 0x30) + 0x51 - microVal;
    tStr[ 2] = (tStr[ 3] - 0x30) + 0x50 - microVal;
    tStr[ 3] = (tStr[ 4] - 0x30) + 0x51 - microVal;

    for( i = 0; i < 4; i++) strID[ 5 + i*2] = tStr[ i];
    for( i = 0; i < 6; i++) strID[ 6 + i*2] = Div19[ i];
        strID[ 6 + 9] = Div19[ 5];
}

int main(int c, char *v[]) {
    Str255 foo;

    GenerateCodeNewID(foo,37);

    foo[16] = 0;

    printf("%s\n", foo+1);
}

You have a tendency to feel you are superior to most computers.

Working...