Genshin Impact Full release .blk Encryption

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
yretenai
Posts: 8
Joined: Wed Oct 07, 2020 5:57 am

Re: Genshin Impact Full release .blk Encryption

Post by yretenai »

Teapot wrote:Keep it on topic guys. We're here to talk about the decryption of the final release.

I got some friends working on it, yet will need to see if they can do it. They said it's a pretty hard encryption and safety method they are using.


Asset decryption is only half of it. ctable.dat/ctable_streamed.dat is what I suspect to be CB2's asset_index. We also need to decrypt that file to get more data on how to split block files post-decryption.
Teapot
Posts: 9
Joined: Wed Mar 25, 2020 7:41 pm

Re: Genshin Impact Full release .blk Encryption

Post by Teapot »

yretenai wrote:
Teapot wrote:Keep it on topic guys. We're here to talk about the decryption of the final release.

I got some friends working on it, yet will need to see if they can do it. They said it's a pretty hard encryption and safety method they are using.


Asset decryption is only half of it. ctable.dat/ctable_streamed.dat is what I suspect to be CB2's asset_index. We also need to decrypt that file to get more data on how to split block files post-decryption.


I also thought that. But I have my doubts. Because of the file size. In both CBT3 and final release they are exactly 27,500KB and are exactly the same inside.
yretenai
Posts: 8
Joined: Wed Oct 07, 2020 5:57 am

Re: Genshin Impact Full release .blk Encryption

Post by yretenai »

Teapot wrote:I also thought that. But I have my doubts. Because of the file size. In both CBT3 and final release they are exactly 27,500KB and are exactly the same inside.


I wonder if they just didn't change anything from CBT3 or if they stream the table
Teapot
Posts: 9
Joined: Wed Mar 25, 2020 7:41 pm

Re: Genshin Impact Full release .blk Encryption

Post by Teapot »

yretenai wrote:
Teapot wrote:I also thought that. But I have my doubts. Because of the file size. In both CBT3 and final release they are exactly 27,500KB and are exactly the same inside.


I wonder if they just didn't change anything from CBT3 or if they stream the table


I can tell you they did change stuff. If it was the asset_index, it shouldn't be exactly the same on both. I highly doubt the game is streaming anything related to the decryption because you can start the game offline and get to main menu, and the assets on main menu are in those blk files. So it can't be else you couldn't see that. Everything must be local, just have to find a way.
yretenai
Posts: 8
Joined: Wed Oct 07, 2020 5:57 am

Re: Genshin Impact Full release .blk Encryption

Post by yretenai »

Teapot wrote:
yretenai wrote:
Teapot wrote:I also thought that. But I have my doubts. Because of the file size. In both CBT3 and final release they are exactly 27,500KB and are exactly the same inside.


I wonder if they just didn't change anything from CBT3 or if they stream the table


I can tell you they did change stuff. If it was the asset_index, it shouldn't be exactly the same on both. I highly doubt the game is streaming anything related to the decryption because you can start the game offline and get to main menu, and the assets on main menu are in those blk files. So it can't be else you couldn't see that. Everything must be local, just have to find a way.


I know it loads about 3 or 4 blks outside of the resource table. Could be stored in there.

As for Unity file parsing: animations aren't the only thing that are changed in format. Game objects and renderers are broken too which are needed to correctly parse skeletons.
Giordyman
Posts: 2
Joined: Mon Oct 05, 2020 9:57 pm

Re: Genshin Impact Full release .blk Encryption

Post by Giordyman »

Which are the animation files? I don't seem to see them
yretenai
Posts: 8
Joined: Wed Oct 07, 2020 5:57 am

Re: Genshin Impact Full release .blk Encryption

Post by yretenai »

Giordyman wrote:Which are the animation files? I don't seem to see them


They're all over the place. It'll be easier to find files once you figure out your way around.
You can do a search for the string "Ani_Avatar_Girl_RunCycle"
pechenuxa
Posts: 3
Joined: Thu Apr 02, 2020 4:15 pm

Re: Genshin Impact Full release .blk Encryption

Post by pechenuxa »

Then i am trying to export model with skeleton, fixed asset studio gives this error:
Image

an object reference does not point to an instance of an object
In result, the nodes(skeleton) are only exported.
Asset studio can load the objects, but can't export them...
Image
Dummy
Posts: 5
Joined: Sun Oct 11, 2020 7:41 pm

Re: Genshin Impact Full release .blk Encryption

Post by Dummy »

Can it export static meshes or is nothing working?

Also what version of the game are you using? I can't load any meshes or textures from the game. Only general unity assets
yretenai
Posts: 8
Joined: Wed Oct 07, 2020 5:57 am

Re: Genshin Impact Full release .blk Encryption

Post by yretenai »

pechenuxa wrote:Then i am trying to export model with skeleton, fixed asset studio gives this error:

an object reference does not point to an instance of an object
In result, the nodes(skeleton) are only exported.
Asset studio can load the objects, but can't export them...


Dummy wrote:Can it export static meshes or is nothing working?

Also what version of the game are you using? I can't load any meshes or textures from the game. Only general unity assets


A lot of formats changed, exporting tends to not work.

Right now we're still trying to decrypt the live game so don't expect fixes.
Teapot
Posts: 9
Joined: Wed Mar 25, 2020 7:41 pm

Re: Genshin Impact Full release .blk Encryption

Post by Teapot »

Bump
AnAmazingGuy
Posts: 3
Joined: Thu Oct 15, 2020 1:59 pm

Re: Genshin Impact Full release .blk Encryption

Post by AnAmazingGuy »

Hard stuff..
We need to figure out the XOR encryption; thus reverse engineer the client which is, itself, protected by VMprotect..
We have a community trying its hand at it, if anyone is interested to help and join the discord.
yretenai
Posts: 8
Joined: Wed Oct 07, 2020 5:57 am

Re: Genshin Impact Full release .blk Encryption

Post by yretenai »

AnAmazingGuy wrote:Hard stuff..
We need to figure out the XOR encryption; thus reverse engineer the client which is, itself, protected by VMprotect..
We have a community trying its hand at it, if anyone is interested to help and join the discord.


Which Discord? I'm awful with encryption but I'm in the process of fixing AssetStudio to work with the modified CBT formats.
AnAmazingGuy
Posts: 3
Joined: Thu Oct 15, 2020 1:59 pm

Re: Genshin Impact Full release .blk Encryption

Post by AnAmazingGuy »

Pm'ed
Hanabi
Posts: 1
Joined: Sat Oct 17, 2020 3:42 pm

Re: Genshin Impact Full release .blk Encryption

Post by Hanabi »

Even when extraction gets figured out am I safe to assume that the anti-cheat will prevent us from ever modifying the blk files? Would love to replace some textures and be able to modify meshes but I'm assuming this will never be a safe option.
yretenai
Posts: 8
Joined: Wed Oct 07, 2020 5:57 am

Re: Genshin Impact Full release .blk Encryption

Post by yretenai »

Hanabi wrote:Even when extraction gets figured out am I safe to assume that the anti-cheat will prevent us from ever modifying the blk files? Would love to replace some textures and be able to modify meshes but I'm assuming this will never be a safe option.


Right now the game doesn't freak out when you are missing blk files, it just either freezes the renderer or crashes if it tries to load something that isn't there. I don't think modifying the game will trip up the anti cheat but it might. There were checksums in CB2 for the unity files inside of the blocks.
Yokujin
Posts: 2
Joined: Sat Oct 17, 2020 6:05 pm

Re: Genshin Impact Full release .blk Encryption

Post by Yokujin »

has anyone figued out if the object (chest etc) coords are in the files?
yretenai
Posts: 8
Joined: Wed Oct 07, 2020 5:57 am

Re: Genshin Impact Full release .blk Encryption

Post by yretenai »

Yokujin wrote:has anyone figued out if the object (chest etc) coords are in the files?


Nope. Intractable objects map info is not stored locally. At least not the Anemocules and Geocules, haven't checked chests yet but I assume not
SneatX
Posts: 1
Joined: Sun Oct 18, 2020 11:26 am

Re: Genshin Impact Full release .blk Encryption

Post by SneatX »

Hello, may I ask if we're able to get images that show up on wish sequence such as characters and weapons?
I tried finding them online but I need them high quality. Would that method work for my favor? If not, do you have any ideas about where can I rip those from?
Yokujin
Posts: 2
Joined: Sat Oct 17, 2020 6:05 pm

Re: Genshin Impact Full release .blk Encryption

Post by Yokujin »

yretenai wrote:
Yokujin wrote:has anyone figued out if the object (chest etc) coords are in the files?


Nope. Intractable objects map info is not stored locally. At least not the Anemocules and Geocules, haven't checked chests yet but I assume not

what a shame, else we could have made an object map like the botw one