Comments (24)
from gzstool.
There's still another layer of XORing that's done to the files before the compression layer.
I found the function that I think does the XOR (sub_140062460) but I still have to understand that assembly and port it to c#.
from gzstool.
The smallest dat (300mb) if you just want to poke at that:
https://mega.nz/#!fZliWS4a!zWzFu_r8-xbRlFmPTSHEcxCrLjo99tGepnTganQKVCE
from gzstool.
Breaks on chunk0.dat after the patch, zlib error:
D:\users\unknown>J:\mgs\gzssurvive\GzsTool.exe "G:\SteamLibraryWin2\steamapps\common\METAL GEAR SURVIVE BETA\master\chunk0.dat"
45ada1c810e4.dat
197cd03f88edd.fpk
Unhandled Exception: Ionic.Zlib.ZlibException: Bad state (unknown compression method (0x34))
at Ionic.Zlib.InflateManager.Inflate(FlushType flush)
at Ionic.Zlib.ZlibCodec.Inflate(FlushType flush)
at Ionic.Zlib.ZlibBaseStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Ionic.Zlib.ZlibStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at Ionic.Zlib.ZlibBaseStream.UncompressBuffer(Byte[] compressed, Stream decompressor)
at Ionic.Zlib.ZlibStream.UncompressBuffer(Byte[] compressed)
at GzsTool.Core.Utility.Compression.Uncompress(Byte[] buffer)
at GzsTool.Core.Qar.QarEntry.ReadData(Stream input)
at GzsTool.Core.Qar.QarEntry.<>c__DisplayClass43_0.<ReadDataLazy>b__0()
at GzsTool.Core.Common.FileSystemDirectory.WriteFile(String filePath, Func`1 fileContentStream)
at GzsTool.Program.ReadArchive[T](String path)
at GzsTool.Program.Main(String[] args)
data1.dat
unpacks without a trouble, contents are full of garbage.
from gzstool.
Nice start Atvaark, thanks.
As said above, data1.dat extracts, but file contents are still encrypted.
from gzstool.
Very nice! I'm curious to poke at those textures. Some of the new visual design looks great. Looking forward to the release.
from gzstool.
Here is what I've got when I try to unpack "chunk0.dat"
But ftextool is working and scripts files are well decrypted ;)
from gzstool.
Excellent work! I tried having a stab at it but couldn't get very far at all, thanks for working it out so quickly!
I've started adding SSD filenames to MGSV dictionary project too, seems most of this game is reused from TPP so it's not too difficult to find the names (really hope the final game will be more than just a TPP clone though)
(btw, does anyone know what SSD stands for?)
EDIT: seems some files don't fully decrypt, see 24e187dc382eb.lua / 29ae3908e36f3.lua inside data1.dat for example
from gzstool.
(btw, does anyone know what SSD stands for?)
My best guess was (Metal Gear) Solid Survive Demo. I don't know if that's accurate though.
from gzstool.
I need the file extension name that match these hashes:
1531
7263 (wma, wmv, mp4 or something video related I guess)
from gzstool.
1531 = gkn / hhy (both give 1531)
7263 = wmv
from gzstool.
Slightly straying off-topic here, but @emoose, you might want to check out TinManTex's mgsv-lookup-strings.
from gzstool.
Speaking of strings, I have two memory dumps - online and main menu. Strings from them can be found here - https://mega.nz/#F!h0wzlRJQ!R5iMLhULQF6HhLocGWrAdQ
from gzstool.
data1.dat makes the game not respond when repacked and it appears there are some character encoding issues (for example with foxfs.dat) and purportedly with some luas.
from gzstool.
from gzstool.
So what can't this do yet?
from gzstool.
So far I only checked if I could unpack the dat and convert the ftex texture files to dds.
- There are no Survive exclusive file names
- Booting the game with any repacked files isn't tested.
Better unpack and repack with empty dictionaries in case Konami changed the file name hash algorithm - There appear to be some more custom encrypted files (like the lua files)
e.g. the new "gkn" files
from gzstool.
Ah. When you say that there are no Survive exclusive file names do you mean that the dictionary isn't updated?
from gzstool.
All seems to unpack fine now, thanks for the fix!
Also looks like the 1531 "gkn" extension is actually "param", as seen in TppDefine.lua:
"/Assets/ssd/level_asset/server/parameter/SsdWeaponParameters_opt.param"
EDIT: also seems the param files get updated from a Konami server, guess that's why they're encrypted. Hooking the cityhash functions shows it hashing the URL for them followed by another string being hashed that looks like the key, no idea if that key would match up with the .params in the QAR or if it's just for the web params though: https://pastebin.com/MPfzSGmq
from gzstool.
Likely their custom blowfish with a hardcoded key again.
(Like https://github.com/unknown321/mgsv_emulator)
from gzstool.
Hey, @Atvaark, @emoose, do you want to come to our Discord? We have all of the researchers there and I think that it would be easier to discuss issues there.
from gzstool.
Ah thanks for the info @Atvaark, you were right - what I thought was a key was actually just an md5 of the param file, the key was hardcoded in the exe as you guessed.
For anyone interested I've uploaded the decrypted param files along with the scripts I used to decrypt them (Blowfish algo sourced from https://github.com/unknown321/mgsv_emulator). Follow the link at https://pastebin.com/mqT1fCr8 (edit: updated with beautified JSON + missing encoder_consts.py I forgot to include...)
In a nutshell the files are zlib compressed and then encrypted with that custom blowfish algo, pretty simple. Not sure if you might want to add support in GzsTool to automatically decrypt the ones inside the QAR, would be a nice addition, but maybe not much point since they'll just get replaced with the server-side ones anyway (and SSD is always online ;_;)
from gzstool.
@emoose Could you explain how you got the param files from Konami's server? (Especially ones that aren't included in Survive's files like SsdSbmParameters.)
I'm trying to get the latest version of them; but I'm not sure where to begin outside of capturing traffic from the game.
Edit: Found the address. It's http://mgssd-game.cs.konami.net/ssdstmweb/parameter/
from gzstool.
Hi friends,
I have problem with GzsTools
When I try to unpack pes files (fpk)
Gives Error message
Like this
non-negative number required. parameter name value.
Please help..........
from gzstool.
Related Issues (16)
- GzsTool.exe (pftxs Support) HOT 2
- Output? HOT 4
- Gzstool problem HOT 13
- Non-negative number required. HOT 4
- Error in cpk file format version HOT 1
- v0.2.0 does not accommodate .6.ftexs file extensions HOT 3
- *other games* HOT 4
- Going Batty Over Here with OutOfMemoryException HOT 2
- Crashing upon compiling HOT 13
- No folder HOT 3
- Unpacking a dat in the same directory as the tool create the output folder at the root of the drive HOT 2
- Issue unpacking and repacking chunk0.dat HOT 5
- Unpacking error HOT 9
- Repacking SSD's data1.dat causes the game to fail to start. HOT 20
- Repacking an unmodified Chunk0 from TPP crashes the game HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gzstool.