benilla-re systems structs docs

SLogClose

function · storm · host

Address
0x659ec0 · 76 bytes, up to 0x659f0b
Signature
void __stdcall (uint32_t log)
Meaning
Flushes and closes a log's file, unlinks its record and releases it
Confidence
verified, proof one
Finding
storm/log#closing-a-log

Finding: Closing a log in storm: text logs

SLogClose(id) (0x659ec0) does nothing until Storm's locks exist (s_stormLocksReady, 0xc5a170). It finds the record with LockLog (0x659f70, create 0), which on a hit returns it with its bucket's lock held. A record with an open file first runs FlushLog (0x659f10): buffered bytes go out with WriteFile, then FlushFileBuffers, and the buffer empties. The file is then closed with CloseHandle. 0x65a060 unlinks the record from its bucket chain, releases its 0x10124 bytes with VirtualFree and leaves the lock. The caller's own id word is not zeroed; the chat teardown zeroes its words itself.

The derivation is in the doc.

Callers 14

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.