You'll have to shred it out of the XML file and provide logic. The file attachment is stored as base64 encoding in the form's XML. You may be able to find examples of how to do this on the MSFT blog.
Patrick Halstead [InfoPath MVP]
InfoPathDev
Patrick Halstead
Project Manager at Qdabra