Help to extract unknow version UnityFS (alice gear aegis)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
misorasyu
Posts: 1
Joined: Fri Dec 17, 2021 4:44 pm

Help to extract unknow version UnityFS (alice gear aegis)

Post by misorasyu »

AssetStudio is a fantastic tool which can extract most of .unity3d files of this game.
However some strange files without version 6 follow by UnityFS cannot be recognized by AssetStudio/UABEA/UABE.
Image

The common UnityFS should be
Image

I think the header part of the 1st one has been encrypted or compressed.
How to decrypt/decompress it?

The attachment contains two .unity3d files.
One is the normal case can be extracted by AssetStudio and the other is the abnormal case with strange header.
Both two .unity3d files come from the same game, that is Alice Gear Aegis, and have similar binary structure because they are two models of the same character.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help to extract unknow version UnityFS (alice gear aegis)

Post by aluigi »

I think it just has 128 bytes xored with a fixed key.

Since I don't know if the key is fixed for all your files, I have made a script for quickbms that automatically retrieve it and decrypts the file:

Code: Select all

get NAME basename
get EXT extension
string NAME p "%s_new.%s" NAME EXT

encryption xor "\0\0\0\x065.x.x\x002018.4"
log MEMORY_FILE 8 16
encryption "" ""
getdstring KEY 16 MEMORY_FILE

log NAME 0 8
append
encryption xor KEY "" 0 16
log NAME 8 0x88
encryption "" ""
get SIZE asize
math SIZE - 0x88
log NAME 0x88 SIZE
append

*update* I forgot to set the size of the key in Encryption, now fixed
LuigiwithTHEDoNg
Posts: 28
Joined: Sat May 22, 2021 4:22 am

Re: Help to extract unknow version UnityFS (alice gear aegis)

Post by LuigiwithTHEDoNg »

I also saw it uses Blowfish and AES encryption in the game's mono scripts for those assets.
LuigiwithTHEDoNg
Posts: 28
Joined: Sat May 22, 2021 4:22 am

Re: Help to extract unknow version UnityFS (alice gear aegis)

Post by LuigiwithTHEDoNg »

Plus, some assets which have a lower version of unity don't have that odd header than the ones from 2018.4.32 and above.
LuigiwithTHEDoNg
Posts: 28
Joined: Sat May 22, 2021 4:22 am

Re: Help to extract unknow version UnityFS (alice gear aegis)

Post by LuigiwithTHEDoNg »

but...there are some files that are not opening in assetstudio (even from your script)

still unknown headers.zip
einherjar007
Posts: 35
Joined: Fri Sep 20, 2019 7:55 am

Re: Help to extract unknow version UnityFS (alice gear aegis)

Post by einherjar007 »

Code: Select all

encryption xor KEY "" 0 16
log NAME 8 0x80


There seems to be files with different cut lengths.
I checked only the sample. Change 0x88 at this point to 0x80. Only one of the three.