2

I've dug into files of a game that was made in Unity (which uses C# language)... and i was interested in extracting 3D models and textures etc. I understand that data and obb are separate, BUT! In my case, both of these have the same contents. Half textures are in data and half in obb.. i've been able to extract from data, but i came to a stop when i looked inside obb.

What i saw was a file named res.bytes, and i've been looking for ways to open/extract from a byte format but in the end it led me to scripting. Yes i've tried reverse engineering tools and other simple methods such as renaming it to .zip... no luck.

If there's anyone who knows how to open this byte file with a script i'd appreciate it.

8
  • Post the file. Ideally several files of the same format. This will help us determine the format of the file. Feb 9, 2021 at 13:27
  • 1
    I’d try UnityPack if you haven’t tried a Unity tool yet: I think some of the extra files get referenced from the main archives so unpacking one of the other files might unpack your res.bytes too.
    – Rup
    Feb 10, 2021 at 2:24
  • did you try to open the file with a hex editor and check its magic attribute? for example when mentioning that you renamed the file to .zip, it would only work if the first two bytes were converted to ASCII with PK result, could you open it in a hexadecimal editor and send the first 10 bytes? I think that way we could find the used compression method.
    – Happy
    Feb 11, 2021 at 13:31
  • @pythonpython the file is over 1gb, but if you're still willing to give it a go i've uploaded it on my drive > drive.google.com/drive/folders/…
    – user35770
    Feb 11, 2021 at 15:39
  • @0x0A Here are the first 10 bytes (if this is what you mean) after opening it in the hex editor... 06 49 05 00 00 00 00 00 94 14 00 00 17 00 5F 43 4A 5F 45 41 5F 46 47 5A 41 45 4D 56 52 32 30 33 33 2E 70 61 6B 00 00 00 00 14 00 5F 43 4A 5F 45 41 5F 46 4C 54 50 41 51 50 54 4A 2E 70 61 6B 22 94 00 00 11 00 5F 43 4A 5F 45 41 5F 46 4F 45 45 5A 52 2E 70 61 6B 1A C0 03 00 13 00 5F 43 4A 5F 45 41 5F 46 basically this huge file contains more files inside with .pak file format... hope this information helps
    – user35770
    Feb 11, 2021 at 15:55

1 Answer 1

1

This file seems to have some kind of header followed by an array of UnityFS files.

Although I won't be writing a script for you, it should not be too difficult to write one that can at least extract all the UnityFS files contained by it.

I believe there are tools that can read UnityFS files, but I didn't test any of them.

Here's what I found out about this file:

File data

Once you found the first UnityFS file, you can figure out where the next one is by reading it's header and getting it's size. Note that the values in the header are all big-endian.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.