There is no way to tell who purchased an app legitimately. Apple does not share this information with developers.
Well, if Apple would help, they certainly could... I'm sure any iOS app has the same kind of App Store receipt that Mac App Store apps have (Contents/_MASReceipt/receipt)... This info is private to Apple for a variety of things (probably App Store version checks for updates, machine authorization, account verification, verifying a match of other data inside it with what Apple has on record, etc...)...
If it gets removed before being distributed to hide the ID of who originally purchased it, then the developer simply tests for the presence of that file... Not there? Don't run... Is there? Well... If Apple would allow it (with their very strict app rules) you could run an MD5 hash on that file and have the hash string sent along with the check-in to the game server. It doesn't give the developer any privacy info about the user, just that a copy of that .ipsw was loaded. If you're seeing a few copies hit the server then that's fine... Shared apps with family members / multiple iOS devices in the family can account for that... If you start seeing dozens / hundreds / thousands of that hash show up, then you disable it. No private info being sent to the server / developer.
And, Apple could provide, in the OS, a method for the developer to simply ask the OS if this is a legit receipt in the first place so people don't just put some junk file there in order to not leave the filepath empty.