local a={}local b={}local c=0;local d,e=clonefunction(hookfunction),clonefunction(newcclosure)local f=function(g)for h,i in pairs(getmetatable(getfenv()))do for h,i in pairs(i)do if i==g then return h end end end end;local function j(k)if k==nil then k=1 end;local l={}for h=1,k do table.insert(l,"arg"..h)end;return table.concat(l,", ")end;a.newcclosure=clonefunction(newcclosure)local m;m=d(newcclosure,e(function(g)b[tostring(c)]=g;return m(g)end))a.hookfunction=clonefunction(hookfunction)local n;n=d(hookfunction,e(function(o,p)local q="hf"..tostring(c)local r=f(o)or"unknown_function"local s=iscclosure(p)local t=debug.getinfo(p)or{}local u="nil"local v=tonumber(t.nparams or t.numparams or 1)local l=j(v)if s==false then local w={}for h,i in ipairs(debug.getconstants(p))do table.insert(w,string.format("-- C_%d = %s",h,typeof(i)=="string"and string.format("%q",i)or tostring(i)))end;u=string.format([[function(%s) -- Constants : %s return %s(...) end]],l,table.concat(w,"\n "),q)end;if s==true then local l=j(tonumber(debug.getinfo(b[tostring(c)]).numparams))local x={}for h,i in ipairs(debug.getconstants(b[tostring(c)]))do table.insert(x,string.format("-- C_%d = %s",h,typeof(i)=="string"and string.format("%q",i)or tostring(i)))end;u=string.format([[newcclosure(function(%s) -- Constants : %s return %s(%s) end)]],l,table.concat(x,"\n "),q,l)end;print(string.format([[ -- Dumped hookfunction local %s; %s = hookfunction(%s, %s) ]],q,q,r,u))c=c+1;return n(o,p)end))