Talesrunner Pkg: Unpack
Unpacking talesrunner pkg files walks a fine line. This information is provided for educational purposes and archival preservation only.
You have been warned. Proceed at your own risk.
4.1 Header Discovery
4.2 Example Reconstructed Header (hypothetical but realistic): talesrunner pkg unpack
| Offset | Type | Description | |--------|----------|------------------------------| | 0x00 | uint32 | magic (e.g., 0x504B4700) | | 0x04 | uint32 | version | | 0x08 | uint32 | file count | | 0x0C | uint32 | TOC offset (from file start) | | 0x10 | uint32 | TOC size / encrypted flag |
4.3 Table of Contents Entry (per file):
| Offset | Type | Description | |--------|----------|----------------------| | 0x00 | char[256]| filename (null‑term) | | 0x100 | uint32 | offset in archive | | 0x104 | uint32 | compressed size | | 0x108 | uint32 | original size | | 0x10C | uint32 | flags (compression type) | Unpacking talesrunner pkg files walks a fine line
4.4 Compression
Before anything else, copy data.pkg to a separate folder (e.g., C:\TR_Extraction\source\). Unpacking tools can crash or corrupt the original.
If neither tool works, you may need to decrypt the header first. Save this script as tr_unpack.py: You have been warned
import os
import struct
import zlib
def unpack_talesrunner_pkg(pkg_path, out_dir):
with open(pkg_path, 'rb') as f:
# Read header (example: 4-byte magic, 4-byte version, 4-byte file count)
magic = f.read(4)
if magic != b'RPKG':
print("Unknown magic. Trying XOR decryption...")
# Simple XOR 0x7E (common key)
data = f.read()
decrypted = bytes([b ^ 0x7E for b in data])
# Process decrypted data...
# Continue parsing offsets and names
If you are reverse‑engineering for educational/research purposes (and own a legal copy):
The steps can vary depending on your operating system and the specific .pkg file you're dealing with. Here are general steps for macOS and a hypothetical approach for Linux: