There's this one which seems to be the most up to date https://github.com/marsinator358/luajit-decompiler-v2
5.5 named vararg support
Opmap (mostly just using the patterns compared to the default opmap, not checked closely, but decompiles at least): .op 0 add .op 1 sub .op 2 mul .op 3 mod .op 4 pow .op 5 div .op 6 idiv .op 7 band .op 8 bor .op 9 bxor .op 10 shl .op 11 shr .op 12 unm .op 13 bnot .op 14 not .op 15 len .op 16 concat .op 17 move .op 18 loadk .op 19 loadkx .op 20 loadbool .op 21 loadnil .op 22 getupval .op 23 gettabup .op 24 gettable .op 25 settabup .op 26 setupval .op 27 settable .op 28 newtable .op 29 self .op 30...
Exception in thread "main" unluac.decompile.DecompilerException: main 49: Register r280 is out of range at unluac.decompile.Validator.process(Validator.java:36) at unluac.decompile.Decompiler.decompile(Decompiler.java:186) at unluac.Main.main(Main.java:98) can you please write the opmap.txt for this?, disassembely is working. I am still working on encryption I as I know only strings are encrypted
I just remembered, someone has posted code like this before: https://sourceforge.net/p/unluac/discussion/general/thread/ef8a1e0455/?limit=25#5607 I had cleaner handling of the line number change, but otherwise I think I said about the same thing.
thanks for help tehtmi, I am currently working on Decrypting the strings the strings are obfuscated with xor may be! I am figuring it out, I will attach the decrypted file after successful decryption👍, and I am beginner at Lua so I don't know how to write opmap codes, thanks for help
Non-standard binary format. Line numbers in debug info are only 1 byte each (looks like maybe delta encoded, but unluac doesn't care what the line numbers are anyway). Right after that there is another list. I didn't look at it much, but seems like entries are 8 bytes (probably two 4-byte ints). This quick patch will let unluac parse (and thus --disassemble): # HG changeset patch # User tehtmi # Date 1769420022 28800 # Mon Jan 26 01:33:42 2026 -0800 # Node ID ffffffffffffffffffffffffffffffffffffffff...
Fix local _ENV not doing syntax sugar
Very initial 5.5 global support (global assignment check forces global keyword)
shli / shri swapped in 5.5
Some changes for 5.5 dead closes
5.5 disassembly
First pass on Lua 5.5 support
here is the decompiled version of this I dont know it is accurate or not someone decompiled it
Exception in thread "main" java.nio.BufferUnderflowException at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:713) at java.base/java.nio.HeapByteBuffer.get(HeapByteBuffer.java:172) at unluac.parse.LStringType53$1.run(LStringType.java:97) at unluac.parse.BInteger.iterate(BInteger.java:125) at unluac.parse.LStringType53.parse(LStringType.java:90) at unluac.parse.LStringType53.parse(LStringType.java:1) at unluac.parse.LLocalType.parse(LLocalType.java:12) at unluac.parse.LLocalType.parse(LLocalType.java:1)...
The file looks encrypted maybe. Visual inspection looks like there are some patterns (so maybe poor encryption), but it's not close to being Lua bytecode. My policy is I won't break encryption. You might find someone else, or do it yourself. (If you have the host application that uses this file, reverse engineering it could help you find out how it decrypts or otherwise reads the file.) If you still have problems after decrypting, then I can help.
Hi i try to decompile but it say: Subprocess error (code 1): Exception in thread "main" java.lang.IllegalStateException: The input file does not have the signature of a valid Lua file. at unluac.parse.BHeader.<init>(BHeader.java:84) at unluac.Main.file_to_function(Main.java:194) at unluac.Main.main(Main.java:95)
I'm also looking for LuaJIT decompiler. What's current best? I see that https://luadec.metaworm.site/ claims supporting it but it fails to decompile my files. Disassembly appears to be working. https://gitlab.com/znixian/luajit-decompiler looks abandoned (last commit in 2020) but surprisingly it successfully decompiled many files. Out of 440 lua files I tried it decompiled 372.
I'm also looking for LuaJIT decompiler. What's current best? I see that https://luadec.metaworm.site/ claims supporting it but it fails to decompile my files. Disassembly appears to be working. https://gitlab.com/znixian/luajit-decompiler looks abandoned (last commit in 2020 but surprisingly it successfully decompiled many files. Out of 440 lua files I tried it decompiled 372.
You could compile a test file with a standard Lua 5.2 build and look at the header. 1B 4C 75 61 52 00 01 04 08 04 08 00 19 93 0D 0A 1A 0A 1B 4C 75 61 is the version-agnostic "magic number" for compiled Lua. 52 indicates Lua 5.2. 00 is format which is always 0 for standard Lua implementations 01 is the endianness byte (0 or 1) 04 is int size 08 is size_t size 04 is instruction size 08 is Lua number size (indicating 64-bit double precision floating point or 64-bit long integer depending on integrality...
version string
Fix for broken upvalue names in stripped chunks
I tried applying the changes described here: https://sourceforge.net/p/unluac/discussion/general/thread/3b18b88f8e/?limit=25#effa and then rebuilt unluac, but it still doesn’t work. java -jar unluac-custom.jar --opmap opmap.txt script1.luac Exception in thread "main" java.lang.IllegalStateException: The input chunk reports an invalid code for lua number integrality: 4 at unluac.parse.LHeaderType.parse_number_integrality(LHeaderType.java:193) at unluac.parse.LHeaderType52.parse_main(LHeaderType.java:383)...
I tried applying the changes described here: https://sourceforge.net/p/unluac/discussion/general/thread/3b18b88f8e/?limit=25#effa and then rebuilt unluac, but it still doesn’t work. java -jar unluac-custom.jar --opmap opmap.txt script1.luac Exception in thread "main" java.lang.IllegalStateException: The input chunk reports an invalid code for lua number integrality: 4 at unluac.parse.LHeaderType.parse_number_integrality(LHeaderType.java:193) at unluac.parse.LHeaderType52.parse_main(LHeaderType.java:383)...
My question is, I see you always mentioning things that need fixing, like 'opmap', but can I debug to find the solution myself? I'm just looking at the files with some combination of a hex editor, unluac disassembler, and unluac in a Java debugger. This is a parsing failure (failing in Main.file_to_function before Decompiler.print or whatever), so there's some concrete difference between the file and a "correct" Lua file. If it's close enough, it's just guesswork/inference. You were on the right...
My question is, I see you always mentioning things that need fixing, like 'opmap', but can I debug to find the solution myself? I'm just looking at the files with some combination of a hex editor, unluac disassembler, and unluac in a Java debugger. This is a parsing failure (failing in Main.file_to_function before Decompiler.print or whatever), so there's some concrete difference between the file and a "correct" Lua file. If it's close enough, it's just guesswork/inference. You were on the right...
I'm using the latest unluac (2025_10_19) Here is the output: Exception in thread "main" java.lang.IllegalStateException: The input chunk reports an invalid code for lua number integrality: 4 at unluac.parse.LHeaderType.parse_number_integrality(LHeaderType.java:193) at unluac.parse.LHeaderType52.parse_main(LHeaderType.java:383) at unluac.parse.LHeaderType.parse(LHeaderType.java:67) at unluac.parse.BHeader.<init>(BHeader.java:98) at unluac.Main.file_to_function(Main.java:186) at unluac.Main.main(Main.java:93)...
I'm using the latest unluac (2025_10_19) Here is the output: Exception in thread "main" java.lang.IllegalStateException: The input chunk reports an invalid code for lua number integrality: 4 at unluac.parse.LHeaderType.parse_number_integrality(LHeaderType.java:193) at unluac.parse.LHeaderType52.parse_main(LHeaderType.java:383) at unluac.parse.LHeaderType.parse(LHeaderType.java:67) at unluac.parse.BHeader.<init>(BHeader.java:98) at unluac.Main.file_to_function(Main.java:186) at unluac.Main.main(Main.java:93)...
I'm using the latest unluac (2025_10_19) Here is the output: Exception in thread "main" java.lang.IllegalStateException: The input chunk reports an invalid code for lua number integrality: 4 at unluac.parse.LHeaderType.parse_number_integrality(LHeaderType.java:193) at unluac.parse.LHeaderType52.parse_main(LHeaderType.java:383) at unluac.parse.LHeaderType.parse(LHeaderType.java:67) at unluac.parse.BHeader.<init>(BHeader.java:98) at unluac.Main.file_to_function(Main.java:186) at unluac.Main.main(Main.java:93)...
There's an extra byte in the header. Not sure why, could be for non-interoperability / indicating other non-standard behavior, etc. If you remove it, unluac can parse. Without more context hard to give specific advice, maybe remove it with a hex editor or write a preprocessing script or something. Your file starts like this: 1B 4C 75 61 80 54 If you remove the 0x80, then it will work: 1B 4C 75 61 54 But also, the file is using a non-standard opmap (--opmap). I decoded the ops used in this file for...
i tried old and new version but still not work Exception in thread "main" java.lang.IllegalStateException at unluac.Version.<init>(Version.java:312) at unluac.Version.getVersion(Version.java:18) at unluac.parse.BHeader.<init>(BHeader.java:92) at unluac.Main.file_to_function(Main.java:186) at unluac.Main.main(Main.java:93)
We got it, Thank get the source and rebuild by the opmap
I try to decompile use old and new version don't work, how can i do?
Currently, you can --disassemble and the first line should be .version 5.1. Probably at some point I will add comments to the decompilation with certain metadata. Gotos from decompiling versions before 5.2 happen as a fallback when working with debug-stripped code. As unluac doesn't properly support these yet, its poor understanding of which registers are temporary can lead to situations where decompiling without gotos is impossible -- gotos are used as an alternative to failure (since it might still...
Hi there. When I decompile a file that is lua 5.1 it ends up with goto functions which came in 5.2 - How can I tell the version the decompiled code should have?
Hello, I found out that unluac didn't feature a way to perform a bulk decompilation and keep the folder structure to then mirror it in the output folder, so i asked ChatGPT to make me a batch file and with some tweaking, it worked quite well so i'm sharing it, it may help many people. Tested on a game that used compiled chunk as .lua and it did decompile 4k scripts in a few minutes with a HDD, the batch file is commented and only need minimal change. It is spawning an instance of unluac for each...
Hello, I found out that unluac didn't feature a way to perform a bulk decompilation and keep the folder structure, so i asked ChatGPT to make me a batch file and with some tweaking, it worked quite well so i'm sharing it, it may help many people. Tested on a game that used compiled chunk as .lua and it did decompiled 4k scripts in a few minutes with a HDD, the batch file is commented and only need minimal change. It is spawning an instance of unluac for each .lua files found, I found out that it...
Yeah, unluac doesn't support this case. It should be easy to add it. I might make it an option flag because I think there are ambiguous cases (vararg, no params, 1 upvalue is the environment table for 5.2 plus). There's no canonical way to output it, but I guess I'll probably make an outer chunk that returns an anonymous function and declares any necessary upvalues.
Hi tehtmi, I’ve been experimenting with dumping and decompiling Lua functions, and I had a question about parameter recovery in unluac. Im dumping the bytecode of functions with following code: local function dump_func(func) 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 = assert(io.open("temp/" .. filename, "wb")) file:write(bytecode) file:close() return filename...
Also run tests in Lua 5.4.8
Heuristic to avoid backward jump as 'always loop' if it introduces more needed gotos
Refinements of if/goto handling for 5.4.3+ (Lua changeset ab1aca94e83d2eff1605ea1854df023c814cef21)
There were some other related issues. Should be fixed with the newer version (2025_10_20) With the Lua 5.4.8 compiler, some of the goto tests also failed, seems like an unrelated issue, but I haven't tried to look for the compiler change yet. Maybe not such an impediment to decompilation (doesn't crash, and is maybe equivalent code, just not round-trip-identical).
version string
Fix remaining variable scope issues from 5.4.5+
Some refactoring of close/scope handling / fix repeat break target with jmp-style close
Probably fixed in the new version. This was broken due to the fix for this bug in Lua 5.4.4 (and earlier Lua 5.4 versions). Your code is compiled with Lua 5.4.5+. Unluac may still need some more testing with up-to-date Lua 5.4, but I have fixed the immediate problem (unluac failing fast due to unexpected variable scope in debug info).
Fix for Lua 5.4.5+, generic for implicit variable scope doesn't include close
Hello tehtmi, I'm currently working on a game that uses Lua 5.4. Some files are decompiled, but there are also a lot of files that encounter the given and expected error. Do you have a solution for this type of problem ? given: 10 16 expected: 10 15 Exception in thread "main" java.lang.IllegalStateException at unluac.decompile.Registers.setInternalLoopVariable(Registers.java:167) at unluac.decompile.block.TForBlock.handleVariableDeclarations(TForBlock.java:118) at unluac.decompile.ControlFlowHandler.find_fixed_blocks(ControlFlowHandler.java:582)...
can we contact with what'sApp or email pls?
Unluac can be used if you produce a valid standard Lua bytecode file. If it's non-standard you might be able to normalize it by preprocessing or modify unluac to accept that format (or using built-in unluac options to deal with a small number of common non-standard variations). If the bytecode instructions themselves have been obfuscated, unluac's compiler is unlikely to work well, as it is designed to be used only on the output of the PUC-Rio Lua compiler. In that case, you could still use unluac's...
this is original file
i have obfuscated lua file, then i tried to deobf it and got vm code. Can i somehow get it readable with unluac? Or it's impossible? Want to somehow change private values to patch addon for new version (author not support addon anymore)
Sorry, should be fixed by changeset b86466bd1b73 This is just the fallback when upvalue name resolution fails. There was some refactoring to track certain name info earlier related to another bug, and it broke the way things were handled for 5.0/5.1 stripped chunks since they store their upvalue info in a weird place.
Fix new issue processing upvalue names in 5.0/5.1 stripped chunks
A little more validation; pending refactor
Initial setup for useful decompiler errors... (opcode validation)
Hi, I came across a problem that was seemingly fixed back in 2021: https://sourceforge.net/p/unluac/discussion/general/thread/f1b200b0a1/?limit=25#fb14 I have a script that defines functions such as math.max, math.min, etc. at the top as locals, but when they are called in functions later, they are incorrectly decompiled as "UPVALUEx". This only happens on the newest version I compiled, when I tried the 2021_03_19b version or even the latest 2023 version in unstable, it works as it should (I was...
Local variable information is stripped, but line numbers are not which confuses unluac's heuristic for detecting debug info. Use --nodebug(and there is no debug info, natch).
Hi, i tried to decompile this lua file but got this error, other tool https://luadec.metaworm.site/ works, so i assume opcodes are standard Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "upvalue.name" is null at unluac.decompile.expression.TableReference.isUpvalueOf(TableReference.java:40) at unluac.decompile.expression.TableReference.print(TableReference.java:52) at unluac.decompile.expression.FunctionCall.print(FunctionCall.java:80) at...
Hi everyone, I'm happy to share a small project I've been working on: an Android app that brings unluac to mobile devices. The app's goal is simple: to make it easier to decompile Lua scripts on the go, using your phone's storage. This is a straightforward port, focusing on core functionality. You can select a Lua file from your device and get the decompiled output quickly. The project is open source, and you can find the repository here:only52607/unluac-mobile Any feedback or suggestions are welcome!...
Thank you very much it work
Looks the same as this. Non-standard op encoding. You can use --opmap and pass this opmap file: .op 0 band .op 1 bxor .op 2 bor .op 3 shr .op 4 shl .op 5 bnot .op 6 unm .op 7 len .op 8 not .op 9 jmp .op 10 concat .op 11 lt .op 12 eq .op 13 test .op 14 le .op 15 call .op 16 testset .op 17 return .op 18 tailcall .op 19 forprep .op 20 forloop .op 21 tforcall .op 22 tforloop .op 23 closure .op 24 setlist .op 25 extraarg .op 26 loadk .op 27 move .op 28 loadbool .op 30 getupval .op 31 loadnil .op 32 gettable...
Hi, i try to decompile this lua 5.3 file but got this error Exception in thread "main" java.lang.IllegalStateException at unluac.decompile.Op.jumpField(Op.java:217) at unluac.decompile.Code.target(Code.java:142) at unluac.decompile.ControlFlowHandler.process_condition(ControlFlowHandler.java:318) at unluac.decompile.ControlFlowHandler.find_branches(ControlFlowHandler.java:352) at unluac.decompile.ControlFlowHandler.process(ControlFlowHandler.java:118) at unluac.decompile.Decompiler.decompile(Decompiler.java:136)...
Thank you for the advice, I've finished the opcode mapping and you were right with your first suggestion, all opcodes that used RK were affected. Making Maxstack 300 has fixed the remaining problems and it all decompiles successfully. Thank you so much for your help.
Constant offset of RK constants in Lua 5.0, I would usually think this: https://sourceforge.net/p/unluac/discussion/general/thread/aa013ce7d8/?limit=25#f606 That would affect all RK constants (not all constants -- some don't use RK, like in loadk -- only parameters that can be either register or constant are RK). If it's specifically settable only, you might need to modify the main decoding switch statement in Decompiler.java (which might be sufficient), or if e.g. it's all RKB or something like...
Thank you very much for replying and for your help. --opmap together with --disassemble is really useful and working well to find the opcode remapping. If I may, could I ask another question? Unluac with disassemble is giving me this for settable: .constant k0 "r" .constant k1 "g" .constant k2 "b" .constant k3 "a" .line 16 newtable r4 0 0 .line 17 settable r4 k50 r0 ; k50 out of range .line 18 settable r4 k51 r1 ; k51 out of range .line 19 settable r4 k52 r2 ; k52 out of range .line 20 settable r4...
Thank you very much for replying and for your help. --opmap together with --disassemble is really useful and working well to find the opcode remapping. If I may, could I ask another question? Unluac with disassemble isgivine me this for settable: .constant k0 "r" .constant k1 "g" .constant k2 "b" .constant k3 "a" .line 16 newtable r4 0 0 .line 17 settable r4 k50 r0 ; k50 out of range .line 18 settable r4 k51 r1 ; k51 out of range .line 19 settable r4 k52 r2 ; k52 out of range .line 20 settable r4...
Thank you very much for replying and for your help. --opmap together with --disassemble is really useful and working well to find the opcode remapping. If I may, could I ask another question? Unluac with disassemble isgivine me this for settable: .constant k0 "r" .constant k1 "g" .constant k2 "b" .constant k3 "a" .line 16 newtable r4 0 0 .line 17 settable r4 k50 r0 ; k50 out of range .line 18 settable r4 k51 r1 ; k51 out of range .line 19 settable r4 k52 r2 ; k52 out of range .line 20 settable r4...
You can use an 'opmap' file with unluac's --opmap parameter to tell it how to interpret the opcodes. It is a text file with lines like .op 0 add .op 1 sub .op 7 mul You should be able to disassemble (--disassemble) even without the correct opmap. Sometimes I use an empty or partially filled opmap file so the disassembly will list the opcodes of unknown operations. If you have enough familiarity with Lua bytecode, it is generally possible to figure out which opcode encodes each operation. The more...
Hi, the tool cant decompile these lua 5.0 files. I suspect that the opcodes have been messed with. In {other cases} they {...} added dummy null opcodes as follows: {redacted} I really appreciate all the work you've done on this tool, its been really helpful. If you are able please could you have a look at these files and see if the opcodes have been shuffled or adjusted. Thank you. {files redacted}
Hi, the tool cant decompile these lua 5.0 files. I suspect that the opcodes have been messed with. In {other cases} they {...} added dummy null opcodes as follows: {redacted} I really appreciate all the work you've done on this tool, its been really helpful. If you are able please could you have a look at these files and see if the opcodes have been shuffled or adjusted. Thank you.
Hi, the tool cant decompile these lua 5.0 files. I suspect that the opcodes have been messed with. In {other} games by this developer they {...} added dummy null opcodes as follows: {redacted} I really appreciate all the work you've done on this tool, its been really helpful. If you are able please could you have a look at these files and see if the opcodes have been shuffled or adjusted. Thank you.
You can use an 'opmap' file with unluac's --opmap parameter to tell it how to interpret the opcodes. It is a text file with lines like .op 0 add .op 1 sub .op 7 mul You should be able to disassemble (--disassemble) even without the correct opmap. Sometimes I use an empty or partially filled opmap file so the disassembly will list the opcodes of unknown operations. If you have enough familiarity with Lua bytecode, it is generally possible to figure out which opcode encodes each operation. (I you like,...
Hi, the tool cant decompile these lua 5.0 files. I suspect that the opcodes have been messed with. In later games by this developer they switched to lua 5.1 and 5.2, there they added dummy null opcodes as follows: const char *const luaP_opnames[NUM_OPCODES+1] = { NULL, "MOVE", "LOADK", "LOADBOOL", "LOADNIL", "GETUPVAL", "GETGLOBAL", "GETTABLE", NULL, "SETGLOBAL", "SETUPVAL", "SETTABLE", "NEWTABLE", NULL, "SELF", NULL, "ADD", "SUB", "MUL", "DIV", "MOD", "POW", "UNM", "NOT", "LEN", "CONCAT", NULL,...
Hi, the tool cant decompile these lua 5 files. I suspect that the opcodes have been messed with. In later games by this developer they switched to lua 5.1 and 5.2, there they added dummy null opcodes as follows: const char *const luaP_opnames[NUM_OPCODES+1] = { NULL, "MOVE", "LOADK", "LOADBOOL", "LOADNIL", "GETUPVAL", "GETGLOBAL", "GETTABLE", NULL, "SETGLOBAL", "SETUPVAL", "SETTABLE", "NEWTABLE", NULL, "SELF", NULL, "ADD", "SUB", "MUL", "DIV", "MOD", "POW", "UNM", "NOT", "LEN", "CONCAT", NULL, "JMP",...
Tested with unluac_2023_12_24.jar and manually compiled snapshot from the latest Hg Code commit (bda008aa963b6bc4ce4bb289c9122c84480a4ff6). Minimal reproducible example. https://luac.nl/s/174cc3c013a77f25ab11700c6e9 for i = 1, 10 do local function f() local a = i end if a then break end end This code compiled by the official 64-bit luac compiler v5.4.3 produces the following error. > java -jar unluac_2023_12_24.jar output.luac given: 4 11 expected: 4 12 Exception in thread "main" java.lang.IllegalStateException...
Hi. I have also run into the same issue. This is not because it's encrypted, it's because it's a HavocScript, not a regular LuaC. https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2011/slides/Malcolm_Tyrrell_Programming_EfficientLuaScripting.pdf You will need a different decompiler. They're all over Github. Just look for HavocScript Decompiler.
Hi. I have also run into the same issue. This is not because it's encrypted, it's because it's a HavocScript, not a regular LuaC. You will need a different decompiler. They're all over Github. Just look for HavocScript Decompiler.
It looks encrypted which I can't/won't help with. I'm happy to comment on the Lua part. First 5 bytes are part of the normal Lua 5.4 header, then three bytes I don't recognize 30 01 01 (normal Lua 5.4 has a "format" byte here, always zero by default and always just one byte; purpose I believe is to cleanly prevent interoperability when changed). Then 25 bytes of what looks like the rest of the standard Lua 5.4 header (ending with 28 77 40). After that would be the header for the first main function...
I am getting the following error, when i try to decompile a file which is i think localization file. Exception in thread "main" java.lang.IllegalStateException: The input chunk reports a non-standard lua format: 48 at unluac.parse.LHeaderType.parse_format(LHeaderType.java:87) at unluac.parse.LHeaderType54.parse_main(LHeaderType.java:460) at unluac.parse.LHeaderType.parse(LHeaderType.java:67) at unluac.parse.BHeader.<init>(BHeader.java:98) at unluac.Main.file_to_function(Main.java:186) at unluac....
Thank it work :D
Use --rawstring. I also strongly suggest --output. By default unluac only uses ASCII as this is the least likely to cause issues with text IO streams or text editors. Lua strings can contain arbitrary binary data, and the Lua compiler will accept this raw data regardless of any text encoding -- a file may, if it chooses, mix and match between various text encodings and non-text binary data. By default unluac will escape everything -- this leads to a correct source file, but it can be less human-readable...
As the title suggests, some data gets transformed into different characters when I use unluac.jar. Is there any way to fix this? ★★★RandomFateMacro★★★ -> \226\152\133\226\152\133\226\152\133RandomFateMacro\226\152\133\226\152\133\226\152\133 CHR_衛星Bさん -> CHR_\229\174\157\231\174\177
Thanks bro, I cleaned my older java and installed it again and unluac worked perfectly. I really appreciate your work in lua decompilation. Thanks again for making such good decompiler.
You're not getting to the point of even running my code. I'm not doing anything special, just command line java -jar unluac.jar yourfile. I don't know of any reason why Java 17 wouldn't work -- I tried with the Java 19 I already had on my machine and it worked fine (and it also worked with the Java 1.8 I normally use for testing and which I compile against rather than a newer version for greater compatibility). I can't explain the behavior you're seeing, and I'm not sure there's anything much I can...
what do you mean did you decompiled this script if yes please can you tell how and what do I need to install. I use java 17.
Ah, this has nothing to do with the file. I think it is your Java version. I think you need Java 8+ (AKA java -version 1.8).
I tried unluac-vf but it also not work it gives error -- Exception in thread "main" java.lang.UnsupportedClassVersionError: unluac/Main : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361)...
Thanks for the reply but I already tried newer version of unluac in unstable library but it didn't work. It gives same error as older one
Maybe you are using an old version of unluac. May as well use the latest from the Unstable folder (yes, it probably shouldn't be called that, sorry), that should be the default download anyway. Unluac works, but the files have debugging info stripped. Unluac isn't designed for these, so it will do its best, but the output is generally pretty verbose, and probably a little untrustworthy (and you won't get exactly the same thing back like you usually do with non-stripped files in unluac (modulo line...
Hi, I tried to decompile script of lua 5.0.3 decompiled using luac version 5.0.3. I used luadec, chunkspy and unluac. But for luadec some can decompiled but some are not I used luadec version 0.6. For chunkspy it can't decompile but it can only dissemble the script. Finally I tried unluac but header error occurs. Can someone help to decompile it. any help will be appreciated. thanks in advance. I attached some three scripts.
Okay, sorry for the delay. I didn't try to decode the strings/constants or other stuff, just what was needed for parsing, so I was missing context, so I'm not sure which math op is which -- these are just guesses (I used the order in the original opmap which is maybe plausible since it's not exactly mixed up). Also, I can't distinguish lt vs le without context. You may need to reshuffle these as needed (although unluac will still decompile if these things are wrong). There's also some missing ops...
Okay, sorry for the delay. I didn't try to decode the strings/constants or other stuff, just what was needed for parsing, so I was missing context, so I'm not sure which math op is which -- these are just guesses (I used the order in the original opmap which is maybe plausible since it's not exactly mixed up). Also, I can't distinguish lt vs le without context. You may need to reshuffle these as needed (although unluac will still decompile if these things are wrong). There's also a bit of other weird...
Thank you very much, I'll look into what you reccomended and see if it helps!