getF
function · lua · unreached
- Address
0x6f5610· 56 bytes, up to0x6f5647- Meaning
- Reads up to 512 bytes of a file for the loader
- Confidence
- verified, proof one
- Finding
- lua/auxlib#loading-chunks
Finding: Loading chunks in lua: the auxiliary library
luaL_loadfile opens a file (or standard input for a null name), reopens it in binary mode when
its first byte is neither a space nor printable, and reads it through lua_load with the reader
getF, 512 bytes at a time; errfile makes the cannot read message. getS is the string reader of luaL_loadbuffer.
lua_dofile, lua_dobuffer and lua_dostring load and run a chunk, aux_do calling it in
protected mode and callalert the global _ALERT, or printing the message, on failure.
| function | name | decided by |
|---|---|---|
0x6f5490 | luaL_loadfile | fopen (0x6f5506), getc and ungetc (0x6f54ca, 0x6f54d3), the rb reopen (0x6f557f), lua_load (0x6f55bb), the names =stdin and @%s |
0x6f5610 | getF | end-of-file flag test (0x6f5615), fread of 0x200 (0x6f562e) |
0x6f5650 | errfile | lua_tostring, strerror (0x6f5667), the format cannot read %s: %s (0x6f566e), lua_remove (0x6f5680) |
0x6f56e0 | getS | size zero returns null (0x6f56e6, 0x6f56eb); else the size is stored (0x6f56f1) and cleared (0x6f56f5) |
0x6f5700 | lua_dofile | luaL_loadfile (0x6f5703), tail jmp to aux_do (0x6f570d) |
0x6f5720 | aux_do | lua_pcall (0x6f572d), callalert (0x6f5738) |
0x6f5750 | callalert | the name _ALERT (0x6f5757), lua_gettable, type 6 (0x6f5777), lua_call (0x6f5791), fprintf (0x6f57a8) |
0x6f57c0 | lua_dobuffer | luaL_loadbuffer (0x6f57d0), aux_do (0x6f57d9) |
0x6f57f0 | lua_dostring | length by repne scasb, lua_dobuffer (0x6f5804) |
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 1
- 0x740c97 crt
Calls and jumps by a bare address, from tables/calls.tsv.