Extracting data from bin file

curlyboy01

Newbie
Aug 18, 2018
88
22
I need help trying to extract a certain bin file to get its data to hopefully get it translated but all the software I tried doesn't work can someone help me please?

 

Tompte

Member
Dec 22, 2017
216
156
What kind of file is it? Or rather, there did you get it?

.bin as a file extension is generally used to just mean "arbitrary binary data", usually for some proprietary format. So you'll probably struggle to find an application that will open it natively, unless you know what format it actually is.

I did take a look and it doesn't have a commonly known file signature, so it's probably just a big block of compressed data.
 

curlyboy01

Newbie
Aug 18, 2018
88
22
What kind of file is it? Or rather, there did you get it?

.bin as a file extension is generally used to just mean "arbitrary binary data", usually for some proprietary format. So you'll probably struggle to find an application that will open it natively, unless you know what format it actually is.

I did take a look and it doesn't have a commonly known file signature, so it's probably just a big block of compressed data.
I got it from a game
 

Tompte

Member
Dec 22, 2017
216
156
Then it's probably a file specifically made for that game and nothing else.
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,474
4,470
Would that mean it's impossible to open with anything else? also in need of extracting the contents of a bin file.
OK.

So... file extensions are arbitrary. A developer could call his game asset file ".doc" if he wanted. Just because this is a "bin" file doesn't mean anything.

However there are some conventions in the wild west world of programming. And it is a convention that "bin" means "arbitrary binary data".

Presumably there is some structure in there. But unless you know the game engine, and that game engine has a known file format, then you're likely in trouble.

Having said that, for simplicity sake as a developer, it's possible the "bin" files are just many image datas all concatenated together. I've seen some people use tools to try to explore the content of unknown files. But it's also possible even if it contains image,s the image formats are not something that can be directly displayed like jpg or png.

Or it might actually be a bunch of separate files all compressed together with some simple algorithm like gz.

If you want to solve your puzzle, try to work out the game engine used, then look for specific unpacker tools for that engine.

This thread might help you: https://f95zone.to/threads/universal-ripping-tutorial-for-game-contents.39350/
 
  • Like
Reactions: samuel1154 and xj47

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,474
4,470
Daemon tool would only work if the "bin" file is a cdrom image. It's possible but seems a long shot.
 

hiya02

Member
Oct 14, 2019
171
98
Many apps use their own (often undocumented) file formats and then just slap a generic .bin or .dat extension. Have you checked how the file looks in a hex editor?
Even if you managed to extract the language files, you'd need to repack them afterwards to make the game work. Good luck!
 

shark_inna_hat

Active Member
Game Developer
Dec 25, 2018
705
2,761
I need help trying to extract a certain bin file to get its data to hopefully get it translated but all the software I tried doesn't work can someone help me please?

It's not any kind of zip/rar/tar file, it's not a disk image, there's no strings nor clear patterns. It's either encrypted or some arbitrary binary data blob (images, 3d models, audio?). Without knowing what game it came from or what might be inside - I doubt anyone here will be able to help you.
 

samuel1154

Member
May 7, 2018
418
440
OK.

So... file extensions are arbitrary. A developer could call his game asset file ".doc" if he wanted. Just because this is a "bin" file doesn't mean anything.

However there are some conventions in the wild west world of programming. And it is a convention that "bin" means "arbitrary binary data".

Presumably there is some structure in there. But unless you know the game engine, and that game engine has a known file format, then you're likely in trouble.

Having said that, for simplicity sake as a developer, it's possible the "bin" files are just many image datas all concatenated together. I've seen some people use tools to try to explore the content of unknown files. But it's also possible even if it contains image,s the image formats are not something that can be directly displayed like jpg or png.

Or it might actually be a bunch of separate files all compressed together with some simple algorithm like gz.

If you want to solve your puzzle, try to work out the game engine used, then look for specific unpacker tools for that engine.

This thread might help you: https://f95zone.to/threads/universal-ripping-tutorial-for-game-contents.39350/
Thanks for the quick response. Unfortunately the game engine for what im trying to extract is some weird proprietary wolf engine the dev made himself so not much seems to work for it but ill try all the methods I can. Heres the game if you felt like having a look yourself. https://f95zone.to/threads/translat...-busty-jks-mami-yuu-will-save-the-town.14656/
 

xj47

Member
Nov 4, 2017
241
408
Thanks for the quick response. Unfortunately the game engine for what im trying to extract is some weird proprietary wolf engine the dev made himself so not much seems to work for it but ill try all the methods I can. Heres the game if you felt like having a look yourself. https://f95zone.to/threads/translat...-busty-jks-mami-yuu-will-save-the-town.14656/
I've had a look at it. data.bin seems to have an index table at the end that maps file-names to locations in the binary.
Before the game loads anything it tries to load an (unencrypted) file locally before resorting to loading it from the binary.

So the good news is that if you can get it decrypted then it's easy to make changes, just place the changed files in a local folder and the game will use them.
The bad news is that I haven't figured out how to decrypt the data yet > _ >

Edit:
To give a practical example of the file-loading behaviour:
For me the extracted game folder path is "D:\Downloads\worldreformation\世直しクラブはキモチイイ♪ 巨乳JKマミとユウが町を救う!"
I can setup a .ogg file here "D:\Downloads\worldreformation\sound\マミタイトル.ogg" and the game will load & play it on the main menu

(You can use processmonitor to see which file-paths the game tries to load)
 

samuel1154

Member
May 7, 2018
418
440
I've had a look at it. data.bin seems to have an index table at the end that maps file-names to locations in the binary.
Before the game loads anything it tries to load an (unencrypted) file locally before resorting to loading it from the binary.

So the good news is that if you can get it decrypted then it's easy to make changes, just place the changed files in a local folder and the game will use them.
The bad news is that I haven't figured out how to decrypt the data yet > _ >

Edit:
To give a practical example of the file-loading behaviour:
For me the extracted game folder path is "D:\Downloads\worldreformation\世直しクラブはキモチイイ♪ 巨乳JKマミとユウが町を救う!"
I can setup a .ogg file here "D:\Downloads\worldreformation\sound\マミタイトル.ogg" and the game will load & play it on the main menu

(You can use processmonitor to see which file-paths the game tries to load)
I see so just figuring out how to decrypt it is the issue now.. Unfortunately I have no idea how to do that...
 
  • Red Heart
Reactions: osanaiko

xj47

Member
Nov 4, 2017
241
408
I see so just figuring out how to decrypt it is the issue now.. Unfortunately I have no idea how to do that...
Good news! I spent some more time with it and figured it out.
Here's a python 3 script to decrypt and unpack the data.bin file

If you have a lot of trouble running the script I could also upload the decrypted files manually, I just don't feel like uploading a 0.5 GB file unless I have to.
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,474
4,470
Good news! I spent some more time with it and figured it out.
Here's a python 3 script to decrypt and unpack the data.bin file
Dude, you're awesome!!!!

Was it a similar encryption scheme to standard Wolf RPG?
 

samuel1154

Member
May 7, 2018
418
440
Good news! I spent some more time with it and figured it out.
Here's a python 3 script to decrypt and unpack the data.bin file

If you have a lot of trouble running the script I could also upload the decrypted files manually, I just don't feel like uploading a 0.5 GB file unless I have to.
Thank you so much man had no trouble with the script at all your incredible.
 

curlyboy01

Newbie
Aug 18, 2018
88
22
Good news! I spent some more time with it and figured it out.
Here's a python 3 script to decrypt and unpack the data.bin file

If you have a lot of trouble running the script I could also upload the decrypted files manually, I just don't feel like uploading a 0.5 GB file unless I have to.
I fricking love you man
 

mario01

Member
Nov 3, 2020
380
1,988
Good news! I spent some more time with it and figured it out.
Here's a python 3 script to decrypt and unpack the data.bin file

If you have a lot of trouble running the script I could also upload the decrypted files manually, I just don't feel like uploading a 0.5 GB file unless I have to.
How does it work?
 

xj47

Member
Nov 4, 2017
241
408
How does it work?
You can look at the python script for the details.
The summary is that the base file needs to be decrypted by Xoring each byte with an extended key byte. Each byte in the extended key is generated from a base-key + the offset in the file.
Once decrypted the file has a pretty simple archive format with a header that specifies the files contained within and the rest of the file just holding the raw binary data.
 
  • Like
Reactions: ahoh