-- Constants local IN_STACK = 0 local IS_COPIED = 1 -- Debugging related variables local is_real_vm = false local VM_ITERATION = 0 -- remove pcall spam local string_rep = string.rep string.rep = function() end -- anti beautify bypass local _pcall = pcall pcall = function(func, ...) local ret = {_pcall(func, ...)} if not ret[1] and type(ret[2]) == "string" then ret[2] = (ret[2]):gsub(":(%d+)([:\r\n])", ":1:") end return unpack(ret) end -- Dumping of functions! local function dump_func(func, no_unluac) if type(func) ~= "function" then return end local func_id = tostring(func):match("function: (.+)") local bytecode = string.dump(func) local filename = func_id .. ".luac" local file_location = "temp/" .. filename local file = assert(io.open(file_location, "wb")) file:write(bytecode) file:close() --print(filename) if not no_unluac then os.execute("unluac " .. file_location) end return filename end local function find_name(value, level) level = (level or 2) -- 2 => caller of the function that calls find_name for i = 1, math.huge do local name, v = debug.getlocal(level, i) if not name then break end if v == value and name ~= "(*temporary)" then return name, "local" end end local info = debug.getinfo(level, "f") if info and info.func then local func = info.func for i = 1, math.huge do local name, v = debug.getupvalue(func, i) if not name then break end if v == value then return name, "upvalue" end end end for k, v in pairs(_G) do if v == value then return k, "global" end end for k, v in pairs(string) do if v == value then return k, "string" end end for k, v in pairs(debug) do if v == value then return k, "debug" end end for k, v in pairs(math) do if v == value then return k, "math" end end for k, v in pairs(table) do if v == value then return k, "table" end end return nil end local function get_var_name(x, stack_level) local name, kind = find_name(x, stack_level or 3) -- 3 => skip one more stack level if wrapper if name then return name, kind else return "Unknown name (" .. type(x) .. ")" end end local function custom_tostring(value, indent) indent = (indent or 1) local type = type(value) local str = "" if type == "nil" then str = "nil" elseif type == "boolean" then str = value and "true" or "false" elseif type == "number" then str = string.format("%g", value) elseif type == "string" then str = '"' .. value:gsub('"', '\\"') .. '"' elseif type == "table" then if #value >= 20 then str = "LONG_TABLE_HERE!" .. #value else str = "{\n" for k, v in pairs(value) do str = str .. string_rep(" ", indent) str = str .. "[" .. custom_tostring(k, indent + 1) .. "] = " .. custom_tostring(v, indent + 1) .. "\n" end str = str .. string_rep(" ", indent - 1) str = str .. "}" end elseif type == "function" then str = get_var_name(value, 3 + indent) -- for base padding else str = "<" .. type .. ">" end return str end local function print_tbl(tbl, indent) indent = indent or "" for k, v in pairs(tbl) do if type(v) == "function" then print(indent .. k, get_var_name(v)) else print(indent .. k, v) end if (type(v) == "table") then if (k == "loaded") or k == "_G" then return end print_tbl(v, indent .. " ") end end end -- LPH Code return ({ nil_self_index = function(...) (...)[...] = nil end, control_flow_tbl = { 46502, 2729594565, -- needed 3995115981, 557601710, -- causes crash segmentation fault if not correct! 3447339945, 658548139, -- needed 2985864354, 247869824, -- needed 3511565302 }, main = (function(Self) local _bit = (Self.bit or bit32); local XOR = _bit and _bit.bxor; local h_funcs = {} h_funcs["DIP_BLOB_IDX"] = 1 h_funcs["is_constant_cached"] = nil h_funcs["string.match"] = Self.string_match; h_funcs["empty_tbl"] = {} h_funcs["get_self_index"] = function(...) return (...)[...] end; h_funcs["safe_tbl_unpack"] = function(tbl, start, finish) finish = finish or 1; start = (start or # tbl) return unpack(tbl, finish, start) end; h_funcs["gen_empty_tbl"] = (function(last_idx) return { h_funcs["safe_tbl_unpack"](h_funcs["empty_tbl"], last_idx, 1) } end) h_funcs["temp_Instructions_register_data"] = nil; h_funcs["constant_multiplier"] = 4.294967296E9; -- static h_funcs["format_blob"] = (function(blob) blob = string.gsub(blob, 'z', '!!!!!') return string.gsub(blob, '.....', setmetatable({}, { __index = function(tbl, key) local a, b, c, d, e = string.byte(key, 1, 5) local floating_key = ((e - 33) + (d - 33) * 85 + (c - 33) * 7225 + (b - 33) * 614125 + (a - 33) * 52200625) a = floating_key % 256; floating_key = floating_key / 256; floating_key = (floating_key - floating_key % 1) b = (floating_key % 256) floating_key = (floating_key / 256) floating_key = (floating_key - floating_key % 1) c = (floating_key % 256) floating_key = (floating_key / 256) floating_key = (floating_key - floating_key % 1) d = (floating_key % 256) floating_key = (floating_key / 256) floating_key = floating_key - floating_key % 1; local decoded_byte = (string.char(d) .. string.char(c) .. string.char(b) .. string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+X[^&"Y(5rL^$Km"U/-7"\^9I"c!.,,p`^]O9['`)_J8t/Ou01/M.kE"XtfF'a7hG'eKbM"n2XH4U(D\:n-1HJ"T]u6'a5ID"n2XH"f)2W7,8(7&A8Ac%fcS0!!!Pe3lG99UG@,!e9W?KA1YER"HQ-+.a/7<[CXfe?Y1l]7AVL+^NmK#IPz!.[PSZV$R;b_uU#F%5A"i-QN?o0-(0!zzz!!!"Z!!!!,!!!!3!!!!"z!<<*"]=], 5)) h_funcs["pre_calculated_xor_tbl"] = setmetatable({ [0] = { [0] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, { [0] = 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14 }, { [0] = 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13 }, { [0] = 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 }, { [0] = 4, 5, 6, 7, 0, 1, 2, 3, 12, 13, 14, 15, 8, 9, 10, 11 }, { [0] = 5, 4, 7, 6, 1, 0, 3, 2, 13, 12, 15, 14, 9, 8, 11, 10 }, { [0] = 6, 7, 4, 5, 2, 3, 0, 1, 14, 15, 12, 13, 10, 11, 8, 9 }, { [0] = 7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8 }, { [0] = 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7 }, { [0] = 9, 8, 11, 10, 13, 12, 15, 14, 1, 0, 3, 2, 5, 4, 7, 6 }, { [0] = 10, 11, 8, 9, 14, 15, 12, 13, 2, 3, 0, 1, 6, 7, 4, 5 }, { [0] = 11, 10, 9, 8, 15, 14, 13, 12, 3, 2, 1, 0, 7, 6, 5, 4 }, { [0] = 12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3 }, { [0] = 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2 }, { [0] = 14, 15, 12, 13, 10, 11, 8, 9, 6, 7, 4, 5, 2, 3, 0, 1 }, { [0] = 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 } }, { ["__index"] = function(tbl, key) local p = setmetatable({ [0] = key, [key] = 0 }, h_funcs["meta_tbl_generate_xor"](key)) tbl[key] = p return unpack({p}) end }) h_funcs["meta_tbl_generate_xor"] = (function(a) return { ["__index"] = function(tbl, b) local a_reamining, xor_result, multiplier, b_reamining; a_reamining = a xor_result = 0 multiplier = 1 b_reamining = b; while a_reamining > 0 and b_reamining > 0 do local a_digit = (a_reamining % 16) local b_digit = (b_reamining % 16) xor_result = xor_result + h_funcs["pre_calculated_xor_tbl"][a_digit][b_digit] * multiplier; a_reamining = ((a_reamining - a_digit) / 16) b_reamining = ((b_reamining - b_digit) / 16) multiplier = multiplier * 16 end; local res = (xor_result + (a_reamining + b_reamining) * multiplier) tbl[b] = res h_funcs["pre_calculated_xor_tbl"][b][a] = (res) return unpack({res}) end } end) h_funcs["upvalues"] = {} h_funcs["bit.lshift"] = (_bit and _bit.lshift); h_funcs["vm_metadata"] = {} -- maybe alternative stack??? h_funcs["XOR"] = XOR or function(a, b) return h_funcs["pre_calculated_xor_tbl"][a % h_funcs["constant_multiplier"]][b % h_funcs["constant_multiplier"]] end; h_funcs["bit.rshift"]= (_bit and _bit.rshift) h_funcs["bit.rshift"]= h_funcs["bit.rshift"]or function(a, b) if b >= 32 then return 0 end; if b < 0 then return h_funcs["bit.lshift"](a, - b) end; local res = (a % h_funcs["constant_multiplier"] / h_funcs["2_power_tbl_calculated"][b]) return res - res % 1 end; h_funcs["MAX_INT"] = 2.147483648E9 h_funcs["2_power_tbl_calculated"] = { [0] = 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296 } h_funcs["extract_bits"] = function(value, width, offset) local res = ((value / h_funcs["2_power_tbl_calculated"][offset]) % h_funcs["2_power_tbl_calculated"][width]) --[[res = res - res % 1; return res]] return math.floor(res) end; h_funcs["gBits8"] = (function() local a = string.byte(h_funcs["format_blob"], h_funcs["DIP_BLOB_IDX"], h_funcs["DIP_BLOB_IDX"]) h_funcs["DIP_BLOB_IDX"] = (h_funcs["DIP_BLOB_IDX"] + 1) return a end) h_funcs["gBits32"] = function() local a, b, c, d = string.byte(h_funcs["format_blob"], h_funcs["DIP_BLOB_IDX"], h_funcs["DIP_BLOB_IDX"] + 3) h_funcs["DIP_BLOB_IDX"] = (h_funcs["DIP_BLOB_IDX"] + 4) return d * 16777216 + c * 65536 + b * 256 + a end; h_funcs["gInt"] = function() local low = h_funcs["gBits32"]() local high = h_funcs["gBits32"]() if high >= h_funcs["MAX_INT"] then high = high - h_funcs["constant_multiplier"] end local result = high * h_funcs["constant_multiplier"] + low return unpack({unpack({ result }) }) end h_funcs["gFloat"] = function() local Left, Right, Sign, Mantissa, Exponent, IsNormal; Left, Right = h_funcs["gBits32"](), h_funcs["gBits32"]() if Left == 0 and Right == 0 then return unpack({0}) end Sign, Mantissa, Exponent = (-1) ^ h_funcs["extract_bits"](Right, 1, 31), h_funcs["extract_bits"](Right, 20, 0) * 4294967296 + Left, h_funcs["extract_bits"](Right, 11, 20) IsNormal = 1 -- some case checks removed here, not used im this code. return Sign * (2 ^ (Exponent - 1023)) * (Mantissa / (2 ^ 52) + IsNormal) end; h_funcs["gVarInt"] = function() local value, multiplier = 0, 1; repeat local byte_value = string.byte(h_funcs["format_blob"], h_funcs["DIP_BLOB_IDX"], h_funcs["DIP_BLOB_IDX"]) value = (value + ((byte_value > 127 and byte_value - 128 or byte_value) * multiplier)) multiplier = (multiplier * 128) h_funcs["DIP_BLOB_IDX"] = h_funcs["DIP_BLOB_IDX"] + 1 until byte_value < 128; return unpack({value}) end; h_funcs["temp_cached_constants"] = nil; h_funcs["unpack_gVarInt"] = function() return unpack({h_funcs["gVarInt"]()}) end h_funcs["gString"] = function() local str_len = h_funcs["gVarInt"]() h_funcs["DIP_BLOB_IDX"] = h_funcs["DIP_BLOB_IDX"] + str_len return string.sub(h_funcs["format_blob"], h_funcs["DIP_BLOB_IDX"] - str_len, h_funcs["DIP_BLOB_IDX"] - 1) end; h_funcs["generate_tbl"] = function(...) local count = select('#', ...) if count == 0 then return count, h_funcs["empty_tbl"] end; return count, { ... } end; h_funcs["temp_cached_decoded_instructions"] = nil; h_funcs["VM"] = (function(EXECUTION_DATA, enclosing_func_upvalues) local Stk_size = EXECUTION_DATA[6] local line_debugging_data = EXECUTION_DATA[11] local Insts = EXECUTION_DATA[3] local REG_B = EXECUTION_DATA[4] local REG_A = EXECUTION_DATA[5] local decrypted_constants = EXECUTION_DATA[8] local constants = EXECUTION_DATA[9] local function_prototypes = EXECUTION_DATA[7] local REG_C = EXECUTION_DATA[10] local call_vm = function(...) VM_ITERATION = VM_ITERATION + 1 local Stk = h_funcs["gen_empty_tbl"](Stk_size) local Top = 1 local VIP = 1 local shared_upvalues = nil local UNK_TBL_IDX, some_global_maybe_TOP_like, UNK_TBL = nil, nil, nil -- Still UNK? local n_args, args = h_funcs["generate_tbl"](...) local processed_args= 0 local arg_idx = 1 local vm_env = getfenv() local success, err_and_is_closure, closure_index, ARGS_FLAG = _pcall(function() repeat local Enum = Insts[VIP] if Enum == 44 then -- OP_NIL Stk[REG_B[VIP]] = nil elseif Enum == 42 then -- LOAD_ARGS for idx = 1, REG_C[VIP] --[[PCount]], 1 do Stk[idx] = args[idx] end elseif Enum == 46 then -- OP_CALL local A, B, C = REG_A[VIP], REG_B[VIP], REG_C[VIP] if B ~= 0 then Top = (A + B - 1) end; local limit, results; if B ~= 1 then limit, results = h_funcs["generate_tbl"](Stk[A](h_funcs["safe_tbl_unpack"](Stk, Top, A + 1))) else limit, results = h_funcs["generate_tbl"](Stk[A]()) end; if C ~= 1 then if C == 0 then limit = limit + A - 1; Top = limit else limit = A + C - 2; Top = limit + 1 end; local jdx = 0 for idx = A, limit do jdx = jdx + 1; Stk[idx] = results[jdx] end else Top = A - 1 end elseif Enum == 45 then -- LOAD_DECRYPTED_STRING Stk[REG_C[VIP]] = decrypted_constants[VIP] elseif Enum == 47 then -- OP_MUL Stk[REG_B[VIP]] = Stk[REG_C[VIP]] * Stk[REG_A[VIP]] elseif Enum == 48 then -- UNK_LOAD Stk[REG_C[VIP]] = enclosing_func_upvalues[REG_A[VIP]][decrypted_constants[VIP]] elseif Enum == 36 then -- UNK local B = REG_B[VIP] local next_tbl_idx, value = next(UNK_TBL, UNK_TBL_IDX) if next_tbl_idx then Stk[B + 1] = next_tbl_idx Stk[B + 2] = value; VIP = REG_A[VIP] UNK_TBL_IDX = next_tbl_idx end elseif Enum == 38 then -- OP_SETUPVAL Stk[REG_A[VIP]][function_prototypes[VIP]] = Stk[REG_B[VIP]] elseif Enum == 37 then -- UNK_JMP local F = (false) some_global_maybe_TOP_like = (some_global_maybe_TOP_like + UNK_TBL_IDX) if UNK_TBL_IDX <= 0 then F = some_global_maybe_TOP_like >= UNK_TBL else F = some_global_maybe_TOP_like <= UNK_TBL end; if not (F) then else Stk[REG_B[VIP] + 3] = some_global_maybe_TOP_like VIP = REG_A[VIP] end elseif Enum == 39 then -- OP_JMP VIP = REG_B[VIP] elseif Enum == 41 then -- OP_GETGLOBAL Stk[REG_A[VIP]] = vm_env[function_prototypes[VIP]] elseif Enum == 33 then -- NOT_EQ if Stk[REG_B[VIP]] ~= Stk[REG_C[VIP]] then VIP = REG_A[VIP] end elseif Enum == 35 then -- OP_SELF local upval = enclosing_func_upvalues[REG_A[VIP]] upval[2][upval[1]] = Stk[REG_B[VIP]] elseif Enum == 34 then -- LOAD_ARGS processed_args = REG_A[VIP] for idx = 1, processed_args do Stk[idx] = args[idx] end; arg_idx = (processed_args + 1) elseif Enum == 32 then -- OP_GETUPVAL local upval = enclosing_func_upvalues[REG_A[VIP]]; Stk[REG_B[VIP]] = upval[2][upval[1]] elseif Enum == 30 then -- LOAD_STK Stk[REG_B[VIP]] = Stk elseif Enum == 29 then -- OP_JMP VIP = REG_B[VIP] -- ironbrew JMP elseif Enum == 28 then -- OP_CONCAT Stk[REG_A[VIP]] = (Stk[REG_C[VIP]] .. Stk[REG_B[VIP]]) elseif Enum == 27 then -- OP_MUL Stk[REG_B[VIP]] = function_prototypes[VIP] * Stk[REG_A[VIP]] elseif Enum == 25 then -- OP_LEN Stk[REG_C[VIP]] = #Stk[REG_A[VIP]] elseif Enum == 26 then -- OP_MOD Stk[REG_A[VIP]] = Stk[REG_B[VIP]] % function_prototypes[VIP] elseif Enum == 24 then -- OP_DIV Stk[REG_B[VIP]] = Stk[REG_C[VIP]] / constants[VIP] elseif Enum == 17 then -- OP_CALL Top = REG_C[VIP] Stk[Top] = Stk[Top]() elseif Enum == 16 then -- IS_NOT_TRUE if not (not Stk[REG_B[VIP]]) then else VIP = REG_C[VIP] end elseif Enum == 15 then -- LOAD_REG_C Stk[REG_C[VIP]] = REG_C elseif Enum == 14 then -- OP_LT if not (constants[VIP] < Stk[REG_B[VIP]]) then VIP = REG_C[VIP] end elseif Enum == 13 then -- OP_GETTABLE Stk[REG_A[VIP]] = Stk[REG_C[VIP]][Stk[REG_B[VIP]]] elseif Enum == 12 then -- OP_POW Stk[REG_B[VIP]] = Stk[REG_C[VIP]] ^ Stk[REG_A[VIP]] elseif Enum == 20 then -- XOR Stk[REG_B[VIP]] = (h_funcs["XOR"](Stk[REG_C[VIP]], Stk[REG_A[VIP]])) elseif Enum == 19 then -- SET_METADATA h_funcs["vm_metadata"][REG_B[VIP]] = Stk[REG_C[VIP]] elseif Enum == 18 then -- LOAD_TBL local B, A = REG_B[VIP], REG_A[VIP] local tbl = Stk[B] for Idx = 1, Top - B do tbl[A + Idx] = Stk[B + Idx] end elseif Enum == 22 then -- OP_CALL local C = REG_C[VIP] Stk[C] = Stk[C](Stk[C + 1], Stk[C + 2]) Top = (C) elseif Enum == 21 then -- OP_RETURN return elseif Enum == 0 then -- OP_MUL Stk[REG_B[VIP]] = Stk[REG_C[VIP]] * constants[VIP] elseif Enum == 1 then -- OP_LE if not (decrypted_constants[VIP] <= Stk[REG_A[VIP]]) then VIP = REG_C[VIP] end elseif Enum == 2 then -- LOAD_METADATA Stk[REG_A[VIP]] = h_funcs["vm_metadata"][REG_B[VIP]] elseif Enum == 5 then -- CALL_TOP Top = REG_A[VIP] Stk[Top]() Top = Top - 1 elseif Enum == 4 then -- OP_CALL local C = (REG_C[VIP]); Stk[C] = Stk[C](Stk[C + 1]) Top = C elseif Enum == 3 then -- OP_CALL local C = REG_C[VIP] Top = (C + REG_A[VIP] - 1); Stk[C](h_funcs["safe_tbl_unpack"](Stk, Top, C + 1)) Top = (C - 1) elseif Enum == 7 then -- OP_EQ Stk[REG_A[VIP]] = (Stk[REG_B[VIP]] == Stk[REG_C[VIP]]) elseif Enum == 8 then -- OP_MOD Stk[REG_C[VIP]] = Stk[REG_B[VIP]] % Stk[REG_A[VIP]] elseif Enum == 10 then -- OP_MOV Stk[REG_B[VIP]] = Stk[REG_A[VIP]] elseif Enum == 11 then -- UNK_LOAD local C, B = REG_C[VIP], Stk[REG_B[VIP]] Stk[C + 1] = B; Stk[C] = B[constants[VIP]] elseif Enum == 89 then --OP_NOP elseif Enum == 90 then -- OP_MOD Stk[REG_B[VIP]] = (function_prototypes[VIP] % constants[VIP]) elseif Enum == 91 then -- OP_DIV Stk[REG_A[VIP]] = (Stk[REG_B[VIP]] / Stk[REG_C[VIP]]) elseif Enum == 86 then -- OP_UNM Stk[REG_A[VIP]] = -Stk[REG_B[VIP]] elseif Enum == 87 then -- OP_CALL local B = (REG_B[VIP]); Stk[B](Stk[B + 1], Stk[B + 2]) Top = B - 1 elseif Enum == 94 then -- UNK_LOAD_CHAR Stk[REG_A[VIP]] = enclosing_func_upvalues[REG_C[VIP]][Stk[REG_B[VIP]]] elseif Enum == 92 then -- UNK_LOAD_FUNCTION Stk[REG_C[VIP]] = enclosing_func_upvalues[REG_A[VIP]] elseif Enum == 98 then -- OP_SUB Stk[REG_C[VIP]] = Stk[REG_A[VIP]] - Stk[REG_B[VIP]] elseif Enum == 79 then -- UNK_JMP Top = REG_A[VIP] some_global_maybe_TOP_like = Stk[Top] UNK_TBL = Stk[Top + 1] UNK_TBL_IDX = Stk[Top + 2] VIP = REG_C[VIP] elseif Enum == 74 then -- NOT_EQ if Stk[REG_C[VIP]] ~= constants[VIP] then VIP = REG_B[VIP] end elseif Enum == 76 then -- PREPARE_ARGS_FOR_CLOSURE local number_of_args_to_process, processed_arg_functions_idx = n_args - processed_args - 1, 0; if number_of_args_to_process < 0 then number_of_args_to_process = -1 end; local C = REG_C[VIP] for idx = C, C + number_of_args_to_process do Stk[idx] = args[arg_idx + processed_arg_functions_idx] processed_arg_functions_idx = processed_arg_functions_idx + 1 end Top = C + number_of_args_to_process elseif Enum == 75 then -- DECRYPT Stk[REG_C[VIP]] = Stk[REG_A[VIP]][decrypted_constants[VIP]] elseif Enum == 80 then -- OP_SETUPVAL enclosing_func_upvalues[REG_B[VIP]][Stk[REG_A[VIP]]] = Stk[REG_C[VIP]] elseif Enum == 83 then -- OP_GETUPVAL local Upvals = enclosing_func_upvalues[REG_C[VIP]]; Upvals[2][Upvals[1]][Stk[REG_B[VIP]]] = Stk[REG_A[VIP]] elseif Enum == 84 then -- OP_GETGLOBAL Stk[REG_A[VIP]] = vm_env[function_prototypes[VIP]] elseif Enum == 85 then -- OP_NEWTABLE Stk[REG_C[VIP]] = {} elseif Enum == 51 then -- OP_GETUPVAL local Upvals = (enclosing_func_upvalues[REG_C[VIP]]); Stk[REG_B[VIP]] = Upvals[2][Upvals[1]][Stk[REG_A[VIP]]] elseif Enum == 50 then -- OP_SETTABLE Stk[REG_B[VIP]][Stk[REG_C[VIP]]] = Stk[REG_A[VIP]] elseif Enum == 49 then -- OP_CALL, calls --print("Hello World!") local B = REG_B[VIP]; Stk[B](Stk[B + 1]) Top = B - 1 elseif Enum == 53 then -- OP_SUB Stk[REG_B[VIP]] = Stk[REG_C[VIP]] - constants[VIP] elseif Enum == 54 then -- OP_ADD Stk[REG_B[VIP]] = function_prototypes[VIP] + Stk[REG_A[VIP]] elseif Enum == 52 then -- LOAD_LAST_ARG Stk[REG_A[VIP]] = args[arg_idx] elseif Enum == 59 then -- LOAD_DESERIALIZE_K Stk[REG_B[VIP]][function_prototypes[VIP]] = constants[VIP] elseif Enum == 60 then -- EXECUTE_CLOSURE local B = REG_B[VIP] Top = B + 1 return true, B, 2 elseif Enum == 58 then -- OP_RETURN local B = REG_B[VIP] return false, B, B elseif Enum == 55 then -- IS_TRUE if Stk[REG_C[VIP]] then VIP = (REG_A[VIP]) end elseif Enum == 57 then -- OP_LT if not (Stk[REG_B[VIP]] < constants[VIP]) then VIP = REG_C[VIP] end elseif Enum == 56 then -- OP_CLOSURE local closure_prototype = function_prototypes[VIP] local closure_upvalue_data = closure_prototype[2] local n_upvalues = #closure_upvalue_data; local Upvalues = n_upvalues > 0 and {} local new_closure_vm = h_funcs["VM"](closure_prototype, Upvalues); setfenv(new_closure_vm, vm_env); Stk[REG_A[VIP]] = new_closure_vm if Upvalues then for idx = 1, n_upvalues do local upvalue = closure_upvalue_data[idx] local upvalue_type = upvalue[2] local upvalue_idx = upvalue[1] if upvalue_type == IN_STACK then if not shared_upvalues then shared_upvalues = {} -- global variable for shared variables, this works like a cache end; local shared_upvalue = shared_upvalues[upvalue_idx] if not shared_upvalue then shared_upvalue = ({ [1] = upvalue_idx, [2] = Stk }); shared_upvalues[upvalue_idx] = shared_upvalue end Upvalues[idx - 1] = shared_upvalue elseif upvalue_type == IS_COPIED then Upvalues[idx - 1] = Stk[upvalue_idx] else -- UPVALUE FROM ENCLOSING FUNCTION! Upvalues[idx - 1] = enclosing_func_upvalues[upvalue_idx] end end end elseif Enum == 69 then -- LOAD_INSTS Stk[REG_C[VIP]] = Insts elseif Enum == 68 then -- UNK_JMP local B = REG_B[VIP] UNK_TBL_IDX = Stk[B + 2] + 0 UNK_TBL = Stk[B + 1] + 0; some_global_maybe_TOP_like = Stk[B] - UNK_TBL_IDX VIP = REG_A[VIP] elseif Enum == 67 then -- OP_ADD Stk[REG_B[VIP]] = Stk[REG_A[VIP]] + Stk[REG_C[VIP]] elseif Enum == 71 then -- OP_ADD Stk[REG_B[VIP]] = Stk[REG_C[VIP]] + constants[VIP] elseif Enum == 73 then -- OP_RETURN return false, REG_C[VIP], Top elseif Enum == 72 then -- OP_CALL local B = (REG_B[VIP]); Stk[B] = Stk[B](h_funcs["safe_tbl_unpack"](Stk, Top, B + 1)) Top = B elseif Enum == 64 then -- OP_LT Stk[REG_C[VIP]] = Stk[REG_A[VIP]] < Stk[REG_B[VIP]] elseif Enum == 66 then -- OP_CALL local C = REG_C[VIP] Top = C + REG_A[VIP] - 1 Stk[C] = Stk[C](h_funcs["safe_tbl_unpack"](Stk, Top, C + 1)) Top = C elseif Enum == 65 then -- OP_EQ if Stk[REG_B[VIP]] == Stk[REG_A[VIP]] then VIP = REG_C[VIP] end elseif Enum == 62 then -- XOR Stk[REG_C[VIP]] = h_funcs["XOR"](Stk[REG_A[VIP]], decrypted_constants[VIP]) elseif Enum == 63 then -- OP_RETURN local B = REG_B[VIP] return false, B, B + REG_A[VIP] - 2 elseif Enum == 61 then return true, REG_C[VIP], 0 end VIP = VIP + 1 until false end) if not (success) then -- Error handling if shared_upvalues then for upval_idx, upval_data, t in next, shared_upvalues do if upval_idx >= 1 then (upval_data)[2] = (upval_data); (upval_data)[3] = (Stk[upval_idx]); (upval_data)[1] = 3 shared_upvalues[upval_idx] = nil end end end; if type(err_and_is_closure) ~= 'string' then error(err_and_is_closure, 0) else if not (string.match(err_and_is_closure, ":(%d+)[:\r\n]")) then error(err_and_is_closure, 0) else error('Luraph Script:' .. (line_debugging_data[VIP] or '(internal)') .. ': ' .. tostring(err_and_is_closure), 0) end end else if err_and_is_closure then -- Dispatch of closure handeling local NO_ARGS = 1 if ARGS_FLAG ~= NO_ARGS then return Stk[closure_index](h_funcs["safe_tbl_unpack"](Stk, Top, closure_index + 1)) else return Stk[closure_index]() end else -- Return handeling if (closure_index) then return h_funcs["safe_tbl_unpack"](Stk, ARGS_FLAG, closure_index) end end end end; return call_vm end) h_funcs["get_next_func_instructions"] = (function() local n_possible_instructions = h_funcs["gVarInt"]() local output = { nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil } local idx = 1 local decoded_Instructions = h_funcs["gen_empty_tbl"](n_possible_instructions) for i = 1, n_possible_instructions, 1 do local Instruction = h_funcs["gVarInt"]() if h_funcs["temp_cached_decoded_instructions"][Instruction] then decoded_Instructions[i] = (h_funcs["temp_cached_decoded_instructions"][Instruction]) else local base_part = (Instruction / 4) local decoded_data = ({ [1] = math.floor(base_part), [2] = Instruction % 4 }) h_funcs["temp_cached_decoded_instructions"][Instruction] = decoded_data decoded_Instructions[i] = decoded_data end end local n_Instructions = h_funcs["gVarInt"]() - 58516 output[2] = decoded_Instructions output[3] = h_funcs["gen_empty_tbl"](n_Instructions) output[4] = h_funcs["gen_empty_tbl"](n_Instructions) output[5] = h_funcs["gen_empty_tbl"](n_Instructions) output[7] = h_funcs["gen_empty_tbl"](n_Instructions) output[8] = h_funcs["gen_empty_tbl"](n_Instructions); output[9] = h_funcs["gen_empty_tbl"](n_Instructions) output[10] = h_funcs["gen_empty_tbl"](n_Instructions) local line_debugging_data = {} for Ins_idx = 1, n_Instructions do local raw_reg_C_data = h_funcs["unpack_gVarInt"]() local operand_C_mode = raw_reg_C_data % 8; local raw_reg_A_data = h_funcs["unpack_gVarInt"]() local operand_A_mode = raw_reg_A_data % 8; local raw_reg_B_data = h_funcs["unpack_gVarInt"]() local REG_A = ((raw_reg_A_data - operand_A_mode) / 8) local Instruction_Enum = h_funcs["unpack_gVarInt"]() local REG_C = ((raw_reg_C_data - operand_C_mode) / 8) local operand_b_mode = raw_reg_B_data % 8; local REG_B = ((raw_reg_B_data - operand_b_mode) / 8) output[10][Ins_idx] = REG_C output[4][Ins_idx] = REG_B output[5][Ins_idx] = REG_A output[3][Ins_idx] = Instruction_Enum local IS_CONSTANT = 0 local IS_REGISTER_INDEX = 7 local IS_RELATIVE_FORWARD = 1 local IS_RELATIVE_BACKWARDS = 4 local IS_CLOSURE_DATA = 2 -- only C register if operand_b_mode == IS_CONSTANT then if not (h_funcs["is_constant_cached"]) then output[8][Ins_idx] = h_funcs["temp_cached_constants"][REG_B] else local constant = h_funcs["temp_cached_constants"][REG_B] local n_constant = #constant constant[n_constant + 1] = output constant[n_constant + 2] = Ins_idx constant[n_constant + 3] = 8 end elseif operand_b_mode == IS_REGISTER_INDEX then output[4][Ins_idx] = REG_B else if operand_b_mode == IS_RELATIVE_FORWARD then (output[4])[Ins_idx] = Ins_idx + REG_B else if operand_b_mode == IS_RELATIVE_BACKWARDS then output[4][Ins_idx] = Ins_idx - REG_B end end end if operand_C_mode == IS_CONSTANT then if h_funcs["is_constant_cached"] then local constant = h_funcs["temp_cached_constants"][REG_C] local n_constant = #constant constant[n_constant + 1] = output constant[n_constant + 2] = Ins_idx constant[n_constant + 3] = 7; else output[7][Ins_idx] = h_funcs["temp_cached_constants"][REG_C] end elseif operand_C_mode == IS_REGISTER_INDEX then output[10][Ins_idx] = REG_C elseif operand_C_mode == IS_RELATIVE_FORWARD then output[10][Ins_idx] = Ins_idx + REG_C elseif operand_C_mode == IS_RELATIVE_BACKWARDS then (output[10])[Ins_idx] = (Ins_idx - REG_C) else if operand_C_mode == IS_CLOSURE_DATA then local offset = #(h_funcs["temp_Instructions_register_data"]) h_funcs["temp_Instructions_register_data"][offset + 1] = output[7] h_funcs["temp_Instructions_register_data"][offset + 2] = Ins_idx h_funcs["temp_Instructions_register_data"][offset + 3] = REG_C end end; if operand_A_mode == IS_CONSTANT then if not (h_funcs["is_constant_cached"]) then output[9][Ins_idx] = h_funcs["temp_cached_constants"][REG_A] else local constant = h_funcs["temp_cached_constants"][REG_A] local n_constant = #constant constant[n_constant + 1] = output constant[n_constant + 2] = Ins_idx constant[n_constant + 3] = 9 end elseif operand_A_mode == IS_REGISTER_INDEX then output[5][Ins_idx] = REG_A elseif operand_A_mode == IS_RELATIVE_FORWARD then output[5][Ins_idx] = (Ins_idx + REG_A) else if operand_A_mode == IS_RELATIVE_BACKWARDS then output[5][Ins_idx] = Ins_idx - REG_A end end end; -- stk_size output[6] = h_funcs["gVarInt"]() -- not important? output[11] = line_debugging_data for line = 1, h_funcs["gBits32"]() do local a = h_funcs["gBits32"]() local b = (a / 2) if a % 2 == 0 then line_debugging_data[idx] = b - b % 1 else idx = h_funcs["gBits32"]() local line_number = h_funcs["gBits32"]() for i = b - b % 1, idx do line_debugging_data[i] = line_number end end idx = idx + 1; end output[1] = h_funcs["gVarInt"]() -- UNK?? return unpack({output}) end) for idx = 0, 15 do setmetatable(h_funcs["pre_calculated_xor_tbl"][idx], h_funcs["meta_tbl_generate_xor"](idx)) end; local Deserialize = (function() h_funcs["temp_cached_decoded_instructions"] = {} local n_constants = h_funcs["gVarInt"]() - 231 h_funcs["temp_cached_constants"] = h_funcs["gen_empty_tbl"](n_constants) local is_constant_cached = h_funcs["gBits8"]() ~= 0 h_funcs["is_constant_cached"] = is_constant_cached for idx = 1, n_constants do local data; local type = h_funcs["gBits8"]() local IS_FLOAT = (type == 87) local IS_BOOL = (type < 87) local IS_STRING = (type == 216) if IS_FLOAT then data = h_funcs["gFloat"]() elseif IS_BOOL then data = (h_funcs["gBits8"]() == 1) elseif IS_STRING then data = h_funcs["gString"]() else data = h_funcs["gInt"]() end; if data == "__tostring" then data = "" end -- Bypass if is_constant_cached then h_funcs["temp_cached_constants"][idx] = ({ [0] = data }) else h_funcs["temp_cached_constants"][idx] = data end end local n_prototypes = h_funcs["gVarInt"]() - 14954 local Prototypes = h_funcs["gen_empty_tbl"](n_prototypes) h_funcs["temp_Instructions_register_data"] = h_funcs["gen_empty_tbl"](n_prototypes * 3) -- *3 because REG A, B and C for idx = 1, n_prototypes do Prototypes[idx] = h_funcs["get_next_func_instructions"]() end for idx = 1, #h_funcs["temp_Instructions_register_data"], 3 do h_funcs["temp_Instructions_register_data"][idx][h_funcs["temp_Instructions_register_data"][idx + 1]] = Prototypes[h_funcs["temp_Instructions_register_data"][idx + 2]] end; if is_constant_cached then h_funcs["vm_metadata"][3] = h_funcs["temp_cached_constants"] h_funcs["vm_metadata"][1] = Prototypes; end local entry_prototype_idx = h_funcs["gVarInt"]() local res = Prototypes[entry_prototype_idx] h_funcs["temp_cached_constants"] = nil; h_funcs["temp_Instructions_register_data"] = nil h_funcs["temp_cached_decoded_instructions"] = nil; return unpack({res}) end) local execute_first_arg = (function(...) return (...)() end) local deserializing_vm_execution_data = Deserialize() local deserialized_execution_data = h_funcs["VM"]( deserializing_vm_execution_data, h_funcs["upvalues"] )( Deserialize, Self.nil_self_index, h_funcs["get_self_index"], execute_first_arg, h_funcs["gFloat"], h_funcs["gBits8"], h_funcs["gBits32"], Self.control_flow_tbl, nil, h_funcs["VM"] ) is_real_vm = true local real_ret = unpack({ h_funcs["VM"](deserialized_execution_data, h_funcs["upvalues"]) }) return real_ret end) }):main()(...);