Developer knowledge network · moderated exchange

UnreliableCode Topluluğu

Geliştirici Araştırması, Tersine Mühendislik ve Kodlama Topluluğu

Knowledge indexCanlı
4Categories
919Threads
2.8KGönderiler
Analysis

Roblox Luau Proto bytecode structure & constant table layout

luau_hacker
Luau Expert
MEMBER
Temsilci: 159
Katılım Tarihi: Aug 2020
Gönderiler: 17
Teşekkürler: 26
1 ay önce · 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
Temsilci: 115
Katılım Tarihi: Jul 2019
Gönderiler: 10
Teşekkürler: 45
1 ay önce · 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
Temsilci: 215
Katılım Tarihi: Mar 2018
Gönderiler: 86
Teşekkürler: 61
1 ay önce · Jul 2, 2026 10:29 PM
#3

Very clean struct definition. Matches Luau open source repository.