I have an old PC game called Air Strike 3D II. I wanted to extract music files but I couldn't figure out how to unpack the .apk file (NOT Android package). 7-zip can't open it. When I open the .apk file with IDA, it says (Unknown COFF machine) and it failed to disassemble it so it's not an assembly file.The headers always start with 0000803F 99990000. There is a folder named sounds and it contains .wav files, sounds/biglaser.wav, sounds/laser.wav etc... recovering files with WinHex does not help because it is packed and compressed.I found a log file that says---- Initializing file system ----pak1.apk - 733 filespak2.apk - 45 filespak4.apk - 1 filesF_Init: 3 data files found.I tried to disassemble the .exe file with IDA, but there is nothing useful because it is encrypted or obfuscated.Google doesn't give me solutions because it returns Android related results. I wish it could show results from 2008 and older.Here are the files if you want to take a look:https://drive.google.com/open?id=0B_6TXpxCnMc7TGVfOWlYWjVYXzQ
Unpack .apk file from a PC game (NOT Android related)
unpacking;hex
Update: I've done a write up on the entire file format here: http://www.tkte.ch/2017/02/27/air-strike-3d.htmlThese files aren't compressed, so don't worry about that. Since all you want to do is extract those waves we can cheat (a lot) and ignore everything else. Lets do a naive check:> strings -n 4 pak2.apk | grep RIFF -c40> strings -n 4 pak2.apk | grep WAVEfmt -c40Well that's promising. Looks like we've got a bunch of WAVs encapsulated by RIFFs which is pretty common.#!/usr/bin/env python# -*- coding: utf-8 -*-import sysimport structRIFF_MAGIC = b'RIFF'RIFF_LENGTH = struct.Struct('<I')def main():    in_file = sys.argv[1]    # Since the files are tiny lets cheat again and just read the entire thing.    with open(in_file, 'rb') as fin:        in_file = fin.read()    offset = 0    count = 0    # We're going to skim through the file looking for the start of a RIFF file.    while True:        start = in_file.find(RIFF_MAGIC, offset)        if start == -1:            # None left, so we're done with this .apk.            print('Extracted {0} files.'.format(count))            return        # Found one, so lets read the next 4 bytes which are the length of the RIFF file.        length = RIFF_LENGTH.unpack_from(in_file, start + 4)[0]        # The 8 comes from the 4 bytes for RIFF and the 4 bytes for the length        # itself, which aren't included in the length.        offset = start + 8 + length        # annnnd save it.        with open('wav_{0}.wav'.format(count), 'wb') as fout:            fout.write(in_file[start:offset])        count += 1if __name__ == '__main__':    sys.exit(main())And give it a whirl...> python extract.py pak2.apkExtracted 40 files.Open one of the WAV's in VLC and woohoo, sounds.