benilla-re systems structs docs

LooseIndexEntry

struct · storm · 32 bytes

Meaning
Holds one loose file of the index: its key hash, list links, key, full path and kind
Confidence
verified, proof two
Finding
storm/mount#loose-file-index

Finding: Loose-file index in storm: mounting the archives

0x646ea0 walks the base path 0xc52418, or . when it does not list, then that string with 0xc520c8 (Data\) appended (.Data\ in the fallback, so Data is then not walked), and marks the index built. 0x646910 skips ., .. and folders whose path below the walked folder is a prefix of Data\ (case-sensitive), walks the others, and enters every regular file: the key is its path below the walked folder, the value its full path. A last extension .bz or .MPQ (any case) is cut from the key, as kind 1 or 2; any other file is kind 0. A key's first entry stays: the base folder's before Data\'s, then listing order. A third folder, 0xc52310, stays empty.

The derivation is in the doc.

Fields 8

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_hashHolds SStrHashHT of the keyverified, proof twostorm/mount#loose-file-index
0x00044void *m_bucketPrevPoints at the previous link of its bucket chainverified, proof twostorm/mount#index-lookup-and-open
0x00084LooseIndexEntry *m_bucketNextPoints at the next entry of its bucket chain, an odd value at the endverified, proof twostorm/mount#index-lookup-and-open
0x000c4void *m_listPrevPoints at the previous link of the table's list of all entriesverified, proof twostorm/mount#index-lookup-and-open
0x00104LooseIndexEntry *m_listNextPoints at the next entry of the table's list of all entries, an odd value at the endverified, proof twostorm/mount#index-lookup-and-open
0x00144char *m_keyPoints at the key: the path below the walked folder, a .bz or .MPQ suffix cutverified, proof twostorm/mount#loose-file-index
0x00184char *m_diskPathPoints at the full disk path, extension keptverified, proof twostorm/mount#loose-file-index
0x001c4uint32_tm_kindHolds 0 for a plain file, 1 for .bz, 2 for .MPQverified, proof twostorm/mount#loose-file-index