Need help for Demon Seals 《镇魔曲》 .NPK !

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
yianti
Posts: 8
Joined: Tue Dec 16, 2014 5:27 am

Need help for Demon Seals 《镇魔曲》 .NPK !

Post by yianti »

Hey guys,
here is a beautiful china game ,name is: Demon Seals 《镇魔曲》
08_b9d994c.jpg

03_92c2700.jpg

10_800f89e.jpg


Web: http://zmq.163.com/index.html
Client: http://zmq.gdl.netease.com/zmq-1.0.212-setup.exe

Example npk: http://www.mediafire.com/download/dc80p ... n/base.npk
http://www.mediafire.com/download/1l157 ... c46/ui.npk

Hope someone can help me!
Thanks~
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by aluigi »

Script updated to version 0.1.1 (lz4 compression instead of zlib):
http://aluigi.org/papers/bms/others/nxpk.bms
yianti
Posts: 8
Joined: Tue Dec 16, 2014 5:27 am

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by yianti »

Cool! thanks aluigi!
CriticalError
Posts: 204
Joined: Thu Aug 14, 2014 8:52 pm

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by CriticalError »

very interesting game, as I can see the unpack got random file names and no real ones right? and check it use SKI format for models? you study this format as well yianti?

PS: any chance to correct file names when export aluigi?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by aluigi »

You need to have a database with the hash->name entries for obtaining the real names otherwise only the sequential name plus the guessed extension is possible.
CriticalError
Posts: 204
Joined: Thu Aug 14, 2014 8:52 pm

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by CriticalError »

ummmm ok thanks for clarify it for me alugi, now another question, how we can create database for get file names? I know the hash names are get when you run client and play, but I wanna know if possible know the process to make them, because i'm interested for others games, no this one in particular, ok many thanks for all as alwasys aluigi, for patience and dedication to all members, have a nice day.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by Ekey »

I'm working on unpacker now

Image

but i have problem with script.npk, seems data with flag 0 also can be obfuscated or compressed. example in attach.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by aluigi »

I bet it's encrypted with a block cipher (like AES) because the first 32bit value is the final size necessary due to the alignment created by the encryption.
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by Ekey »

In script.npk and libs.npk always present redirect.nxs the file (only compressed by zlib), all other data obfuscated. In file you can see lines like

Code: Select all

redirect_crypt.pyt
decrypt_buffer
zlib
decompress
marshal


Seems it's compiled Python module. I have tried to find file redirect_crypt.pyt but wihout results.
The soul of light
Posts: 48
Joined: Tue Jul 26, 2016 10:54 am

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by The soul of light »

Ekey wrote:In script.npk and libs.npk always present redirect.nxs the file (only compressed by zlib), all other data obfuscated. In file you can see lines like

Code: Select all

redirect_crypt.pyt
decrypt_buffer
zlib
decompress
marshal


Seems it's compiled Python module. I have tried to find file redirect_crypt.pyt but wihout results.

Hello, Ekey.
Some people who are interested in the format of the game, if you can, you can continue the unpacker work? Thank you very much! :)
The soul of light
Posts: 48
Joined: Tue Jul 26, 2016 10:54 am

Re: Need help for Demon Seals 《镇魔曲》 .NPK !

Post by The soul of light »

Someone get name by dynamic debugging, but cannot one-time get all of my name, I don't know to use what way to get all the names. :(
https://gist.github.com/fate0/3e1d23bce9d4d2cfa93848dd92aba3d4