NPA: Difference between revisions
Line 38: | Line 38: | ||
== Addition Notes == | == Addition Notes == | ||
This format obscures the data it stores. Both the index and data are protected in the same way. The first data read is 4 bytes at the start of the file. This is the size of the index and it's value is not obscured. Next the full index is read into memory and decoded by XOR'ing it by the key. Once the index is processed, data can be loaded but the data is protected the same way the index is, XOR'ed by a key. The game makes use of the XMM registers (SSE) and the assembly code ends up being a small, tight loop with just a few assembly instructions such as MOVDQA and PXOR. | This format obscures the data it stores. Both the index and data are protected in the same way. The first data read is 4 bytes at the start of the file. This is the size of the index and it's value is not obscured. Next the full index is read into memory and decoded by XOR'ing it by the key. Once the index is processed, data can be loaded but the data is protected the same way the index is, XOR'ed by a key. The game makes use of the XMM registers (SSE) and the assembly code ends up being a small, tight loop with just a few assembly instructions such as MOVDQA and PXOR. Unsure what the C++ equivalent would be. Probably uses some libraries I'm not used to but if I can find those, compile a sample program and disassemble it, might be able to make a more optimized program. Although for a extractor/packing program, speed or efficiency is more or less irrelevant baring extreme cases. | ||
{| class="wikitable" | {| class="wikitable" |
Revision as of 06:44, 27 July 2017
Used in the following game(s):
- Demonbane
- Steins;Gate
Structure
Overall | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Size | Content | Description | ||||||||||||
4 Bytes | Index Size | |||||||||||||
? Bytes | Index Data (protected) | |||||||||||||
? Bytes | File Data (protected) |
Index Header | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Size | Content | Description | ||||||||||||
4 Bytes | File count | Number of index entries | ||||||||||||
Index Entry | ||||||||||||||
4 Bytes | Filename Length | |||||||||||||
? Bytes | Filename | Each character is 2 bytes | ||||||||||||
4 Bytes | File Size | |||||||||||||
4 Bytes | Offset | |||||||||||||
4 Bytes | Unknown | Always 0x00000000 |
Addition Notes
This format obscures the data it stores. Both the index and data are protected in the same way. The first data read is 4 bytes at the start of the file. This is the size of the index and it's value is not obscured. Next the full index is read into memory and decoded by XOR'ing it by the key. Once the index is processed, data can be loaded but the data is protected the same way the index is, XOR'ed by a key. The game makes use of the XMM registers (SSE) and the assembly code ends up being a small, tight loop with just a few assembly instructions such as MOVDQA and PXOR. Unsure what the C++ equivalent would be. Probably uses some libraries I'm not used to but if I can find those, compile a sample program and disassemble it, might be able to make a more optimized program. Although for a extractor/packing program, speed or efficiency is more or less irrelevant baring extreme cases.
Key | Game(s) |
---|---|
BD AA BC B4 AB B6 BC B4 | Steins;Gate (JAST USA) |
Tools
Coming soon...