The Art of Keygens

December 7, 2008 – 8:30 pm

If you ever used pirated software, you had probably used a keygen at some point. It could have also been a patcher, or a cracked installer, and sometimes even a trainer. Many times, these pieces of software are more than just a standard form with two text boxes.

Here are some examples:

What drew me into researching this topic, and writing this post, is not the visual presentation (which can sometimes include stunning effects), but rather the great music that accompanies many keygens.

It seems like keygen music dates back to Cracktros ( Wikipedia ) which were audio-visual intro, added to cracked software by release groups. This, in time, have spawned the Demoscene( Wikipedia ) whose members are focused on pushing the envelope of real-time computer generated “demos” ( = audio-visual presentations ) , many times within a tight code size limit. There are really impressive demos out there, and it seems like an area I’d like to explore more in the future.

Back to keygens. So, as a relic of those Cracktros, modern keygens feature great tunes, many reminiscent of old game console. There’s actually a website dedicated to ripping and archiving keygen music – KEYGENMUSiC. I have decided to find out how those tunes are created and embedded in the EXEs.

My research has brought me to MadTracker a modern music composition (or rather “Tracking”) tool, based on an older DOS application called FastTracker(Wikipedia). It seems like the most common format for Tracker music is XM, so I decided to use that format too. This format contains both samples (of the instruments you use for your track) and note information (how to sequence those samples). There’s also support for some effects, but I didn’t get to those.

Here’s my very first XM track, composed in MadTracker using the bundled samples – first

The next step was embedding it in a small application. For this purpose, I had found the uFMOD library, which is a tiny library for playing XM and other formats. uFMOD comes bundled with many helpful code samples for different programming languages. I chose to use C.

Rather then try to explain how to use uFMOD, I refer you to those samples, as you can learn off them to a greater extent than my knowledge. I will, however, provide you with a minimal example of uFMOD usage, with first.xm embedded in it.

The method that I had chosen for embedding the track was as a resource ( defined in a .rc file ). uFMOD comes with an utility called Eff, which can create an rc formatted hex dump of your XM file, when passed /Ds as an argument.

Here’s my sample, with a Visual Studio 2005 Express solution – minimal

I hope you enjoyed this quick intro. It really is very simple to create and embed keygen music. If you happen to compose any tracks, please post them in the comments section!

I may post a follow-up in the future about how to create the custom shaped forms seen in the above examples.

  1. 3 Responses to “The Art of Keygens”

  2. ha ha
    I could relate to the beginning of the post, but I think I’ve never stumbled upon a keygen with music. But the idea, this challenge of making visual/audio intro with a minimal storage use is quite interesting, from a programming point of view. or so I think. I’m not programming myself, so I couldn’t tell. But it does seem like an art-form, with it’s own boundaries and conventions.

    cool music, btw.

    Mark.

    By Mark on Dec 9, 2008

  3. Thanks! Your example had great music, and the keys it generates works with almost all my pirated software.

    By UL-Tomten on Feb 9, 2009

  4. I don’t ‘like’ keygen music, but I do admire it. I like how they make it so loud you’re kind of punished for using it. Many a time, at 3am, i’ve forgotten to turn my speakers off and blasted ‘blEeEeEeEp BloOoOooOp’ through them.

    There’s a new duo called Crystal Castles with keygen sounding music. I like to call their style ‘Keygen Punk’. That music I do love.

    By Grass on May 14, 2009

Post a Comment