|
SL2 Analyzer
Read a FromSoftware .sl2 save and report what is in it
|
Classes | |
| class | Bnd4Entry |
| One decoded BND4 entry: its index and where its blob lives in the file. More... | |
Functions | |
| parse_bnd4 (data) | |
| Parse and validate the BND4 entry table. | |
| checksum_ok (data, entry) | |
| Does this entry blob carry a valid MD5 checksum wrapper? | |
Variables | |
| int | BND4_HEADER_LEN = 64 |
| Size of the fixed BND4 file header, in bytes. | |
| int | BND4_ENTRY_LEN = 32 |
| Size of one BND4 entry header, in bytes. | |
The BND4 archive every .sl2 is, and its entry table.
| sl2.bnd4.parse_bnd4 | ( | data | ) |
Parse and validate the BND4 entry table.
Refuses anything that is not a well-formed BND4 archive: bad magic, a silly entry count, or an entry whose blob would fall outside the file. This is the boundary check that lets everything downstream trust its offsets.
| data | The full .sl2 bytes. |
| SystemExit | on any structural problem. |
| sl2.bnd4.checksum_ok | ( | data, | |
| entry | |||
| ) |
Does this entry blob carry a valid MD5 checksum wrapper?
Every Souls game prefixes each entry with MD5(rest). It is not a game discriminator (they all have it), but it is a cheap integrity check.
| data | The full file bytes. |
| entry | The entry to check. |
blob[0:16] equals the MD5 of the remaining blob bytes. | int sl2.bnd4.BND4_HEADER_LEN = 64 |