Why not implement the keygen using public key cryptography? Wouldn't that eliminate the possibility of a reverse-engineered keygen right off?
Just put it on a web page (and in an email, for later use) and have the user copy-paste it. Or even better, do what patio11 is doing: when the user clicks "Buy software" in the app, add a magic number to the URL you send the user to and have the software poll the server to see if the user has paid yet.
Also: poll the clipboard to see if the user has copied a valid serial key, to save the user the hassle of pasting it in the correct input box.