How do you extract a Unity game's BIN files to retrieve the strings it stores?

How to translate the files of a game
duplis
Posts: 3
Joined: Thu Jul 20, 2017 8:40 pm

How do you extract a Unity game's BIN files to retrieve the strings it stores?

Post by duplis »

EDIT: Just realized I posted this in the wrong subforum... sorry about that.

So I began playing Albion Online and as a web developer I decided I wanted to make some tools for the playerbase... the only problem? Albion Online doesn't have an API. I messaged them on Twitter and they replied back that while they don't have an API, they told me "all of the strings you are looking for are in the game files".

The things I am looking for are the item tooltips, dialogue, weapon/armor/etc. stats... all of that good stuff.

I scoured through all of the files and the only files that are not meshes or images are the BIN files, and they are named like they contain the strings I am looking for, and the folder is named "GameData". Here are what a few of the BIN files are named so you can see what leads me to believe these contain all of the strings/text/etc. that I am missing:

Code: Select all

- localization.bin <--- this is the big one
- items.bin   <--- as well as this one

- achievements.bin
- gamedata.bin
- loot.bin
- missions.bin


So as you can see, the only data I'm missing, the text on tooltips, item stats, etc., all correlate with the names of the BIN files - not to mention they're the only files left I haven't extracted, and the tweet said "everything is in the game files" when I brought up the item information and all of that.


So the question is: how the hell do I extract a Unity BIN file?

I've tried mounting it, doing a hexdump, even went as far as to install Unity3D to see if I could make something magical work, along with a lot of other random shit that didn't work.


Any help at all would be appreciated guys! And let me know if you need a copy of one of them if you want to try to get it opened yourself!
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: How do you extract a Unity game's BIN files to retrieve the strings it stores?

Post by MerlinSVK »

These .bin files are XML files, gziped and encrypted with DES. And they have nothing to do with Unity.

Code: Select all

# Albion Online BIN decrypter + unpacker
# script for QuickBMS http://quickbms.aluigi.org

set KEY binary "\x30\xEF\x72\x47\x42\xF2\x04\x32"
set IV binary  "\x0E\xA6\xDC\x89\xDB\xED\xDC\x4F"

get SIZE asize
get NAME basename
string NAME += ".xml"
log MEMORY_FILE 0 0

encryption des_cbc KEY IV
log MEMORY_FILE 0 SIZE
encryption "" ""

comtype gzip
clog NAME 0 SIZE SIZE MEMORY_FILE


I've tried to make a packer (success) and crypter (fail), so... can any body help?
duplis
Posts: 3
Joined: Thu Jul 20, 2017 8:40 pm

Re: How do you extract a Unity game's BIN files to retrieve the strings it stores?

Post by duplis »

MerlinSVK wrote:These .bin files are XML files, gziped and encrypted with DES. And they have nothing to do with Unity.

Code: Select all

# Albion Online BIN decrypter + unpacker
# script for QuickBMS http://quickbms.aluigi.org

set KEY binary "\x30\xEF\x72\x47\x42\xF2\x04\x32"
set IV binary  "\x0E\xA6\xDC\x89\xDB\xED\xDC\x4F"

get SIZE asize
get NAME basename
string NAME += ".xml"
log MEMORY_FILE 0 0

encryption des_cbc KEY IV
log MEMORY_FILE 0 SIZE
encryption "" ""

comtype gzip
clog NAME 0 SIZE SIZE MEMORY_FILE


I've tried to make a packer (success) and crypter (fail), so... can any body help?

Ah okay, appreciate the answer. I have no real clue what I am doing, kind of just googling shit and hoping I get lucky - seems like you're much closer to the answer than I am!
MerlinSVK
Posts: 165
Joined: Wed Aug 13, 2014 10:00 am

Re: How do you extract a Unity game's BIN files to retrieve the strings it stores?

Post by MerlinSVK »

Can the game run with decrypted files (localization.xml, ...)?