KaguyaX 发表于 2023-7-19 00:35

一款冷门游戏.bin文件加密

本帖最后由 KaguyaX 于 2023-7-19 00:36 编辑

解密出来是这样的,010打开并不是直接可读的内容,推测是类似分层一样的文件结构?

国外有大佬写过解密软件,但是那个软件没有64位,并且无法直接通过VS编译成64位程序
https://github.com/gibbed/Gibbed.Cryptic/tree/main
这个是大佬写的项目
https://github.com/PlumberTaskForce/Datamining-Guide
这个是Datamining的教程,主要是第二步和第四步:
Step 2: Preparing the tools
You have the environment set up, good. Next up, you need to set up your tools.

Launch your Holodeck (Live) installation of Star Trek Online, and log in to your account, and then any of your characters.

Now launch your Windows Command Prompt with Administrator permissions. This is very important, as we'll be hooking the STO process, and this cannot be done without admin permissions.

In the command prompt, navigate to <your target environment>\Tools\Gibbed, and run Gibbed.Cryptic.ExportSchemas.exe. This will take a couple minutes, and when it's done, you can close your game.

Now comes a tricky part. You will need to make certain modifications to the XML files before you proceed. In the file explorer, go to <your target environment>\Tools\Gibbed\schemas\Star Trek Online\Live\schemas.

When in there, you will want to locate the following files:

TexWord.schema.xml
UIGenSMFState.schema.xml
UIGenTestModelParse.schema.xml
Delete that last file, and open the other 2 in your text editor.

In TexWord, locate a column node, with name of Size, and change its type to IGNORE.

In UIGenSMFState, locate a column node with name of AnchorBlocks, and change its type to IGNORE.

Save both files, and return to the Command Prompt. There, run Gibbed.Cryptic.GenerateSerializer.exe -g StarTrekOnline Latest.dll. Wait until the process completes (this will take a while).

When it's done, return to the file explorer, and in it, to Gibbed directory. Locate Latest.dll, and move it to serializers\assemblies.

Then, in the file explorer, go to Gibbed\serializers\resources, and locate ClientMessages.serializer.json. Open the file in your text editor, find the versions array, and replace its contents with "Latest". Don't close the file just yet.

This is only necessary with large game updates, and once they happen, you can just regenerate the Latest.dll file, and replace it in the target directory.

Step 4: Extracting the game resourcesThis set will briefly explain unpacking .BIN files to XML.

In the Command Prompt, run Gibbed.Cryptic.ConvertResource.exe -x "<your target environment>\Hoggs\bin\ClientMessagesEnglish.bin" "<your target environment>\Data\ClientMessages". Note that if the target directory exists, you will need to delete it.

On the first run, the tool will error out saying Don't know how to handle 'ClientMessagesEnglish'with a hash of 'somenumber'. You need to note down this number, and then switch back to your text editor.

In the editor, locate parser_hash, and replace its value with the number you noted down. Switch back to Command Prompt and rerun the last command.

Note that editing the .json file is not necessary with each update, just with the major ones.
Step 4: Extracting the game resources
This set will briefly explain unpacking .BIN files to XML.

In the Command Prompt, run Gibbed.Cryptic.ConvertResource.exe -x "<your target environment>\Hoggs\bin\ClientMessagesEnglish.bin" "<your target environment>\Data\ClientMessages". Note that if the target directory exists, you will need to delete it.

On the first run, the tool will error out saying Don't know how to handle 'ClientMessagesEnglish'with a hash of 'somenumber'. You need to note down this number, and then switch back to your text editor.

In the editor, locate parser_hash, and replace its value with the number you noted down. Switch back to Command Prompt and rerun the last command.

Note that editing the .json file is not necessary with each update, just with the major ones.
Gibbed.Cryptic.ConvertResource.exe就是需要用到的exe,主要用途是用来转换ClientMessagesEnglish.bin为正常的xml文件等。
Gibbed.Cryptic.ExportSchemas.exe这个exe就是32位的exe,无法挂载64位的游戏进程。


目前存在2个问题:


已知的Gibbed.Cryptic.ConvertResource.exe需要parse hash才能进行解密,但是当我直接运行时,反而没有跳出这段提示:

Don't know how to handle 'ClientMessagesEnglish' with a hash of 'somenumber'

结合了下搜索引擎以及AI等,大体错误可能在自定义的Deserialize内

实际报错的地方也就是这里
在Program.cs中,写过一个输出语句,input里就是文件流,但是仍旧报错。而且错误不是Don't know how to handle 'ClientMessagesEnglish' with a hash of 'somenumber'。

个人推测有可能是厂商修改了加密?导致原先的解密函数无法使用。

外网大佬也联系不上,他表示不是很感兴趣。有人愿意付钱给他他也不想做。

求大佬们解答


ClientMessagesEnglish.bins是游戏的文本文件,想着能不能一步一步来最后尝试做一个汉化补丁。


.bin文件以及我编译好的程序包括源码:



链接:https://pan.baidu.com/s/1kdmJdRUKH3PpXfhvIu6Ldg?pwd=xtbx
提取码:xtbx







页: [1]
查看完整版本: 一款冷门游戏.bin文件加密