Help! Questions about making a mod in a Lua game

pentarix1996

Platinian
Original poster
Dec 31, 2023
13
1
1
22
Good morning. I'm trying to make a mod for the game "Pixel Heroes: Tales of Emond". The first thing I did was obtain the APK, which to my surprise was divided into several parts (something normal for large games). What I did was the following.

adb shell pm path com.haoplay.game.and.hero

1711367426989.png


After obtaining 5 routes (as shown in the attached image) I did a pull "adb pull <path> <destination>". When extracting the content of each APK, I saw that in the APK "split_game_asset.apk" there is all the code in .lua. When trying to see the content of each file, I saw that it was encrypted...

1711367567163.png


I have previously tried to make mods in other games (made in Unity) with success. But I have never faced one made with LUA. Any suggestions on how to decrypt these files or if I am making a mistake when obtaining the source code?

As an additional note for hexadecimal code changes I use HxD. On the other hand, I tried to do my own research before opening this post, but I can't find anything that helps me :S

Any suggestions on where to go or what to do?

Thanks in advance.

Edit:

One strange thing that I see and I don't understand very well is why both .lua and .lua64 files appear.
1711371267883.png
 
Last edited:

pentarix1996

Platinian
Original poster
Dec 31, 2023
13
1
1
22
Based on the first bytes, it seems luajit bytecode


I'm going to investigate a little more, but how would I be able to flat read or decompile these types of files? the first 5 bytes of .lua files are always the following:
61 62 63 64 00
1711535574043.png



In .lua64 they are always the following: 1B 4C 4A 02 08

1711535690287.png


Any suggestions? :) Thank you very much in advance
 

Attachments

pentarix1996

Platinian
Original poster
Dec 31, 2023
13
1
1
22
Good news, I managed to re-encode the file and was able to do my tests. How can I resolve the post?