The png images in the ipa package are compiled into CgBI format using pngcrush. So the images that you pirated may malfunction in your app, and you need to convert them back to original png format using xcrun -sdk iphoneos pngcrush -revert-iphone-optimizations.
please refer to here
The ipa downloaded from iTunes is located in ~/Music/iTunes/iTunes Media/Mobile Applications and can be installed using ideviceinstaller.