{"id":33224426,"url":"https://github.com/sztupy/luadec51","last_synced_at":"2026-03-12T06:39:38.411Z","repository":{"id":3310171,"uuid":"4352506","full_name":"sztupy/luadec51","owner":"sztupy","description":"Lua Decompiler for Lua version 5.1","archived":false,"fork":false,"pushed_at":"2022-03-14T09:24:38.000Z","size":412,"stargazers_count":344,"open_issues_count":7,"forks_count":133,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-12-18T09:42:31.896Z","etag":null,"topics":["c","decompiler","lua"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sztupy.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-16T22:30:38.000Z","updated_at":"2025-12-15T14:31:35.000Z","dependencies_parsed_at":"2022-08-03T16:00:18.404Z","dependency_job_id":null,"html_url":"https://github.com/sztupy/luadec51","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sztupy/luadec51","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sztupy%2Fluadec51","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sztupy%2Fluadec51/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sztupy%2Fluadec51/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sztupy%2Fluadec51/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sztupy","download_url":"https://codeload.github.com/sztupy/luadec51/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sztupy%2Fluadec51/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30417529,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T04:41:02.746Z","status":"ssl_error","status_checked_at":"2026-03-12T04:40:12.571Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","decompiler","lua"],"created_at":"2025-11-16T16:00:37.663Z","updated_at":"2026-03-12T06:39:38.405Z","avatar_url":"https://github.com/sztupy.png","language":"C","funding_links":[],"categories":["C","资源","Resources"],"sub_categories":["Analysis Tools and ASTs"],"readme":"Overview\n========\n\nLuaDec for Lua 5.1 is a Lua decompiler targeting lua versions 5.1.x\n\nIt is based on Hisham Muhammad's luadec which targeted lua 5.0.x\n\nLuaDec51 is free software and uses the same license as the original LuaDec\n\nIt currently has the following functionality:\n\n* Full support for Lua 5.1 opcodes\n* Added support for files with debug informations stripped\n* Includes a heuristic that tries to determine where locals have been declared\n* When it encounters something undecompilable it tries to continue with the decompilation\n* It has a built in disassembler, with easy to read disassembly\n* It includes two ruby based tool that help further correction of the decompiled scripts\n\nStatus\n------\n\nCurrent version is 2.0\n\nCurrently luadec51 can decompile most constructs of lua scripts, including scripts that have debug informations stripped. It still has some shortcomings:\n* Complex conditional expressions usually break the output\n* while and repeat..until loops are unhandled\n* The local decalration guesser usually guesses locals declaring NEWTABLE and SETLIST opcodes wrong\n\nPlanned for luadec 3.0:\n* A new conditional handling engine\n\nUsage\n-----\n\nTo use luadec you have to compile it first. Read the following sections for more information\n\nTo use the ruby based tools compare and luadecguess you need to have ruby version 1.8 installed on your computer as well\n\nTo simply decompile a script run luadec as following:\n\n    luadec filename.luac \u003e filename.lua\n\nThis should decompile filename.luac to filename.lua\n\nTo disassemble a file use the -dis option:\n\n    luadec -dis filename.luac\n\nThere are some more options, usually for debug purposes, or for cases where the built in local guesser guesses wrong.\nUse -h to get a complete list of usable parameters\n\nDownload\n--------\n\nThe source code of LuaDec 5.1 and windows binaries can be downloaded from the GitHub page. You can find windows binaries under\nthe Releases tab. You might need to have the Visual Studio 2013 C++ redistributables installed for the project to work.\n\nCompiling\n---------\n\nYou need to download a version of lua you want to use, and put it into the lua directory. After that you can use the Makefile\nin the build directory to compile both projects. Alternatively there is also an MSVC directory which contains a Visual Studio 2013\nproject file you can use to compile luadec.\n\nThere is also a set up luadec project for MSVC++ 2008, that uses a modified lua 5.1.4 version with unicode support at\nhttp://winmo.sztupy.hu/luadec.html. Do not use this project tree for usage with generic lua files, because it won't work (it\nwill expect numerals in Q24.8 format, and strings in unicode)\n\nBinaries\n--------\n\nThere are currently two separate binaries provided for lua 5.1. Both are windows binaries, and both contain lua 5.1.4\nbinaries (intperpreter and compiler) too\n\nThe generic lua 5.1 version can be found at the project's download page\nThe unicode mobile version used in HTC phones can be found at http://winmo.sztupy.hu/luadec.html\nIf you have compiled luadec for some other lua 5.1 version or operating system, then feel free to contact me,\nso I can add them to the project\n\nChangelog\n\nLuaDec 2.0.2 [4/Dec/2014]\n* Minor fixes for the `{...}` construct\n* Makefile for generic builds\n\nLuaDec 2.0.1 [17/May/2012]\n* Fixes for handling unknown upvalues\n\nLuaDec 2.0 [10/Mar/2009]\n* LuaDec has now a built-in heuristic to determine local declaration and releases\n* Luadec has an option to output the LDS2 string of a file\n\nLuaDec 1.9\n* Some changes regarding LDS(2) strings and for loops (it's still a bit unstable)\n* LuaDec has a new option to disassemble instead of decompile\n\nLuaDec 1.0\n* fixed OP_TFORLOOP handling\n* added LDS2 functionality to luadec\n\nLuaDec beta 6\n* fixed a crash where luadec encounters unhandled boolean constructs\n* luadecguess has now a new heuristic called \"fast guess\" for large scripts\n\nLuaDec beta 5\n* luadecguess can now be parameterized, and is more powerful\n\nLuaDec beta 4\n* fixed upvalue handling\n* fixed some local variable handlings\n* added luadecguess: a local variable declaration place guesser\n\nLuaDec beta 3\n* fixed OP_TFORLOOP\n* fixed loop variable handings\n* added command line options to handle local variable declarations (LDS strings)\n\nLuaDec beta 2\n* added some workarounds for the crashes. Luadec might output lots of garbage lua code, but it tries not crashing\n* fixed OP_TEST (hopefully)\n\nLuaDec beta 1\n* Corrected OP_FORPREP - OP_FORLOOP\n* Added some more warnings\n* Added automatic local variable declarations where possible\n\nalpha 2\n* Fixed constant loading errors\n* fixed function variables\n* Added handlers to the new opcodes\n* Some changes to OP_TEST\n\nalpha 1\n* Initial Version\n\nCredits\n-------\n\nLuaDec51 is based on Hisham Muhammad's luadec\n\nThe internals of Lua5.1 was learned from Kein-Hong Man's A No-Frills Introduction to Lua 5.1 VM Instructions\n\nAlso thanks to anyone involved in helping me on XDA\n\nContact us\n----------\n\nContact information at http://winmo.sztupy.hu\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsztupy%2Fluadec51","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsztupy%2Fluadec51","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsztupy%2Fluadec51/lists"}