{"id":13647576,"url":"https://github.com/viruscamp/luadec","last_synced_at":"2025-05-16T05:07:52.195Z","repository":{"id":19107316,"uuid":"22335906","full_name":"viruscamp/luadec","owner":"viruscamp","description":"Lua Decompiler for lua 5.1 , 5.2 and 5.3","archived":false,"fork":false,"pushed_at":"2024-02-25T04:13:19.000Z","size":2739,"stargazers_count":1200,"open_issues_count":61,"forks_count":363,"subscribers_count":50,"default_branch":"master","last_synced_at":"2025-04-08T15:12:37.483Z","etag":null,"topics":["decompiler","lua","lua-decompiler"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viruscamp.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-07-28T08:28:35.000Z","updated_at":"2025-04-07T11:31:54.000Z","dependencies_parsed_at":"2024-10-29T17:30:34.666Z","dependency_job_id":null,"html_url":"https://github.com/viruscamp/luadec","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viruscamp%2Fluadec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viruscamp%2Fluadec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viruscamp%2Fluadec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viruscamp%2Fluadec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viruscamp","download_url":"https://codeload.github.com/viruscamp/luadec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471059,"owners_count":22076585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["decompiler","lua","lua-decompiler"],"created_at":"2024-08-02T01:03:39.356Z","updated_at":"2025-05-16T05:07:47.181Z","avatar_url":"https://github.com/viruscamp.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"Overview\r\n========\r\n\r\nLuaDec is a Lua decompiler for lua 5.1 , and experimental for lua 5.2 and 5.3.\r\n\r\nIt is based on Hisham Muhammad's luadec which targeted lua 5.0.x and LuaDec51 by Zsolt Sz. Sztupak.\r\n\r\nLuaDec is free software and uses the same license as the original LuaDec.\r\n\r\n\r\nCompiling\r\n---------\r\n```\r\ngit clone https://github.com/viruscamp/luadec\r\ncd luadec\r\ngit submodule update --init lua-5.1\r\ncd lua-5.1\r\nmake linux\r\ncd ../luadec\r\nmake LUAVER=5.1\r\n```\r\n\r\nIf you want to build it for lua 5.2 or 5.3 , just replace 5.1 above to 5.2 or 5.3.\r\n\r\nThere are also project files for vc2008, tested for vc2008 and vc2013.  \r\nBefore compiling, make sure there are correct sources in lua-5.1 , lua-5.2 or lua-5.3.\r\n\r\n\r\nUsage\r\n-----\r\n* decompile lua binary file:  \r\n  luadec abc.luac  \r\n* decompile lua source file for testing and comparing:  \r\n    luadec abc.lua  \r\n* disassemble lua source or binary  \r\n    luadec -dis abc.lua  \r\n* -pn print nested functions structure, could be used by -fn  \r\n```\r\nluadec -pn test.lua\r\n0\r\n  0_0\r\n    0_0_0\r\n  0_1\r\n```\r\n* -f decompile only specific nested function  \r\n    luadec -f 0_1 test.lua  \r\n* -ns donot process sub functions  \r\n    luadec -ns -f 0_1 test.lua  \r\n* -fc perform a instruction-by-instruction compare for each function  \r\n    luadec -fc test.lua  \r\noutputs:  \r\n-- function check pass 0  \r\n-- function check fail 0_0 : cannot compile  \r\n-- function check fail 0_1 :  different code size; sizecode org: 66, decompiled: 67, same: 47;   \r\n\r\nThere are some more options, usually for debug purposes, or for cases where the built in local guesser guesses wrong.\r\nUse -h to get a complete list of usable parameters\r\n\r\n\r\nCredits\r\n-------\r\n\r\nOriginal by Hisham Muhammad (http://luadec.luaforge.net)\r\n \r\nOngoing port to Lua 5.1 by Zsolt Sz. Sztupak (https://github.com/sztupy/luadec51/)\r\n\r\nThe internals of Lua5.1 was learned from Kein-Hong Man's A No-Frills Introduction to Lua 5.1 VM Instructions\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviruscamp%2Fluadec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviruscamp%2Fluadec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviruscamp%2Fluadec/lists"}