Farming Simulator17 L32/L64 data

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
lubr97
Posts: 2
Joined: Sun Sep 06, 2020 6:49 pm

Re: Farming Simulator17 L32/L64 data

Post by lubr97 »

Gerys wrote:Here is the file for quickbms (l32/l64).


Thanks.
Now I have a .luc file but when I use it with luajit the output is empty. Can someone explain to me all the steps I have to do from the .l64 file to get a readable .lua file? Thanks
Peppe978
Posts: 2
Joined: Fri Mar 25, 2016 2:18 pm

Re: Farming Simulator17 L32/L64 data

Post by Peppe978 »

Gerys wrote:Here is the file for quickbms (l32/l64).


does not work. only some parts are converted.
Gerys
Posts: 9
Joined: Sun Feb 09, 2020 7:27 am

Re: Farming Simulator17 L32/L64 data

Post by Gerys »

Python version 3.4.3 from the official website. If there is another version, from Microsoft, for example, it does not want to work - it writes a syntax error, and therefore the output file is 0 bytes.
Last edited by Gerys on Fri Oct 30, 2020 5:56 pm, edited 2 times in total.
Gerys
Posts: 9
Joined: Sun Feb 09, 2020 7:27 am

Re: Farming Simulator17 L32/L64 data

Post by Gerys »

Quickbms (l32/l64).

see below
Last edited by Gerys on Sun Nov 29, 2020 1:53 pm, edited 5 times in total.
Gerys
Posts: 9
Joined: Sun Feb 09, 2020 7:27 am

Re: Farming Simulator17 L32/L64 data

Post by Gerys »

Quickbms (l32/l64).

Write to pm.
Last edited by Gerys on Sun Nov 29, 2020 1:53 pm, edited 2 times in total.
leone98
Posts: 18
Joined: Sat Jul 15, 2017 7:48 am

Re: Farming Simulator17 L32/L64 data

Post by leone98 »

hello i use l64decode for python but when open the script python closse immediatly why? thanks for help
leone98
Posts: 18
Joined: Sat Jul 15, 2017 7:48 am

Convert l64file

Post by leone98 »

Hello i try to convert the l64 to lua with l64 decoder but when run the script with cmd with administator mode, the file not convert in lua. Help me thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Farming Simulator17 L32/L64 data

Post by aluigi »

@leone98
Please don't open new topics.
random418
Posts: 1
Joined: Wed Dec 09, 2020 9:09 am

Re: Farming Simulator17 L32/L64 data

Post by random418 »

Mmtrx wrote:Ok, solved. The l64 files are obfuscated by a 64-bit key that gets decreased by 8 for each consecutive 8-byte block. After de-obfuscating, you can feed the l64 files to luajit-decompiler to get readable Lua sources.


Hi, could you explain how to de-obfuscate the l64 files? I've been able to run through every step, but when using the LuaJit decompiler, I get an I/O error for most files, probably due to the obfuscation you described.
leone98
Posts: 18
Joined: Sat Jul 15, 2017 7:48 am

Re: Farming Simulator17 L32/L64 data

Post by leone98 »

@random418, read privatemessages that sent thanks
leone98
Posts: 18
Joined: Sat Jul 15, 2017 7:48 am

Re: Farming Simulator17 L32/L64 data

Post by leone98 »

random418 wrote:
Mmtrx wrote:Ok, solved. The l64 files are obfuscated by a 64-bit key that gets decreased by 8 for each consecutive 8-byte block. After de-obfuscating, you can feed the l64 files to luajit-decompiler to get readable Lua sources.


Hi, could you explain how to de-obfuscate the l64 files? I've been able to run through every step, but when using the LuaJit decompiler, I get an I/O error for most files, probably due to the obfuscation you described.



random418 read the private messages thanks
Tbfarmer
Posts: 1
Joined: Sun Jan 31, 2021 11:07 pm

Re: Farming Simulator17 L32/L64 data

Post by Tbfarmer »

Mmtrx wrote:Seems that the .l64 luajit byte code files have been encrypted, after being dumped with luajit. If somebody could find the decrypt algorithm, I could use a luajit-decompiler to get (close to) the original Lua source. Based on the 2 files by kenny2801, I attach a sample of the plain and encrypted .l64 files.

Ok, solved. The l64 files are obfuscated by a 64-bit key that gets decreased by 8 for each consecutive 8-byte block. After de-obfuscating, you can feed the l64 files to luajit-decompiler to get readable Lua sources.

Since I was interested in the field mission system, I attach AbstractFieldMission.lua, AbstractMission.lua as an example.



How do you deobfuscate the file?
Mmtrx
Posts: 3
Joined: Wed May 13, 2020 6:56 pm

Re: Farming Simulator17 L32/L64 data

Post by Mmtrx »

You can find a deobfuscator here: https://github.com/chill1Penguin/l64decode
thediabl0
Posts: 21
Joined: Wed Nov 18, 2015 4:04 pm

Re: Farming Simulator17 L32/L64 data

Post by thediabl0 »

Mmtrx wrote:You can find a deobfuscator here: https://github.com/chill1Penguin/l64decode


I can run shapesUnlocker.py with python 3.9, but l64decode.py I can't see nothing...
wisniagames239
Posts: 2
Joined: Tue Feb 02, 2021 8:26 pm

Re: Farming Simulator17 L32/L64 data

Post by wisniagames239 »

thediabl0 wrote:
Mmtrx wrote:You can find a deobfuscator here: https://github.com/chill1Penguin/l64decode


I can run shapesUnlocker.py with python 3.9, but l64decode.py I can't see nothing...



You can run the script using cmd where you give the input and output path, but I didn't do it myself, because the message "Python" pops up
MrPersistent
Posts: 2
Joined: Wed Jul 21, 2021 7:09 am

Re: Farming Simulator17 L32/L64 data

Post by MrPersistent »

Hi, apologies for asking the same question, however I've been trying to get this method figured out for a long time. I have the l64 files which I use l64decode.py to decode but the end result is still in hex form and very hard to read.

Not sure if this is obfuscated or not. I tried to use the recommended luajit decoder on them but it states "cannot load incompatible bytecode".

Hopefully I'm on the right track at least.

I would greatly appreciate any help.
MrPersistent
Posts: 2
Joined: Wed Jul 21, 2021 7:09 am

Re: Farming Simulator17 L32/L64 data

Post by MrPersistent »

I got it working! The batch file luajit decompiler did not work for me, non of the 3 versions of it did.

This l64decode works great for converting the l64 files. Then to convert the LUAjit files it outputs, I used this luajitdecomiler.

This is the argument to use with l64decode's "l64decode.py" to convert all files in a folder and output them into a new folder.

--recursive "C:\Users\username\Documents\Script Extraction\source" "C:\Users\username\Documents\Script Extraction\luajit"

This is the argument to use with the luajitdecomiler's "main.py" to convert all files in a folder and output them into a new folder.

--recursive "C:\Users\username\Documents\Script Extraction\luajit" --dir_out "C:\Users\username\Documents\Script Extraction\luajitConverted" --catch_asserts

optional use of "--catch_asserts" on the end of luajitdecomiler's argument is to "Prevent most integrity asserts from canceling decompilation"

-Don't output your converted files in the same folder or in a subfolder of the source folder as the converting process will try to read them aswell which will throw some errors and create blank doubled files..

Success at last :)

Thank-you to everyone and this forum!
Gerys
Posts: 9
Joined: Sun Feb 09, 2020 7:27 am

Re: Farming Simulator17 L32/L64 data

Post by Gerys »

Cool, he finalized the code. The if a ~ = b error when correct if a == b no longer appears).
Gerys
Posts: 9
Joined: Sun Feb 09, 2020 7:27 am

Re: Farming Simulator17 L32/L64 data

Post by Gerys »

There is a new error, now the function a (nil,, 23) does not write nil everywhere, although you need a (nil, nil, 23) .... ))
Gerys
Posts: 9
Joined: Sun Feb 09, 2020 7:27 am

Re: Farming Simulator17 L32/L64 data

Post by Gerys »

This is what I mean luajitdecomiler