The overall structure of the file appears to be that of a RIFF file. This format consists of a number of separate 'chunks' of data each preceded by a header containing a 4 byte chunk type and a 4 byte (little-endian) length.
Your file begins -
Offset Type Length Data
======== ====== ======== ========
0000000: 'ampf' 00000004 'aaaa'
000000C: 'meta' 00000004 00000007 // probably the version of the AMXD file
0000028: 'ptch' 000126C0 ...
....
Looking at a couple of .amxd
files online (with meta = 1) these only contain the ampf
meta
and ptch
chunks and the ptch
chunk in each case is total in json format.
This is not the case with your file (with meta
= 7). Interestingly, the data in the ptch
chunk seems have it's own header (with values in big-endian format) before the json data.
00000030: `ax@c` 00000010 00000000 000125E8
With only a single example it's hard to infer much from this other than the last value here is a length.
Edit: Looking at Infinity.amxd
in the github repository you linked to sheds more light on the files with meta
= 7.
The top-level structure it that of a RIFF file (with little-endian values)
00000000: 'ampf' 00000004 6D6D6D6D
0000000C: 'meta' 00000004 00000007
00000018: 'ptch' 0000D13A .... // (This chunk contains the whole rest of the file)
Digging further, it appears that the ptch
chunk itself contains nested chunks of data in a slightly different format (with big-endian values) -
00000020: 'mx@c' 00000010 000000000000CFFA
00000030: ... blob of data ...
0000D01A: 'dlst' 00000140
0000D012: 'dire' 00000068
0000D02A: 'type' 0000000C 'JSON'
0000D036: 'fnam' 00000018 'Infinity.amxd'
0000D04E: 'sz32' 0000000C 0000CC39
0000D05A: 'of32' 0000000C 00000010
0000D066: 'vers' 0000000C 00000000
0000D072: 'flag' 0000000C 00000011
0000D07E: 'mdat' 0000000C D9F0E203
0000D08A: 'dire' 00000068
0000D092: 'type' 0000000C 'PNG '
0000D09E: 'fnam' 00000018 'infinityyy.png'
0000D0B6: 'sz32' 0000000C 000002B6
0000D0C2: 'of32' 0000000C 0000CC49
0000D0CE: 'vers' 0000000C 00000000
0000D0DA: 'flag' 0000000C 00000000
0000D0E6: 'mdat' 0000000C D6E92F11
0000D0F2: 'dire' 00000068
0000D0FA: 'type' 0000000C 'PNG '
0000D106: 'fnam' 00000018 'infinity13.png'
0000D11E: 'sz32' 0000000C 000000FB
0000D13A: 'of32' 0000000C 0000CEFF
0000D136: 'vers' 0000000C 00000000
0000D142: 'flag' 0000000C 00000000
0000D14E: 'mdat' 0000000C D6F90E73
This begins with a blob of data and is followed by a directory listing dlst
.
Each directory entry 'dire' references a file whose data can be found in the blob chunk using offset of32
(relative to the start of the ptch
chunk data i.e. 00000020
) and size sz32
.
In summary the data in the Infinity.amxd
file consists of a json
file and 2x png
files all of which should now be easy to extract.
file
isbinwalk
.