Difference between revisions of "APM"

From owdev
Jump to: navigation, search
 
Line 1: Line 1:
Overwatch's root file contains a list of these files.
+
= APM =
  
struct APMFile
+
== APMFile ==
  {
+
 
    u64 buildVersion;
+
  uint64 build_version;
    u32 buildNumber;
+
uint32 build_number;
    u32 packageCount;
+
uint32 package_count;
    u32 entryCount;
+
uint32 entry_count;
    u32 unk;
+
uint32 unk_0;
    APMEntry[entryCount] entries;
+
APMEntry* entries[entry_count];
    APMPackage[packageCount] packages;
+
APMPackage* packages[package_count];
  }
+
 
   
+
== APMEntry ==
  struct APMEntry
+
 
  {
+
uint32 index;
    u32 index;
+
uint32 a;
    u32 hashA;
+
uint32 b;
    u32 hashB;
+
 
  }
+
== APMPackage ==
   
+
 
  struct APMPackage
+
uint64 local_key;      // CMF Key
  {
+
  uint64 primary_key;    // CMF Key
    u64 localKey;
+
  uint64 external_key;    // CMF Key
    u64 primaryKey;             // Points to a [[STUD]] file (sometimes)
+
  uint64 encryption_hash; // hash of the encryption key
    u64 externalKey;            
+
  uint64 package_key;    // CMF Key, leads to a PackageIndex file
    u64 encryptionKeyHash;       // Encrypted with this key
+
uint32 unk_0;
    u64 packageKey;             // [[Key]] of package itself
+
uint32 unk_1;           // size?
    u32 buffersize;             // Filesize when extracted
+
uint32 unk_2;
    u32 unk_1;
+
 
    u32 unk_2;
+
= CMF =
    u32 unk_3;
+
 
    byte[16] indexContentKey;   // Content key of the [[Package Index]]
+
CASC Key is the MD5 hash of the APM filename with the "cmf" extension.
  }
+
 
 +
In example:
 +
 
 +
Manifest/enUS.apm -> Manifest/enUS.cmf
 +
 
 +
== CMFFile ==
 +
 
 +
  uint64 build_version;
 +
  uint64 build_number;
 +
  uint32 entry_count;
 +
  uint32 header;
 +
CMFEntry* entries[entry_count];
 +
CMFBlob* hashes[]; // read until EOF
 +
 
 +
== CMFEntry ==
 +
 
 +
Data is typically identical to APMEntry
 +
 
 +
uint32 index;
 +
uint32 a;
 +
uint32 b;
 +
 
 +
== CMFBlob ==
 +
 
 +
uint64 key;   // CMF Key
 +
uint32 flags; // unknown
 +
md5    hash; // CASC Key
 +
 
 +
= PackageIndex =
 +
 
 +
uint64 offset_records;
 +
uint64 unk_offset_0;
 +
uint64 unk_offset_1;
 +
uint64 dependency_offset;
 +
uint64 unk_0;
 +
uint32 unk_count_0;
 +
uint32 record_count;
 +
uint32 unk_count_1;
 +
uint32 record_size;
 +
uint32 unk_1;
 +
uint32 dependency_count;
 +
uint64 unk_2;
 +
uint64 bundle_key;                        // CMF Key
 +
uint64 unk_3;
 +
PackageIndexRecord* records[record_count]; // WARNING: Read record_size bytes and decompress with gzip.
 +
uint32* dependencies[dependency_count];
 +
 
 +
== PackageIndexRecord ==
 +
 
 +
Read CASC Encoding info from the key obtained from the CMF in order to get the size EVEN IF IT HAS THE BUNDLE FLAG.
 +
 
 +
uint64 key;    // CMF Key
 +
uint32 flags;  // Has 0x40000000 when in bundle, otherwise in encoding
 +
  uint32 offset; // bundle offset

Latest revision as of 06:37, 24 January 2017

APM

APMFile

uint64 build_version;
uint32 build_number;
uint32 package_count;
uint32 entry_count;
uint32 unk_0;
APMEntry* entries[entry_count];
APMPackage* packages[package_count];

APMEntry

uint32 index;
uint32 a;
uint32 b;

APMPackage

uint64 local_key;       // CMF Key
uint64 primary_key;     // CMF Key
uint64 external_key;    // CMF Key
uint64 encryption_hash; // hash of the encryption key
uint64 package_key;     // CMF Key, leads to a PackageIndex file
uint32 unk_0;
uint32 unk_1;           // size?
uint32 unk_2;

CMF

CASC Key is the MD5 hash of the APM filename with the "cmf" extension.

In example:

Manifest/enUS.apm -> Manifest/enUS.cmf

CMFFile

uint64 build_version;
uint64 build_number;
uint32 entry_count;
uint32 header;
CMFEntry* entries[entry_count];
CMFBlob* hashes[]; // read until EOF

CMFEntry

Data is typically identical to APMEntry

uint32 index;
uint32 a;
uint32 b;

CMFBlob

uint64 key;   // CMF Key
uint32 flags; // unknown
md5    hash;  // CASC Key

PackageIndex

uint64 offset_records;
uint64 unk_offset_0;
uint64 unk_offset_1;
uint64 dependency_offset;
uint64 unk_0;
uint32 unk_count_0;
uint32 record_count;
uint32 unk_count_1;
uint32 record_size;
uint32 unk_1;
uint32 dependency_count;
uint64 unk_2;
uint64 bundle_key;                         // CMF Key
uint64 unk_3;
PackageIndexRecord* records[record_count]; // WARNING: Read record_size bytes and decompress with gzip.
uint32* dependencies[dependency_count];

PackageIndexRecord

Read CASC Encoding info from the key obtained from the CMF in order to get the size EVEN IF IT HAS THE BUNDLE FLAG.

uint64 key;    // CMF Key
uint32 flags;  // Has 0x40000000 when in bundle, otherwise in encoding
uint32 offset; // bundle offset