To understand the process of unpacking, one must first understand the container. In the context of TalesRunner , the .pkg file extension serves as a proprietary archive format. Unlike standard compression formats like .zip or .rar , which have public specifications, game-specific PKG files are often "obfuscated" or custom-tailored by the developers (Rhaon Entertainment, now Smilegate) to optimize loading speeds and protect intellectual property.
repkg extract scene.pkg --onlyexts=tex,png,dds
Using your standalone extraction utility or a corresponding QuickBMS repacking script, you point the tool to your modified folder and compress it back into a .pkg file.
# AES decryption (example key - replace with actual) cipher = AES.new(b'your_aes_key_16b', AES.MODE_ECB) for name, offset, zsize, size in entries: f.seek(offset) enc_data = f.read(zsize) dec_data = cipher.decrypt(enc_data) # Decompress if needed (LZSS, zlib) out_path = os.path.join(output_dir, name) os.makedirs(os.path.dirname(out_path), exist_ok=True) with open(out_path, 'wb') as out: out.write(dec_data[:size])
cd C:\repkg