22 hours ago22 hr Hi everyone, I'm trying to access the Lua scripts of Dynasty Legends 2 for development/research purposes. I extracted the game files from the APK but the Lua files appear to be encrypted/obfuscated. I can't read or decompile them. - Game: Dynasty Legends 2 (mobile/PC) - Engine: Unity Engine - What I tried: unluac, standard Lua decompilers, basic XXTEA tools Has anyone dealt with this game's Lua encryption? Or can anyone suggest a general approach to hook and dump decrypted Lua from memory (Frida, etc.)? Any help or pointers would be appreciated. Data(Lua's).rar
16 hours ago16 hr Localization The lua files are encrypted with a modified version of XXTEA. I downloaded Dynasty Legends 2 through Steam and based the research on that build of the game. The key is stored as four masked values, and the game uses a different number of rounds than standard XXTEA. I also confirmed that the same key works on the lua files you provided.Python script and article will follow soon. Edited 16 hours ago16 hr by Falkrian
14 hours ago14 hr Author Great job! Do you have the option to share keys? The keys I have are very old and don't match.
14 hours ago14 hr Localization // SnipI have no idea how the rest of your source code looks like, but give this a try. Edited 4 hours ago4 hr by Falkrian
13 hours ago13 hr Author unfortunately, this key didn't work.. if you have used our solution method or QuickBMS, will you share it with me
13 hours ago13 hr Localization Please give the attached Python script a try and let me know how it goes.# Decrypt all lua files python .\dynasty_legends_2_lua_decrypt.py "D:\Steam\steamapps\common\Dynasty Legends 2" "path\to\folder\for\decryption" # Single File python .\dynasty_legends_2_lua_decrypt.py .\Boss_LvBu.lua .\Boss_LvBu.decrypted.luaHere is the article for those interested.dynasty_legends_2_lua_decrypt.py Edited 11 hours ago11 hr by Falkrian
Create an account or sign in to comment