SFileOpenFileInArchives
function · storm · orchestration
- Address
0x656690· 889 bytes, up to0x656a08- Meaning
- Resolves a name, derives the file's key and sector count, and builds the file record
- Confidence
- verified, proof two
- Finding
- storm/format#decryption
Finding: Decryption in storm: the archive format
A block is decrypted dword by dword. The running value starts as 0xeeeeeeee; for each dword the key stream is
added table[0x400 + (key & 0xff)], the dword is XORed with (running + key), running = running·0x21 + plain + 3,
and key = ((~key << 0x15) + 0x11111111) | (key >> 0x0b). A file's key is the type 3 hash of its base name:
the name after the last : and then after the last \, never /. With 0x20000 the key becomes
(key + offset − header position) ^ unpacked size. The sector table uses the key − 1, and sector i the key + i.
The derivation is in the doc.
Callers 5
- SFile::OpenEx storm
- 0x655570 storm
- 0x6561c0 storm
- 0x656340 storm
- 0x656390 storm
Callees 14
- _toupper crt
- ReleaseRefChain net
- SMemAlloc storm
- SStrChrR storm
- SStrCopy storm
- SStrDupA storm
- SErrSetLastError storm
- 0x6507e0 storm
- ArchiveLookup storm
- PrepareCryptTable storm
- 0x656a10 storm
- 0x657810 storm
- 0x662910 storm
- 0x66cb80 storm
Calls and jumps by a bare address, from tables/calls.tsv.