September 14Sep 14 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
September 14Sep 14 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 September 14Sep 14 by Falkrian
September 14Sep 14 Author Great job! Do you have the option to share keys? The keys I have are very old and don't match.
September 14Sep 14 Localization // SnipI have no idea how the rest of your source code looks like, but give this a try. Edited September 15Sep 15 by Falkrian
September 14Sep 14 Author unfortunately, this key didn't work.. if you have used our solution method or QuickBMS, will you share it with me
September 14Sep 14 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 September 14Sep 14 by Falkrian
Create an account or sign in to comment