May be someone knows what the Script Engine is used to work with *.nut / *.nutx files (Magic Header ID is RIQS and in the end magic id is LIAT)?
Edited: Seems it's Squirrel programming language but not sure.
Nut Scripts
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Nut Scripts
Yes, they are compiled Squirrel scripts.
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Nut Scripts
Ok. Then there is another question: Is there a for compiled scripts Disassembler / Decompiler?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Nut Scripts
Honestly I didn't even know Squirrel but it looks like it's known in the gaming community and there are some decompilers available.
Just a quick google search reveals something interesting, like this project:
https://github.com/rockfireredmoon/icee ... /UTILITIES
I didn't test it.
Just a quick google search reveals something interesting, like this project:
https://github.com/rockfireredmoon/icee ... /UTILITIES
I didn't test it.
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Nut Scripts
NutCrack don't works. I guess because not supports Unicode strings. Thanks anyway.
-
- Posts: 64
- Joined: Tue Sep 08, 2015 11:27 am
Re: Nut Scripts
I've used NutCracker in the past and it's worked well.
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Nut Scripts
Thanks for source's. I've tried decompile provided by me scripts but got:
Problem here:
In script i changed DWORD value 2 at offset 0x6 > to 1 =
That error because strings length written with ANSI size but the string itself is written in UNICODE. I changed part code in BinaryReader.h - void ReadSQString( std::string& str ) for read UNICODE strings but while decompile i got some parts disassembled code like this:
I guess scripts from game compiled with newest or / older 2.2.4 version of Squirrel compiler, also seems developers have made some changes
Code: Select all
Error: NUT file compiled for different size of char that expected.
Problem here:
Code: Select all
if (reader.ReadInt32() != sizeof(char))
throw Error("NUT file compiled for different size of char that expected.");
In script i changed DWORD value 2 at offset 0x6 > to 1 =
Code: Select all
Error: Expected string object not found in source binary file.
That error because strings length written with ANSI size but the string itself is written in UNICODE. I changed part code in BinaryReader.h - void ReadSQString( std::string& str ) for read UNICODE strings but while decompile i got some parts disassembled code like this:
Code: Select all
// [003] bad allocation 3 0 0 0
::require($[stack offset 3]);
// [007] bad allocation 3 0 0 0
// [011] bad allocation 4 0 0 0
this.GMI_SETUP_DEPEND($[stack offset 3], $[stack offset 4]);
// [015] bad allocation 3 0 0 0
// [017] bad allocation 4 0 0 0
this.glog($[stack offset 3], $[stack offset 4]);
// [022] bad allocation 3 0 0 0
::require($[stack offset 3]);
// [027] bad allocation 3 0 0 0
::requiredir($[stack offset 3]);
I guess scripts from game compiled with newest or / older 2.2.4 version of Squirrel compiler, also seems developers have made some changes
Last edited by Ekey on Sun Oct 25, 2015 1:22 pm, edited 1 time in total.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: Nut Scripts
@einstein95
Any homepage/github/author? Just curious because I see no references on google except in some talks
Any homepage/github/author? Just curious because I see no references on google except in some talks
-
- Posts: 1383
- Joined: Sat Aug 09, 2014 2:34 pm
Re: Nut Scripts
aluigi wrote:@einstein95
Any homepage/github/author? Just curious because I see no references on google except in some talks
I see some talks only on Steam forums.