A New Beginning VIS/VC???/VS???
Posted: Fri Nov 26, 2010 9:55 pm
Until the Wiki is up and running again, I thought I'd share some bits of information for A New Beginning here.
I. General information
A New Beginning is an adventure game based on the Visionaire engine. Luigi Auriemma already has a BMS to handle the basic format, as can be seen in this thread. However, there is still some interesting information to be retrieved by taking a closer look.
II. Relevant files
The interesting game files, which all share the same VIS format (despite their extensions) are these:
III. File naming
The directory of the VIS archive format does not support storing the names of the files contained within the archive. However, the main archive data.vis contains exactly one file in XML format (type identifier 3), which servers as an entry point for the Visionaire engine. Beside other information, it contains the actual names of the files found in the VIS archives. The file names are always followed by a plaintext indicator telling the engine in which archive the file is located: In this pattern, "x" is a single character that identifies the logical archive type. It is usually also found in the extension of the archive: "c" stands for "characters\character.vc???", "s" for "scenes\scene.vs???". The number "nnn" identifies the actual archive number ("???" in the previous examples), "kkkkk" is the running number within the archive structure.
Example: The file "speech\de\standards\bent\Strd_Bent_22.ogg" is the 20th entry in the archive "characters\character.vc068".
There is one exception: The logical archive type "m" does not refer to an archive, but to one of the renamed videos: The video "cutscenes\01-05\cutscene_01-05_02-02.ogv" can be found under the name "videos\video.vv026".
IV. Encryption
Aside from the encryption of the directory information in the VIS archives, an additional encryption is applied to the content of PNG files: The width and height information (8 successive bytes) in the IHDR structure are XOR-encrypted using a lower-case hexadecimal character string. The key is derived from the MD5 hash of the file name (without path and extension) in UTF-16 format.
Example: The image dimensions of the file "Chars\tuersteher\5004_Ohr_Knopf\Ohr_09.png" have been encrypted. The key are the first 8 characters of MD5(UTF-16("Ohr_09")) = 1a7d8961481e341504f3efB6e7f6231d, i.e. 1a7d8961.
(The correctness of the key can be verified by checking the CRC32 of the IHDR chunk after decryption. If everything else fails, it can also be brute-forced via the CRC in reasonable time using some sensible assumptions.)
V. Tools
A proof-of-concept unpacker/extractor for the VIS archives as found in A New Beginning (possibly also other games built with the Visionaire engine?), which considers the above points is my VISExt command-line application.
Best wishes,
Deniz
I. General information
A New Beginning is an adventure game based on the Visionaire engine. Luigi Auriemma already has a BMS to handle the basic format, as can be seen in this thread. However, there is still some interesting information to be retrieved by taking a closer look.
II. Relevant files
The interesting game files, which all share the same VIS format (despite their extensions) are these:
- data.vis (the main archive)
- characters\character.vc???
- scenes\scene.vs???
III. File naming
The directory of the VIS archive format does not support storing the names of the files contained within the archive. However, the main archive data.vis contains exactly one file in XML format (type identifier 3), which servers as an entry point for the Visionaire engine. Beside other information, it contains the actual names of the files found in the VIS archives. The file names are always followed by a plaintext indicator telling the engine in which archive the file is located:
Code: Select all
path\filename.ext#x#nnn#kkkkk#
Example:
Code: Select all
speech\de\standards\bent\Strd_Bent_22.ogg#c#068#00020#
There is one exception: The logical archive type "m" does not refer to an archive, but to one of the renamed videos:
Code: Select all
cutscenes\01-05\cutscene_01-05_02-02.ogv#m#026#00000#
IV. Encryption
Aside from the encryption of the directory information in the VIS archives, an additional encryption is applied to the content of PNG files: The width and height information (8 successive bytes) in the IHDR structure are XOR-encrypted using a lower-case hexadecimal character string. The key is derived from the MD5 hash of the file name (without path and extension) in UTF-16 format.
Example: The image dimensions of the file "Chars\tuersteher\5004_Ohr_Knopf\Ohr_09.png" have been encrypted. The key are the first 8 characters of MD5(UTF-16("Ohr_09")) = 1a7d8961481e341504f3efB6e7f6231d, i.e. 1a7d8961.
(The correctness of the key can be verified by checking the CRC32 of the IHDR chunk after decryption. If everything else fails, it can also be brute-forced via the CRC in reasonable time using some sensible assumptions.)
V. Tools
A proof-of-concept unpacker/extractor for the VIS archives as found in A New Beginning (possibly also other games built with the Visionaire engine?), which considers the above points is my VISExt command-line application.
Best wishes,
Deniz