passion for reverse engineering software and operating systems.
i do a little game hacking.
contact me on discord: xgladius#8968
xgladius / luaudec Goto Github PK
View Code? Open in Web Editor NEWDecompiler for luau (https://luau-lang.org/)
Decompiler for luau (https://luau-lang.org/)
[ 86%] Building CXX object CMakeFiles/luauDec.dir/main.cpp.o
In file included from /home/cul8ter/luauDec/Decompiler/Decompile.h:7,
from /home/cul8ter/luauDec/main.cpp:3:
/home/cul8ter/luauDec/Decompiler/BlockGen/include/BlockGen.h:34:38: error: expected ‘)’ before ‘’ token
34 | explicit BlockGen(Proto p, std::vector<AstExpr*> subFuncs);
| ~ ^
| )
/home/cul8ter/luauDec/Decompiler/BlockGen/include/BlockGen.h:35:39: error: expected ‘)’ before ‘’ token
35 | explicit BlockGen(Proto p);
| ~ ^
| )
make[2]: *** [CMakeFiles/luauDec.dir/build.make:76: CMakeFiles/luauDec.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:144: CMakeFiles/luauDec.dir/all] Error 2
make: *** [Makefile:121: all] Error 2
>>> make
[ 0%] Built target Luau.Common
Consolidate compiler generated dependencies of target Luau.VM
[ 24%] Built target Luau.VM
Consolidate compiler generated dependencies of target Luau.Ast
[ 30%] Built target Luau.Ast
Consolidate compiler generated dependencies of target Luau.Compiler
[ 37%] Built target Luau.Compiler
Consolidate compiler generated dependencies of target Luau.Analysis
[ 73%] Built target Luau.Analysis
Consolidate compiler generated dependencies of target luauDec
[ 74%] Building CXX object CMakeFiles/luauDec.dir/main.cpp.o
In file included from
luauDec-main/main.cpp:3:
In file included from
luauDec-main/Decompiler/Decompile.h:7:
In file included from
luauDec-main/Decompiler/BlockGen/include/BlockGen.h:7:
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:37:18: error: use of undeclared identifier 'LOP_FORGLOOP_INEXT'; did you mean 'LOP_FORGPREP_INEXT'?
case LOP_FORGLOOP_INEXT:
^~~~~~~~~~~~~~~~~~
LOP_FORGPREP_INEXT
luauDec-main/Decompiler/../luau/Common/include/Luau/Bytecode.h:294:5: note: 'LOP_FORGPREP_INEXT' declared here
LOP_FORGPREP_INEXT,
^
In file included from
luauDec-main/main.cpp:3:
In file included from
luauDec-main/Decompiler/Decompile.h:7:
In file included from
luauDec-main/Decompiler/BlockGen/include/BlockGen.h:7:
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:39:18: error: use of undeclared identifier 'LOP_FORGLOOP_NEXT'; did you mean 'LOP_FORGPREP_NEXT'?
case LOP_FORGLOOP_NEXT:
^~~~~~~~~~~~~~~~~
LOP_FORGPREP_NEXT
luauDec-main/Decompiler/../luau/Common/include/Luau/Bytecode.h:301:5: note: 'LOP_FORGPREP_NEXT' declared here
LOP_FORGPREP_NEXT,
^
In file included from
luauDec-main/main.cpp:3:
In file included from
luauDec-main/Decompiler/Decompile.h:7:
In file included from
luauDec-main/Decompiler/BlockGen/include/BlockGen.h:7:
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:41:18: error: use of undeclared identifier 'LOP_JUMPIFEQK'; did you mean 'LOP_JUMPIFEQ'?
case LOP_JUMPIFEQK:
^~~~~~~~~~~~~
LOP_JUMPIFEQ
luauDec-main/Decompiler/../luau/Common/include/Luau/Bytecode.h:199:5: note: 'LOP_JUMPIFEQ' declared here
LOP_JUMPIFEQ,
^
In file included from
luauDec-main/main.cpp:3:
In file included from
luauDec-main/Decompiler/Decompile.h:7:
In file included from
luauDec-main/Decompiler/BlockGen/include/BlockGen.h:7:
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:42:18: error: use of undeclared identifier 'LOP_JUMPIFNOTEQK'; did you mean 'LOP_JUMPIFNOTEQ'?
case LOP_JUMPIFNOTEQK:
^~~~~~~~~~~~~~~~
LOP_JUMPIFNOTEQ
luauDec-main/Decompiler/../luau/Common/include/Luau/Bytecode.h:202:5: note: 'LOP_JUMPIFNOTEQ' declared here
LOP_JUMPIFNOTEQ,
^
In file included from
luauDec-main/main.cpp:3:
In file included from
luauDec-main/Decompiler/Decompile.h:7:
In file included from
luauDec-main/Decompiler/BlockGen/include/BlockGen.h:7:
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:41:18: error: duplicate case value 'LOP_JUMPIFEQ'
case LOP_JUMPIFEQK:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:26:18: note: previous case defined here
case LOP_JUMPIFEQ:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:42:18: error: duplicate case value 'LOP_JUMPIFNOTEQ'
case LOP_JUMPIFNOTEQK:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:29:18: note: previous case defined here
case LOP_JUMPIFNOTEQ:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:37:18: error: duplicate case value 'LOP_FORGPREP_INEXT'
case LOP_FORGLOOP_INEXT:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:36:18: note: previous case defined here
case LOP_FORGPREP_INEXT:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:39:18: error: duplicate case value 'LOP_FORGPREP_NEXT'
case LOP_FORGLOOP_NEXT:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:38:18: note: previous case defined here
case LOP_FORGPREP_NEXT:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:100:18: error: use of undeclared identifier 'LOP_JUMPIFEQK'; did you mean 'LOP_JUMPIFEQ'?
case LOP_JUMPIFEQK:
^~~~~~~~~~~~~
LOP_JUMPIFEQ
luauDec-main/Decompiler/../luau/Common/include/Luau/Bytecode.h:199:5: note: 'LOP_JUMPIFEQ' declared here
LOP_JUMPIFEQ,
^
In file included from
luauDec-main/main.cpp:3:
In file included from
luauDec-main/Decompiler/Decompile.h:7:
In file included from
luauDec-main/Decompiler/BlockGen/include/BlockGen.h:7:
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:101:18: error: use of undeclared identifier 'LOP_JUMPIFNOTEQK'; did you mean 'LOP_JUMPIFNOTEQ'?
case LOP_JUMPIFNOTEQK:
^~~~~~~~~~~~~~~~
LOP_JUMPIFNOTEQ
luauDec-main/Decompiler/../luau/Common/include/Luau/Bytecode.h:202:5: note: 'LOP_JUMPIFNOTEQ' declared here
LOP_JUMPIFNOTEQ,
^
In file included from
luauDec-main/main.cpp:3:
In file included from
luauDec-main/Decompiler/Decompile.h:7:
In file included from
luauDec-main/Decompiler/BlockGen/include/BlockGen.h:7:
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:100:18: error: duplicate case value 'LOP_JUMPIFEQ'
case LOP_JUMPIFEQK:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:90:18: note: previous case defined here
case LOP_JUMPIFEQ:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:101:18: error: duplicate case value 'LOP_JUMPIFNOTEQ'
case LOP_JUMPIFNOTEQK:
^
luauDec-main/Decompiler/BlockGen/include/../include/Lifter.h:93:18: note: previous case defined here
case LOP_JUMPIFNOTEQ:
^
12 errors generated.
make[2]: *** [CMakeFiles/luauDec.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/luauDec.dir/all] Error 2
make: *** [all] Error 2
I copied this repository and replaced the entire Luau folder with the new one and that surprisingly worked.
I just had to rename the JsonEncoder Header and add the Config folder to the CMake Mist. And change a few arguments on some of the Ast Constructions on luauDec's end.
However, if I manually feed Luau Bytecode in it, it errors out at some places. But the callstack lead to the files of this Repository's, before they reach the original Luau code.
Which is a good sign, but it's really hard to understand on how to fix it, without knowing what one has to do. It's related to the Ast Generation stuff.
When I attempt to build the program, it throws an error, here is my whole command history.
[naymmm@DESKTOP-OB1AJL ~]$ git clone --recursive https://github.com/xgladius/luauDec.git
Cloning into 'luauDec'...
remote: Enumerating objects: 814, done.
remote: Counting objects: 100% (552/552), done.
remote: Compressing objects: 100% (226/226), done.
remote: Total 814 (delta 147), reused 520 (delta 127), pack-reused 262
Receiving objects: 100% (814/814), 279.45 KiB | 3.17 MiB/s, done.
Resolving deltas: 100% (310/310), done.
Submodule 'luau' (https://www.github.com/roblox/luau) registered for path 'luau'
Cloning into '/home/naymmm/luauDec/luau'...
warning: redirecting to https://github.com/roblox/luau.git/
remote: Enumerating objects: 8837, done.
remote: Counting objects: 100% (8837/8837), done.
remote: Compressing objects: 100% (2319/2319), done.
remote: Total 8837 (delta 6787), reused 8122 (delta 6228), pack-reused 0
Receiving objects: 100% (8837/8837), 9.92 MiB | 4.39 MiB/s, done.
Resolving deltas: 100% (6787/6787), done.
Submodule path 'luau': checked out 'b066e4c8f8851d9727d079935cfa2e0f9b108531'
[naymmm@DESKTOP-OB1AJL ~]$ cd luaudec
-bash: cd: luaudec: No such file or directory
[naymmm@DESKTOP-OB1AJL ~]$ ls
esmBot libvips luauDec yay
[naymmm@DESKTOP-OB1AJL ~]$ cd luauDec
[naymmm@DESKTOP-OB1AJL luauDec]$ ls
CMakeLists.txt Decompiler README.md luau luauDec.png main.cpp
[naymmm@DESKTOP-OB1AJL luauDec]$ cmake . && make
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/sbin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/sbin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at luau/CMakeLists.txt:7 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- Configuring done (10.5s)
-- Generating done (0.1s)
-- Build files have been written to: /home/naymmm/luauDec
[ 0%] Built target Luau.Common
[ 1%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lapi.cpp.o
[ 2%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/laux.cpp.o
[ 3%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lbaselib.cpp.o
[ 4%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lbitlib.cpp.o
[ 5%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lbuiltins.cpp.o
[ 6%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lcorolib.cpp.o
[ 7%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/ldblib.cpp.o
[ 8%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/ldebug.cpp.o
[ 9%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/ldo.cpp.o
[ 10%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lfunc.cpp.o
[ 11%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lgc.cpp.o
[ 12%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lgcdebug.cpp.o
[ 13%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/linit.cpp.o
[ 14%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lmathlib.cpp.o
[ 15%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lmem.cpp.o
[ 16%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lnumprint.cpp.o
[ 17%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lobject.cpp.o
[ 18%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/loslib.cpp.o
[ 19%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lperf.cpp.o
[ 20%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lstate.cpp.o
[ 21%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lstring.cpp.o
[ 22%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lstrlib.cpp.o
[ 23%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/ltable.cpp.o
[ 24%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/ltablib.cpp.o
[ 25%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/ltm.cpp.o
[ 26%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/ludata.cpp.o
[ 27%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lutf8lib.cpp.o
[ 28%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lvmexecute.cpp.o
[ 29%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lvmload.cpp.o
[ 30%] Building CXX object luau/CMakeFiles/Luau.VM.dir/VM/src/lvmutils.cpp.o
[ 31%] Linking CXX static library libLuau.VM.a
[ 31%] Built target Luau.VM
[ 32%] Building CXX object luau/CMakeFiles/Luau.Ast.dir/Ast/src/Ast.cpp.o
In file included from /home/naymmm/luauDec/luau/Ast/src/Ast.cpp:2:
/home/naymmm/luauDec/luau/Ast/include/Luau/Ast.h: In member function 'std::size_t std::hash<Luau::AstName>::operator()(const Luau::AstName&) const':
/home/naymmm/luauDec/luau/Ast/include/Luau/Ast.h:1264:17: error: 'uintptr_t' was not declared in this scope
1264 | return (uintptr_t(value.value) >> 4) ^ (uintptr_t(value.value) >> 9);
| ^~~~~~~~~
/home/naymmm/luauDec/luau/Ast/include/Luau/Ast.h:10:1: note: 'uintptr_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
9 | #include <string.h>
+++ |+#include <cstdint>
10 |
make[2]: *** [luau/CMakeFiles/Luau.Ast.dir/build.make:76: luau/CMakeFiles/Luau.Ast.dir/Ast/src/Ast.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:924: luau/CMakeFiles/Luau.Ast.dir/all] Error 2
make: *** [Makefile:121: all] Error 2
[naymmm@DESKTOP-OB1AJL luauDec]$```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.