Revert "Fix Built-in Decompiler Timeout"

This reverts commit dd44825bd6.
This commit is contained in:
phoriah
2024-08-11 19:42:41 +02:00
parent dd44825bd6
commit ef2ac40f2b

View File

@@ -222,7 +222,7 @@ do -- * Load Region of Déjà Vu
end
end
local custom_decompiler
local custom_decompiler, load_decompiler -- TODO Temporary
if getscriptbytecode then
-- Credits @w-a-e
@@ -234,12 +234,13 @@ if getscriptbytecode then
game:HttpGet("https://raw.githubusercontent.com/w-a-e/Advanced-Decompiler-V3/main/init.lua", true)
end)
then
local CONSTANTS = [[
load_decompiler = function(decompTimeout)
local CONSTANTS = [[
local ENABLED_REMARKS = {
NATIVE_REMARK = true,
INLINE_REMARK = true
}
local DECOMPILER_TIMEOUT = 3600
local DECOMPILER_TIMEOUT = ]] .. decompTimeout .. [[
local READER_FLOAT_PRECISION = 7 -- up to 99
local SHOW_INSTRUCTION_LINES = false
@@ -249,28 +250,29 @@ if getscriptbytecode then
local LIST_USED_GLOBALS = true
local RETURN_ELAPSED_TIME = false
]]
local _ENV = (getgenv or getrenv or getfenv)()
local old = _ENV.decompile
local _ENV = (getgenv or getrenv or getfenv)()
local old = _ENV.decompile
local f = loadstring(
string.gsub(
local f = loadstring(
string.gsub(
decompiler_source,
"return %(x %% 2^32%) // %(2^disp%)",
"return math.floor((x %% 2^32) / (2^disp))",
1
), -- TODO Temporary fix for macsploit (// operator)
";;CONSTANTS HERE;;",
CONSTANTS
),
"Advanced-Decompiler-V3"
)
if not f then
return
string.gsub(
decompiler_source,
"return %(x %% 2^32%) // %(2^disp%)",
"return math.floor((x %% 2^32) / (2^disp))",
1
), -- TODO Temporary fix for macsploit (// operator)
";;CONSTANTS HERE;;",
CONSTANTS
),
"Advanced-Decompiler-V3"
)
if not f then
return
end
f()
custom_decompiler = _ENV.decompile
_ENV.decompile = old
end
f()
custom_decompiler = _ENV.decompile
_ENV.decompile = old
end
end
@@ -1910,6 +1912,9 @@ local function synsaveinstance(CustomOptions, CustomOptions2)
end
do
if load_decompiler then
load_decompiler(Timeout)
end
local Decompiler = OPTIONS.decomptype == "custom" and custom_decompiler
or global_container.decompile
or custom_decompiler