Is it possible and how to grab that information about profile just from existing *.ipa file?
Something like the following dumps an xml version of the provisioning profile:
unzip -p .ipa Payload/.app/embedded.mobileprovision | security cms -D
Replace and accordingly. If you don't know what should be, try:
unzip -l .ipa | grep mobileprovision