benilla-re systems structs docs

luaZ_openspace

function · lua · boundary

Address
0x6fb5c0 · 56 bytes, up to 0x6fb5f7
Meaning
Grows a work buffer to at least a number of bytes, 32 at the least, and returns it
Confidence
verified, proof two
Finding
lua/runtime#input-streams

Finding: Input streams in lua: calls, states and the collector

The compiler (compiler) reads its input through a stream record: a count n at +0, the next byte p at +4, the reader function at +8, its data at +0xc and the chunk name at +0x10. luaZ_init fills it and luaZ_fill calls the reader with a null state, the data and the address of a size, keeping the block it returns. luaZ_lookahead peeks at the next byte, luaZ_read copies a number of bytes out. luaZ_openspace grows the lexer's work buffer to at least 32 bytes.

functionnamedecided by
0x6fb480luaZ_fillreader called through [esi+8] (0x6fb490), null or empty block gives -1 (0x6fb4b2), count minus 1 (0x6fb4a0)
0x6fb4c0luaZ_lookaheadluaZ_fill when the count is 0 (0x6fb4c8), the byte put back (0x6fb4db, 0x6fb4dc)
0x6fb4f0luaZ_initstores at +8, +0xc, +0x10 (0x6fb4f6, 0x6fb4fc, 0x6fb4ff), count and pointer zeroed (0x6fb502, 0x6fb508)
0x6fb520luaZ_readluaZ_fill (0x6fb548), rep movs (0x6fb573, 0x6fb57d), 0 when all bytes were read (0x6fb59e), the bytes still wanted at the end of the stream (0x6fb5a8)
0x6fb5c0luaZ_openspacesize test (0x6fb5cd), floor 32 (0x6fb5d1), luaM_irealloc in lzio.c (0x6fb5e6)

The derivation is in the doc.

Callers 6

Callees 1

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