NPK Archive - New Compression?

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
akderebur
Posts: 68
Joined: Wed Nov 15, 2017 1:54 pm

NPK Archive - New Compression?

Post by akderebur »

I have encountered a npk archive in a new Netease game, that seems to be a bit different from previous npks. Here is a small sample : http://www.mediafire.com/file/5ri6f7hhr ... n.npk/file

ToC and the files don't seem to be encrypted. The "nxpk.bms" is still valid for reading the ToC (no change there), but I have just noticed that the "FLAGS" value is mostly 1 now. It was 0 for zstd, and 2 for lz4 in previous npks. So I was thinking maybe a different compression type?

I don't know the english name of the game, that is why I didn't mention it. This is the app store page for it : Store Link
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: NPK Archive - New Compression?

Post by aluigi »

Interesting, this new compression has the first byte starting ever with 0xe9 but FLAGS is the same for both this type and the normal zlib, example:

Code: Select all

. 00000062
. 001c9e54 get     NAME_CRC   0x3aacd148 4
. 001c9e58 get     OFFSET     0x000539c4 4
. 001c9e5c get     ZSIZE      0x000000a9 4
. 001c9e60 get     SIZE       0x0000010d 4
. 001c9e64 get     ZCRC       0x1603475f 4
. 001c9e68 get     CRC        0x663665d7 4
. 001c9e6c get     FLAGS      0x00000001 4
  000539c4 269        00000062.dat <-- this is zlib
.
. 00000063
. 001c9e70 get     NAME_CRC   0x3b3cc79b 4
. 001c9e74 get     OFFSET     0x0005c1e8 4
. 001c9e78 get     ZSIZE      0x000001db 4
. 001c9e7c get     SIZE       0x00000523 4
. 001c9e80 get     ZCRC       0xf7d6aab3 4
. 001c9e84 get     CRC        0x4c6c7f67 4
. 001c9e88 get     FLAGS      0x00000001 4
  0005c1e8 1315       00000063.dat <-- this is the new compression

I tried only replacing zlib with zlibx and it didn't work.
I didn't try anything else.
akderebur
Posts: 68
Joined: Wed Nov 15, 2017 1:54 pm

Re: NPK Archive - New Compression?

Post by akderebur »

Weird. Do you think it is some kind of zlib variant? I don't think they would come up with a whole new compression method.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: NPK Archive - New Compression?

Post by aluigi »

I have no theories at the moment