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.

Sonicomi(*.npk)

Featured Replies

  • Author
  • Localization

Ekey, posted Tue Jul 05, 2016 8:18 pm (15049)


Encrypted with AES/256/CBC Vector (IV) from archive. File datas chunked, encrypted and compressed (deflate)

Code:
static unsigned char m_Key[32] = {
       0x65, 0xAB, 0xB4, 0xA8, 0xCD, 0xE0, 0xC8, 0x10, 0xBB, 0x4A, 0x26, 0x72, 0x37, 0x54, 0xC3, 0xA7,
       0xE4, 0x3D, 0xE9, 0xEA, 0x7F, 0x5B, 0xB8, 0x43, 0x50, 0x1D, 0x05, 0xAB, 0xCF, 0x08, 0xD9, 0xC1};


Code:
struct NPKHeader
{
   uint32_t   dwID; //Always NPK2
   uint32_t   dwFlag; //1 = Encrypted ?
   uint8_t    m_Vector[16]; //AES Vector (IV)
   uint32_t   dwTotalFiles;
   uint32_t   dwTableSize;
};
  • Author
  • Localization

Ekey, posted Tue Jul 05, 2016 10:24 pm (15056)


Maybe this 32 bytes is key for decrypt file data? :)
Code:
    getdstring IV 16 MEMORY_FILE2   # ???
    getdstring HASH 16 MEMORY_FILE2 # ???
  • Author
  • Localization

aluigi, posted Tue Jul 05, 2016 10:40 pm (15059)


Eh no, the key is right or the whole file is garbage.
  • Author
  • Localization

Ekey, posted Tue Jul 05, 2016 11:15 pm (15062)


Well key and vector from header are correct for decrypt file data.
  • Author
  • Localization

aluigi, posted Wed Jul 06, 2016 11:06 am (15080)


Everything is correct except the first 16 bytes of the extracted files.
  • Author
  • Localization

BlueBird, posted Mon Jul 11, 2016 2:49 pm (15188)


I keep getting an error every time:
Image

Btw, arc_unpacker just added Sonicomi support, and I can confirm it works:
https://github.com/vn-tools/arc_unpacker

You may want to look at the source code to see if it helps you correct the problems with sonicomi.bms, especially this part:
https://github.com/vn-tools/arc_unpacker/tree/master/src/dec/nitroplus

I'd do it myself, but I'm not very savvy on QuickBMS scripts or compression and encryption algorithms :(

But I would find it a huge help if the problems with the script were solved, as arc_unpacker can't be used to pack files, and the game doesn't support loading unpacked files.
  • Author
  • Localization

Ekey, posted Mon Jul 11, 2016 3:30 pm (15190)


I guess that script not valid for reimport files back.
  • Author
  • Localization

BlueBird, posted Mon Jul 11, 2016 3:51 pm (15191)


I actually get an error both when unpacking and reimporting. Does the former work for you? If so, I must be doing something wrong. Do you have to use the command line in this case? Because I've been using the GUI.
  • Author
  • Localization

Ekey, posted Mon Jul 11, 2016 5:34 pm (15192)


BlueBird wrote:
I actually get an error both when unpacking and reimporting.

Currently, this script does not work

BlueBird wrote:
If so, I must be doing something wrong. Do you have to use the command line in this case? Because I've been using the GUI.

aluigi wrote:
A couple of things to fix (read header of the script)
  • Author
  • Localization

BlueBird, posted Mon Jul 11, 2016 5:45 pm (15193)


Oh ok, just checking :lol:
  • Author
  • Localization

aluigi, posted Mon Jul 11, 2016 6:38 pm (15196)


The problem with the bytes of the extracted files was my fault.
Script 0.2 works perfectly but needs quickbms 0.7.5 which is not available yet.
  • Author
  • Localization

BlueBird, posted Tue Jul 12, 2016 6:29 am (15202)


I see, so it's just a matter of waiting now.

Thank you for your efforts, and same goes for Ekey :D
  • Author
  • Localization

aluigi, posted Tue Jul 12, 2016 11:27 am (15207)


That arc_unpacker supports many formats, would be interesting to have quickbms scripts for every format supported there.
Anyone interested in doing this huge conversion work? :D
  • Author
  • Localization

Ekey, posted Tue Jul 12, 2016 11:31 am (15210)


Game Extractor supported over 1000 formats. Do you want doing this huge conversion work? :D
  • Author
  • Localization

aluigi, posted Tue Jul 12, 2016 11:33 am (15211)


I already checked it and it does NOT support 1000 formats.
It supports maybe 1000 games where most of them use just ZIP or the same format.
Additionally they are all old games for which already exist a script (xentax_cs on my website) or other solutions.
Anyway it's a good challenge :D
  • Author
  • Localization

happyend, posted Wed Jul 13, 2016 12:31 am (15234)


Wait QuickBMS 0.75 release,thx aluigi&Ekey
  • Author
  • Localization

Methanol, posted Thu Jul 28, 2016 3:14 pm (15807)


So after upgrading QuickBMS this works fine for sound.npk, but has the same error trying to extract font.npk and 3d.npk.

Here's what extracting 3d.npk looks like (tries only 1 file):
Image

Sine 3d.npk is too big but font.npk has a similar issue, I give font.npk as a sample:
http://www100.zippyshare.com/v/fX0le6wc/file.html
  • Author
  • Localization

aluigi, posted Thu Jul 28, 2016 4:22 pm (15814)


I'm checking it but in the meantime I highly suggest you to use arc_unpacker that works with that file:
https://github.com/vn-tools/arc_unpacker (I used the latest nighly build)
Code:
arc_unpacker.exe --dec=nitroplus/npk2 --plugin=sonicomi font.npk
  • Author
  • Localization

aluigi, posted Thu Jul 28, 2016 4:45 pm (15816)


I rechecked my script and the code of arc_unpacker and it seems all ok, so I have removed my script.
  • Author
  • Localization

Methanol, posted Thu Jul 28, 2016 6:23 pm (15821)


The reason I am pursuant for a .bms script is so that I can perform repacking, something that arc_unpacker has said in their readme it does not support.

But it seems repacking the sound.npk using this .bms script causes discrepancies too, and makes some sounds not play in the game.

Wishful thinking, I guess...
  • Author
  • Localization

aluigi, posted Mon Sep 05, 2016 8:41 am (17242)


Ekey wrote:
Game Extractor supported over 1000 formats. Do you want doing this huge conversion work? :D

I will, step by step :D
They are very old games but it's worth to keep everything in bms language.
Just a plain conversion on the fly with time as priority so without doing any additional test or better reverse engineering.
  • Author
  • Localization

aluigi, posted Tue Sep 06, 2016 7:58 am (17257)


Some plugins of Game Extractor are really bad and this is not the first time.
Many fields are not read at all, some compressions are ignored or wrong and so on (an example is the MotoGP plugin compared with my original motogp script).
It looks like various plugins have not been tested or the reverse engineering work has been made only partially.
I have the sensation that I'm just wasting my time doing this porting...
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.