//------------------------------------------------ //--- 010 Editor v11.0.1 Binary Template // // File: qcow.bt // Authors: Natalia Portillo // Version: // Purpose: // Category: // File Mask: *.qcow // ID Bytes: 51 46 49 FB // History: //------------------------------------------------ #define QCOW_MAGIC 0x514649FB typedef struct { /// /// /// uint magic; /// Must be 1 uint version; /// Offset inside file to string containing backing file uint64 backing_file_offset; /// Size of uint backing_file_size; /// Modification time time_t mtime; /// Size in bytes uint64 size; /// Cluster bits byte cluster_bits; /// L2 table bits byte l2_bits; /// Padding ushort padding; /// Encryption method uint crypt_method; /// Offset to L1 table uint64 l1_table_offset; } QfiHeader; BigEndian(); QfiHeader header; local int shift = header.cluster_bits + header.l2_bits; local int l1Size = ((header.size + (1 << shift)) - 1) >> shift; FSeek(header.l1_table_offset); uint64 l1[l1Size];