-
Notifications
You must be signed in to change notification settings - Fork 8
BEA File Format
Yannik Marchand edited this page May 10, 2021
·
24 revisions
NW4F > Bezel Archive (BEA)
This is an archive format used by the Bezel engine.
File structure:
- File Header
- One or more blocks
- Relocation table
- Encrypted files
Offset | Size | Description |
---|---|---|
0x0 | 8 | Magic number ("SCNE") |
0x8 | 1 | Micro version |
0x9 | 1 | Minor version |
0xA | 2 | Major version |
0xC | 2 | Endianness (0xFEFF=Big, 0xFFFE=Little) |
0xE | 1 | Alignment |
0xF | 1 | Address size |
0x10 | 4 | Filename offset |
0x14 | 2 | Flags: 1 - Is relocated |
0x16 | 2 | First block offset |
0x18 | 4 | Relocation table offset |
0x1C | 4 | Filesize without encrypted subfiles |
The block size is usually the same as the offset to the next block, but in the last block the offset is set to 0.
Offset | Size | Description |
---|---|---|
0x0 | 4 | Signature |
0x4 | 4 | Offset to next block |
0x8 | 4 | Block size |
0xC | 4 | Padding |
Offset | Size | Description |
---|---|---|
0x0 | 16 |
Block header (_STR ) |
0x10 | 4 | String count |
0x14 | Strings |
Every string is null-terminated. If the string contains an odd number of bytes, an additional null byte is added such that the size field of the next string is aligned.
Offset | Size | Description |
---|---|---|
0x0 | 2 | Size without null terminator |
0x2 | Null-terminated string |
Offset | Size | Description |
---|---|---|
0x0 | 4 | Signature (_RLT ) |
0x4 | 4 | Offset of relocation table (see file header) |
0x8 | 4 | Number of sections |
0xC | 4 | Padding |
0x10 | Sections | |
Relocations |
Offset | Size | Description |
---|---|---|
0x0 | 8 | Memory address |
0x8 | 4 | File offset |
0xC | 4 | File size |
0x10 | 4 | Index of first relocation |
0x14 | 4 | Number of relocations |
Offset | Size | Description |
---|---|---|
0x0 | 4 | File offset |
0x4 | 2 | Number of chunks |
0x6 | 1 | Relocated words per chunk |
0x7 | 1 | Non-relocated words per chunk |