Skip to main content

Module rff

Module rff 

Source
Expand description

Reader for RFF (“Resource File Format”) archives used by Blood.

Layout (all little endian):

  • header, 32 bytes: magic RFF\x1a, u16 version, u16 pad, u32 dictionary offset, u32 entry count, 16 bytes padding.
  • dictionary: count entries of 48 bytes, XOR-obfuscated for versions >= 0x300.
  • entries flagged FLAG_ENCRYPTED have their first 256 bytes XOR-obfuscated.

Structs§

Rff
RffEntry

Constants§

ENTRY_SIZE 🔒
FLAG_BY_ID
FLAG_ENCRYPTED
FLAG_EXTERNAL
FLAG_PRELOAD
FLAG_PRELOCK

Functions§

crypt
XOR obfuscation used for file payloads and v0x301 dictionaries: byte i is XORed with (key + i) >> 1.
crypt_v300 🔒
Dictionary obfuscation of v0x300 archives: byte i XOR ((key + i) & 0xff) >> 1.
cstr 🔒
invalid 🔒