Developer knowledge network ยท moderated exchange

Onbetrouwbare Code-gemeenschap

Ontwikkelaarsonderzoek, reverse engineering en coderingsgemeenschap

Knowledge indexLive
4Categories
919Threads
2.8KBerichten
Analysis

Roblox Luau Proto bytecode structure & constant table layout

luau_hacker
Luau Expert
MEMBER
Vertegenwoordiger: 159
Datum van deelname: Aug 2020
Berichten: 17
Bedankt: 26
1 maanden geleden ยท Jul 2, 2026 9:59 AM
#1

Deep dive into Luau's Proto binary data structure:

CPP
struct LuauProto {
    uint8_t  maxstacksize;
    uint8_t  numparams;
    uint8_t  nups;
    uint8_t  is_vararg;
    int      sizecode;
    uint32_t* code;        // Array of 32-bit Luau instructions
    int      sizek;
    TValue*  k;           // Constant table (Strings, Numbers, Booleans)
    int      sizep;
    LuauProto** p;        // Sub-prototypes (nested functions/closures)
};

Traversing the Proto tree allows complete static disassembly of any loaded game script in memory!

luau_reverser
Bytecode Analyst
MEMBER
Vertegenwoordiger: 115
Datum van deelname: Jul 2019
Berichten: 10
Bedankt: 45
1 maanden geleden ยท Jul 2, 2026 4:04 PM
#2

Constant table TValue array contains all function names and string literals in plaintext. Essential for Luau decompilers.

vtable_slayer
Senior Reverser
MEMBER
Vertegenwoordiger: 215
Datum van deelname: Mar 2018
Berichten: 86
Bedankt: 61
1 maanden geleden ยท Jul 2, 2026 10:29 PM
#3

Very clean struct definition. Matches Luau open source repository.