Far Cry 5 - Lua Cleaner/Decompiler

Upload *YOUR* gamehacking tools/helpers here
Post Reply
User avatar
SunBeam
Trouble Makers
Trouble Makers
Posts: 1684
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 329

Far Cry 5 - Lua Cleaner/Decompiler

Post by SunBeam » Sun Apr 15, 2018 3:28 pm

[COLOR=Crimson][B][ 15.04.2018 - First Release ][/B][/COLOR]

[LIST]

[*]What is this shit? Well, it's a tool designed to help you cleaning-up or decompiling extracted .lua files from Far Cry 5's .dat archives.





[*]How do you extract the Lua files? [B]Ekey[/B] posted a Far Cry 5 DAT extractor [URL='http://forum.xentax.com/viewtopic.php?p=139333#p139333']here[/URL].

[/LIST]

You can find the various discussions and observations in the XeNTaX thread, starting with [I]page 5[/I] (or from the beginning, if interested in reading everything). From that point onward I was able to extract all Lua files from the various .dat archives and come up with the below listing, using the .dat names as folder names:



[IMG]https://i.imgur.com/hXRcPXB.png[/IMG]



The tool is designed to work with drag-and-drops and accepts [B]individual[/B], [B]multiple[/B] .lua files OR [B]folders[/B] where Lua files reside (when dragging over a folder, itself and all sub-folders are scanned for .lua files). Lastly, there's a [B]check-box[/B] at the bottom allowing the tool to do clean-up (if enabled). You may want to check the [B]About[/B] button as well :p



The tool's result (be it a LUAC clean-up or Lua 5.1 decompile) is stored in the file with the [B].clean[/B] extension.



Now the example:

[LIST]

[*]if you drag and drop a single .lua file over the GUI, this happens:

[/LIST]

[IMG]https://i.imgur.com/j3xK3Q2.png[/IMG]

[LIST]

[*]if you want the remnants gone ([I]activityendgame.luadec[/I], [I]activityendgame.unluac[/I]) and [I]activityendgame.clean[/I] renamed to [I]activityendgame.lua[/I], then tick the bottom checkbox:

[/LIST]

[IMG]https://i.imgur.com/zNnaJPG.png[/IMG]

[LIST]

[*]lastly, if you want the tool to recursively do the above for all .lua files found in a folder/sub-folder/sub-folder... then go up one level and drag over the entire folder; you can do this with the root as well (my root is FC5_Lua; so if I dragged that, all found .lua files would be processed; yes, it takes a while):

[/LIST]

[IMG]https://i.imgur.com/ktQIB66.png[/IMG]



[IMG]https://i.imgur.com/jzuyUPb.png[/IMG]



[IMG]https://i.imgur.com/GUCpdZL.png[/IMG]



[B][U]Credits[/U][/B]:

[LIST]

[*][B]Ekey[/B] for the ability to extract Far Cry 5 files from the .dats using .fats.





[*][B]Hans Wessels[/B] for the [I]unluac[/I] Java decompiler (link: [URL]https://github.com/HansWessels/unluac[/URL]).





[*][B]Ovidiu Cucu[/B] for his last post in this thread: [URL]https://stackoverflow.com/questions/45608205/recursively-find-files-with-a-certain-extension-using-findfirstfile-and-findnext[/URL].

[/LIST]



[B]BIG NOTE:[/B]



[I]You need Java RE installed[/I] for the decompiler to work! Don't say I didn't tell you so! (link: [URL]http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html[/URL] - - at the time of the post, [B]Java SE Runtime Environment 8u162[/B])



Report any bugs and enjoy :p
Last edited by SunBeam on Sun Apr 15, 2018 3:33 pm, edited 2 times in total.

Norway-_-1999
RCE Fanatics
RCE Fanatics
Posts: 18
Joined: Thu Apr 05, 2018 11:59 am
Reputation: 8
Contact:

Far Cry 5 - Lua Cleaner/Decompiler

Post by Norway-_-1999 » Sun Apr 15, 2018 6:19 pm

[QUOTE="SunBeam, post: 42525, member: 12587"][COLOR=Crimson][B][ 15.04.2018 - First Release ][/B][/COLOR]

[LIST]

[*]What is this shit? Well, it's a tool designed to help you cleaning-up or decompiling extracted .lua files from Far Cry 5's .dat archives.





[*]How do you extract the Lua files? [B]Ekey[/B] posted a Far Cry 5 DAT extractor [URL='http://forum.xentax.com/viewtopic.php?p=139333#p139333']here[/URL].

[/LIST]

You can find the various discussions and observations in the XeNTaX thread, starting with [I]page 5[/I] (or from the beginning, if interested in reading everything). From that point onward I was able to extract all Lua files from the various .dat archives and come up with the below listing, using the .dat names as folder names:



[IMG]https://i.imgur.com/hXRcPXB.png[/IMG]



The tool is designed to work with drag-and-drops and accepts [B]individual[/B], [B]multiple[/B] .lua files OR [B]folders[/B] where Lua files reside (when dragging over a folder, itself and all sub-folders are scanned for .lua files). Lastly, there's a [B]check-box[/B] at the bottom allowing the tool to do clean-up (if enabled). You may want to check the [B]About[/B] button as well :p



The tool's result (be it a LUAC clean-up or Lua 5.1 decompile) is stored in the file with the [B].clean[/B] extension.



Now the example:

[LIST]

[*]if you drag and drop a single .lua file over the GUI, this happens:

[/LIST]

[IMG]https://i.imgur.com/j3xK3Q2.png[/IMG]

[LIST]

[*]if you want the remnants gone ([I]activityendgame.luadec[/I], [I]activityendgame.unluac[/I]) and [I]activityendgame.clean[/I] renamed to [I]activityendgame.lua[/I], then tick the bottom checkbox:

[/LIST]

[IMG]https://i.imgur.com/zNnaJPG.png[/IMG]

[LIST]

[*]lastly, if you want the tool to recursively do the above for all .lua files found in a folder/sub-folder/sub-folder... then go up one level and drag over the entire folder; you can do this with the root as well (my root is FC5_Lua; so if I dragged that, all found .lua files would be processed; yes, it takes a while):

[/LIST]

[IMG]https://i.imgur.com/ktQIB66.png[/IMG]



[IMG]https://i.imgur.com/jzuyUPb.png[/IMG]



[IMG]https://i.imgur.com/GUCpdZL.png[/IMG]



[B][U]Credits[/U][/B]:

[LIST]

[*][B]Ekey[/B] for the ability to extract Far Cry 5 files from the .dats using .fats.





[*][B]Hans Wessels[/B] for the [I]unluac[/I] Java decompiler (link: [URL]https://github.com/HansWessels/unluac[/URL]).





[*][B]Ovidiu Cucu[/B] for his last post in this thread: [URL]https://stackoverflow.com/questions/45608205/recursively-find-files-with-a-certain-extension-using-findfirstfile-and-findnext[/URL].

[/LIST]



[B]BIG NOTE:[/B]



[I]You need Java RE installed[/I] for the decompiler to work! Don't say I didn't tell you so! (link: [URL]http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html[/URL] - - at the time of the post, [B]Java SE Runtime Environment 8u162[/B])



Report any bugs and enjoy :p[/QUOTE]

Nice work :D

Keep it up :)

User avatar
SunBeam
Trouble Makers
Trouble Makers
Posts: 1684
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 329

Far Cry 5 - Lua Cleaner/Decompiler

Post by SunBeam » Mon Apr 16, 2018 8:49 pm

And here you go, all Lua files from the various archives -> [URL='https://goo.gl/KPNJJb']link[/URL] (272 MB big, 5909 .lua files, 27.2MB compressed)
Last edited by SunBeam on Thu Jan 01, 1970 12:00 am, edited 2 times in total.

User avatar
Vee_
Fearless Donors
Fearless Donors
Posts: 367
Joined: Tue Mar 14, 2017 10:18 am
Reputation: 27

Far Cry 5 - Lua Cleaner/Decompiler

Post by Vee_ » Tue Apr 17, 2018 2:56 am

Nice:eek::eek::eek::eek:

User avatar
Csimbi
RCE Fanatics
RCE Fanatics
Posts: 147
Joined: Sat Apr 29, 2017 9:04 pm
Reputation: 73

Far Cry 5 - Lua Cleaner/Decompiler

Post by Csimbi » Sat Apr 21, 2018 8:29 pm

[B]@ Sun[/B], has it been improved since my post on Xentax?

Thanks!

User avatar
SunBeam
Trouble Makers
Trouble Makers
Posts: 1684
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 329

Far Cry 5 - Lua Cleaner/Decompiler

Post by SunBeam » Sun Apr 22, 2018 5:24 pm

I don't really understand. Main post says the cleaner/decompiler does what it does. For other types of files use [B]Ekey[/B]'s unpacker. I won't be creating any Tools to deal with other files, as I'm not interested.

Post Reply

Who is online

Users browsing this forum: No registered users