Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Trouble extracting a .unity3d file with UnityRaw header [Battle Girl High School]

Featured Replies

  • Author
  • Localization

as013, posted Sat Apr 29, 2017 7:54 pm (22730)


I was extracting data (card images to be precise) from a card game called BGHS. Usually, I just use whatever tool I have (DisUnity, UnityEX, or QuickBMS with the unity3d_webplayer script, etc...) and I can get the texture in .tex format (card image) directly (Example of a UnityWeb .unity3d from the game). But after the latest game update, I can't use the conventional tools to extract anymore as they either cannot extract or will return a .txt file (approx. 600KB in size) instead of .tex file (usually 2MB in size). I also tried QuickBMS with the unityraw script, but it returned a .49 file, which, AFAIK, is also a text asset. Example of that UnityRaw file here. I really appreciate someone's assistance as I have been looking into this for over 100 hours.
edit: edit link. why did I mess up at something as simple as copy-paste urls
  • Author
  • Localization

as013, posted Sun Apr 30, 2017 5:18 am (22738)


That's the UnityWeb one. I can extract with most tools I currently have. But it's the UnityRaw one I'm having trouble with.
Urghh I pasted the wrong link.......
  • Author
  • Localization

Acewell, posted Sun Apr 30, 2017 7:41 am (22742)


if it really is an image the devs must have pulled some kind of trickery by changing the type and compressing it :P
  • Author
  • Localization

as013, posted Sun Apr 30, 2017 2:15 pm (22749)


Do you have any idea where to look at if I want to find out what kind of works they do to the files to get the image back from the .unity3d file? I mean, where exactly in the source code. Assembly-CSharp has about 32k methods and I don't want to read through all of them.
  • Author
  • Localization

Acewell, posted Sun Apr 30, 2017 3:37 pm (22758)


sorry i've no idea, that is out of my area :)
  • Author
  • Localization

as013, posted Sun Apr 30, 2017 3:44 pm (22759)


That's unfortunate. Thanks for your time reading and replying to my question. I will sit here patiently waiting for more ideas from people :)
  • Author
  • Localization

as013, posted Wed May 03, 2017 9:56 am (22839)


After spending some time looking at Assembly-CSharp.dll, I found out that they did indeed encrypt the file. In particular, this snippet of code appears only in the latest version of the game
Code:
if (bundleInfo.isCrypt)
   {
      TextAsset textAsset = (TextAsset)assetBundle.Load(bundleInfo.EscapePath, typeof(TextAsset));
      AssetBundle assetBundle2 = null;
      if (textAsset != null)
      {
         byte[] array2 = Cipher.DecryptRJ128ByteArray(bundleInfo.CryptKey, Cipher.DEFAULT_ASSET_BUNDLE_IV_128, textAsset.bytes);
         if (array2 != null)
         {
            assetBundle2 = AssetBundle.CreateFromMemoryImmediate(array2);
         }
      }
      assetBundle.Unload(true);
      UnityEngine.Object.Destroy(assetBundle);
      if (!(assetBundle2 != null))
      {
         return null;
      }
      assetBundle = assetBundle2;
   }

However, I know nearly nothing about cryptography so it would be appreciated if someone could take a look and help me.
Here's the dll.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.