Downloading unofficial applications with developer ID signature
I doubt if we support installing such (cracked) software, but I can at least give you the facts as I'm not explaining how to download or modify it to crack it.

If you're talking about an .app which is originally downloaded from the Mac AppStore in this case, I can explain you the following details:


Apps like this have their own sandbox (this is the same on iOS) and they cannot perform any action outside it. (Without a jailbreak for example on iOS or installer on OS X) - this counts for all apps in the App Stores since 2012.
If the .plist file or some relevant information in the View Package Contents is edited, so the sandbox thinks you're the original owner - you can run it.


The application cannot get out of the sandbox as explained, thus cannot ruin your Mac - unless you have to give it administrator privileges by a prompt.