The polygon footprint data in the ISIS cube file hirise40.cal.map.cub is stored as ASCII text in WKT (Well-Known Text) format, not as binary data.
The example cube file hirise40.cal.map.cub was created from the following HiRISE data processing pipeline: