PK2 Workbench PRO is a clean Windows-native rebuild of the old Joymax/ZeraPain PK2 editor and extractor workflow.
The original folder only contains binaries, so this project is a fresh implementation:
pk2core: reusable C++17 library for PK2 tree parsing, extraction, import, delete, and safe rewrite.pk2cli: command-line tool for automation and regression testing.pk2win: classic Win32 GUI with tree/list browsing and menu actions.
The final tool does not require GFXFileManager.dll and does not redistribute Joymax binaries or assets.
Install Visual Studio 2022 with the Desktop C++ workload and CMake, then run:
cmake -S . -B build -A x64
cmake --build build --config Release
ctest --test-dir build -C ReleaseFor 32-bit compatibility builds:
cmake -S . -B build-x86 -A Win32
cmake --build build-x86 --config Releasebuild\Release\pk2cli.exe list Media.pk2 --password=169841
build\Release\pk2cli.exe extract Media.pk2 server_dep output --children --overwrite --password=169841
build\Release\pk2cli.exe import-file Media.pk2 .\new.txt server_dep\new.txt Media.edited.pk2
build\Release\pk2cli.exe md5 "private server blowfish key"- Use the search box and Search button to find files or folders anywhere in the open archive by name or internal path.
- When no archive is loaded, drag one
.pk2file onto the window to open it. - Double-click a
.txtentry to edit and save it directly inside the PK2 while preserving its original text encoding. - File sizes are shown with readable units:
B,KB,MB, andGB. Extract Shownwrites into a folder named after the archive stem. For example, extracting fromData.pk2intoC:\outwrites underC:\out\Data.- Files and folders can be dragged onto the window to import them into the currently selected archive folder.
- Imports, drag-and-drop changes, deletions, and Server Configuration updates are saved automatically. Each save retains the existing
.baksafety backup behavior. - Normal saves preserve the archive's existing physical size when the rewritten content is smaller, avoiding unexpected shrinkage from compaction.
- Files and folders can be dragged out of the list/tree into Explorer to extract them by shell copy.
- Opening, extracting, and importing run on background worker threads with a status-bar progress bar, so large operations should not freeze the window.
- Windows filesystem paths are converted through UTF-8 helpers, so non-ANSI folder and file names can be used without code-page conversion errors.
- Flat PK2 archives with root-level files and no folders show a
[root files]item in the tree and a count summary in the status bar. Tools > Server Configurationprovides an integrated IPInput-style editor for the root-levelDIVISIONINFO.TXT,GATEPORT.TXT, and encryptedSV.Tfiles inMedia.pk2. It supports multiple divisions and gateway URLs plus Content ID, gateway port, and client version.
The PK2 reader/writer uses the standard Joymax header marker, 256-byte header, 20-entry encrypted directory blocks, and 128-byte directory entries inferred from the provided tools. Official Joymax PK2s use the directory block at 0x100 as the root; header offset scanning is only used as a fallback. It supports plaintext blocks, standard Blowfish fallbacks, and the Joymax-compatible masked Blowfish key schedule used by the original GFXFileManager.dll.
Large archives are opened by streaming header/directory metadata blocks instead of reading the full PK2 into memory. The Windows GUI also loads archives on a background thread and lazily expands the folder tree, so opening a large Media.pk2 should keep the window responsive. Extraction copies data in 1 MB chunks, reuses source readers, and uses a capped worker pool for many-file extracts.
The local Data.pk2 was verified for listing and extracting with the default 169841 password. A redistributable legal PK2 fixture is still needed for checked-in regression coverage.