unimg.exe rebuilds WRLD/xet files and recovers exact resource payloads from companion IMG archives used by Grand Theft Auto: Liberty City Stories and Grand Theft Auto: Vice City Stories.
Place the matching .lvz and .img files together, then drag the .lvz onto unimg.exe, or run:
unimg beach.lvzThe matching IMG is found from the LVZ stem, such as beach.lvz + beach.img.
Automatic detection is the default:
unimg beach.lvz --game autoYou can force either Stories layout:
unimg indust.lvz --game lcs
unimg beach.lvz --game vcsTo focus recovery on known missing resource IDs:
unimg beach.lvz --game vcs --wanted 1881,1828,1802For targeted IDs, the program tests the known exact IMG pointer forms, including the continuation-relative pointer - 0x20 case used by LVZ-empty resources that actually continue in IMG.
To test all supported pointer forms for every resource row:
unimg beach.lvz --all-pointer-variantsThis can generate duplicates, so targeted recovery is the safer default.
--img <file.img> Explicit companion IMG path
--out <folder> Explicit output directory
--game auto|lcs|vcs Select or auto-detect the Stories layout
--wanted <id,id,...> Restrict/report exact resource IDs
--all-pointer-variants Test all supported pointer interpretations
--no-continuations Skip rebuilt WRLD/xet continuation files
--no-resources Skip resource payload files; still write CSVs
--resources-only Skip continuation files and extract resources
--help Show command-line help
The default output folder is <lvz-name>_unpacked and contains:
continuations/— rebuilt DLRW/xet continuation filesresources/— exact IMG resource payload candidatesmaster_resources.csv— master LVZ Resource[] rowssector_containers.csv— IMG-backed sector/slave containerssector_resources.csv— exact resource rows and resolved offsetssummary.txt— detection and extraction totalsunpack.log— detailed parser log
The included executable is 64-bit Windows and uses the included zlib1.dll.
To rebuild with MinGW-w64:
x86_64-w64-mingw32-gcc -std=c99 -O2 -Wall -Wextra -Wpedantic -static-libgcc unimg.c -lz -o unimg.exeOn a normal Windows MinGW installation, use the corresponding gcc command if the cross-compiler-prefixed command is not present.