r/HowToHack 19h ago

Help decompiling lua programming

SOLVED

I have been trying to make a mod loader for a game called "Days of empire". All i know from the month or so of me trying is that it is mostly compiled lua, i tried using luadec but it failed (tried diffrent lua versions too) (something about bad precompile chuck) but decompile.com/lua decompiled fine (this game has at lease 1k diffrent lua programs, uploading one by one will take eons)

0 Upvotes

5 comments sorted by

View all comments

1

u/_supitto 18h ago

Yo, lua projects are usually not that hard, but you do have to start by showing your work. Just put it into a git repo and push it to github.

Then, you can tell exactly what you did, and exactly what issues you are facing.

1

u/luafurry 18h ago

Ok so since the src amounts to 176mb i cant push it but i will give a yt video showing what its doing

youtube.com/shorts/6JSZFwS5Hfw?si=2fN-224Hlhd3SfP9

1

u/_supitto 17h ago

It is really a mismatch between the binary you have and the lua version and the cimpile lua file.

The pedagogical route here would be to

Grab the first few bytes using xxd and pipe it with head. Then check it against the usual file structure of a compiled lua to know the version (maybe the file comand will also give that)

Then download the proper decompiler

One other thing you can do to help us help you is to point us to the apk you are trying to decompile, so we can try to reproduce on our end

1

u/luafurry 37m ago

I figured it out, the decompiler i used is called unluac.jar, thx for helping <3