/* =============================================================
 *  Lua VM function offsets for Roblox version-5cf2272675e145f5
 * -------------------------------------------------------------
 *  Dumped With     : NtRemoveCode
 *  Roblox Version  : version-5cf2272675e145f5
 *  Dumped At       : Analise Ghidra + NtRemoveCode dump
 * -------------------------------------------------------------
 *  luaVM_Load      : 0x1D1C840  (luau_load / luaL_loadstring)
 *  luauExecute     : 0x47128F0  (luau_execute / lua_pcall)
 *  print           : 0x4681920
 *  luaC_Step       : 0x4704C60  (GC incremental step)
 *  luaD_Throw      : 0x47003E0  (long jump error handler)
 *  luaH_GetN       : 0x4722360  (hash table get)
 *  pushInstance    : 0x1CF6FB0
 *  getIdentityStruct: 0x47604C0
 *  getModuleFromVMStateMap: 0x1D33260
 *  opcodeTableLookup: 0x62176B0
 * =============================================================
 */

public static class LuaFunctions {
    /// <summary>
    /// Offset para luaVM_Load (luau_load / luaL_loadstring).
    /// moduleBase + LoadString = endereco da funcao que carrega e compila bytecode Lua.
    /// </summary>
    public const long LoadString = 0x1D1C840;

    /// <summary>
    /// Offset para luauExecute (luau_execute / lua_pcall).
    /// moduleBase + Pcall = endereco da funcao que executa o bytecode compilado.
    /// </summary>
    public const long Pcall = 0x47128F0;

    /// <summary>
    /// Offset para GetLuaState - funcao que retorna o ponteiro lua_State*.
    /// NAO DISPONIVEL no dump atual. Usar signature scanning como fallback
    /// ou tentar getModuleFromVMStateMap (0x1D33260) como alternativa.
    /// moduleBase + GetLuaState = endereco da funcao.
    /// </summary>
    public const long GetLuaState = 0x0;  // TODO: obter via runtime scan ou dump
}
