Comments (4)
u can achieve it by fixing the original code
Where I can find this fix?
Decompilation of the sample you uploaded:
-- params : ...
-- function num : 0
module("dumper", package.seeall)
require("json")
json_encode = function(l_1_0, l_1_1)
-- function num : 0_0
local l_1_2 = (json.encode)(l_1_0)
if l_1_1 ~= nil and l_1_1 == 1 then
return l_1_2
end
local l_1_3 = ""
local l_1_4 = 1
local l_1_5 = 0
local l_1_6 = 3
local l_1_7 = (string.sub)(l_1_2, l_1_4, 1)
while 1 do
if l_1_4 <= (string.len)(l_1_2) then
do
if l_1_7 == """ and l_1_4 - 1 > 0 and (string.sub)(l_1_2, l_1_4 - 1, l_1_4 - 1) ~= "\" then
if false == true then
local l_1_8, l_1_9, l_1_10, l_1_11, l_1_12 = false
else
end
end
if l_1_7 == ":" and true == false then
l_1_3 = l_1_3 .. " : "
else
-- DECOMPILER ERROR at PC54: Confused about usage of register: R8 in 'UnsetPending'
if l_1_7 == "," and true == false then
l_1_3 = l_1_3 .. ",\n" .. (string.rep)(" ", l_1_5)
else
-- DECOMPILER ERROR at PC69: Confused about usage of register: R8 in 'UnsetPending'
if (l_1_7 == "{" or l_1_7 == "[") and true == false then
if l_1_4 - 1 > 0 and (string.sub)(l_1_2, l_1_4 - 1, l_1_4 - 1) ~= ":" and (string.sub)(l_1_2, l_1_4 - 1, l_1_4 - 1) ~= "," then
l_1_3 = l_1_3 .. "\n" .. (string.rep)(" ", l_1_5)
end
l_1_3 = l_1_3 .. l_1_7 .. "\n" .. (string.rep)(" ", l_1_5 + l_1_6)
l_1_5 = l_1_5 + l_1_6
else
-- DECOMPILER ERROR at PC113: Confused about usage of register: R8 in 'UnsetPending'
if (l_1_7 == "}" or l_1_7 == "]") and true == false then
if l_1_5 - l_1_6 >= 0 then
l_1_5 = l_1_5 - l_1_6
else
l_1_5 = 0
end
if (string.sub)(l_1_2, l_1_4 + 1, l_1_4 + 1) == "," then
l_1_4 = l_1_4 + 1
l_1_3 = l_1_3 .. "\n" .. (string.rep)(" ", l_1_5) .. l_1_7 .. ",\n"
else
l_1_3 = l_1_3 .. "\n" .. (string.rep)(" ", l_1_5) .. l_1_7 .. "\n"
end
l_1_3 = l_1_3 .. (string.rep)(" ", l_1_5)
else
l_1_3 = l_1_3 .. l_1_7
end
end
end
end
l_1_4 = l_1_4 + 1
l_1_7 = (string.sub)(l_1_2, l_1_4, l_1_4)
-- DECOMPILER ERROR at PC170: LeaveBlock: unexpected jumping out DO_STMT
-- DECOMPILER ERROR at PC170: LeaveBlock: unexpected jumping out IF_THEN_STMT
-- DECOMPILER ERROR at PC170: LeaveBlock: unexpected jumping out IF_STMT
end
end
end
return l_1_3
end
dumpTable = function(l_2_0, l_2_1)
-- function num : 0_1
print(json_encode(l_2_0, l_2_1))
end
if you need ,i could send u the luadec which i fixed ,but because of my spare time consumption, may be u should put a price on it
from luadec.
I have the same problem:
dumper.zip
from luadec.
@testuser7 i had decompiled successfully the sample which you uploaded , u can achieve it by fixing the original code
from luadec.
u can achieve it by fixing the original code
Where I can find this fix?
from luadec.
Related Issues (20)
- cannot success work when luac debug infor is stripped HOT 1
- ProcessCode: Assertion `0' failed. HOT 1
- There is something error when try to decompiling lua 5.1 file HOT 1
- Lua 5.3 decompile issue HOT 1
- OP_CLOSURE decompiles incorrectly if Lua uses non-standard opcode order
- lua5.3 decompilation special case issue HOT 6
- <builtin>: recipe for target 'luaopswap.o' failed make: *** [luaopswap.o] Error 1
- allopcodes-5.2.lua HOT 1
- Command 'luadec' not found on linux
- Segfault on lua5.3
- support lua 5.1 N64 NSO Switch HOT 1
- Heap-buffer-overflow in UnsetPending
- Lua 5.4 support please!
- make error HOT 3
- Provide releases for the most common build targets
- clang-14: error: no such file or directory: '../lua-5.1/src/liblua.a'
- Bad constant in precompiled chunk HOT 1
- mismatch in precompiled chunk
- Please provide releases! HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luadec.