The rules have been updated, read them now: Rules!

Miracle Nikki - .ktx file doesn't open

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
Lucy
ultra-n00b
Posts: 3
Joined: Sun Sep 04, 2016 7:37 am

Miracle Nikki - .ktx file doesn't open

Post by Lucy » Fri Mar 05, 2021 4:11 pm

I have taken textures/sprites from a mobile game (Miracle Nikki) but I can't open them. They are in .ktx format but PVRTexTool doesn't open the files, tells that it is a wrong format or corrupted. I thought maybe its deciphered in some way, but I don't know anything about that so I can't know for sure, so I need some help with that ^^'
Attached is on of the textures.. :)
You do not have the required permissions to view the files attached to this post.

User avatar
ikskoks
Moderator
Posts: 813
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 473 times
Been thanked: 216 times
Contact:

Re: .ktx file doesn't open

Post by ikskoks » Fri Mar 05, 2021 7:14 pm

Yeah, it is not standard KTX Image.
You can see here how it should look like http://wiki.xentax.com/index.php/KTX_Image

The one you have posted is encrypted in some way.

User avatar
aspadm
advanced
Posts: 46
Joined: Wed Nov 25, 2015 8:43 pm
Has thanked: 10 times
Been thanked: 26 times

Re: .ktx file doesn't open

Post by aspadm » Sat Mar 06, 2021 3:27 pm

Lucy wrote:
Fri Mar 05, 2021 4:11 pm
I have taken textures/sprites from a mobile game (Miracle Nikki) but I can't open them.
This is custom made file format with blowfish encryption that was reverse engineered several times.
Latest version was deleted as tencent started the pursuit of enthusiasts.

User avatar
ikskoks
Moderator
Posts: 813
Joined: Thu Jul 26, 2012 5:06 pm
Location: Poland, Łódź
Has thanked: 473 times
Been thanked: 216 times
Contact:

Re: .ktx file doesn't open

Post by ikskoks » Sat Mar 06, 2021 3:31 pm

@aspadm, can you link to some documentation or at least some discussion regarding this format?

Also, what do you mean by "deleted"?

User avatar
aspadm
advanced
Posts: 46
Joined: Wed Nov 25, 2015 8:43 pm
Has thanked: 10 times
Been thanked: 26 times

Re: .ktx file doesn't open

Post by aspadm » Sat Mar 06, 2021 3:58 pm

ikskoks wrote:
Sat Mar 06, 2021 3:31 pm
@aspadm, can you link to some documentation or at least some discussion regarding this format?
Ow, looks like they changed format.
Previous was like this:

Code: Select all

byte data[len-8]; // len = file size, must be a multiple of 8
char sign[2]; // "dr"
unsigned char version_a;
unsigned char version_b;
unsigned char trim; // number (0-7) of padding bytes
char ftype[3]; // "lua" of "png"
data is the blowfish encrypted (ECB for "png", CBC for "lua").
version_a and version_b is used in app to chose parts for key generation.

Decrypted data can be packed with LZ4.
Also, what do you mean by "deleted"?
Some time ago there was a thread on xentax where somebody :) posted a tool that decrypt files of MN (also known as "Love Nikki" etc.).
After that, one of the users (presumably from Vietnam) used this to publish information about the game events that have not yet been released, which is why tencent launched an investigation in the direction of localizers and others. The topic was removed from the forum, as the author of the tool asked for it.

Lucy
ultra-n00b
Posts: 3
Joined: Sun Sep 04, 2016 7:37 am

Re: Miracle Nikki - .ktx file doesn't open

Post by Lucy » Mon Mar 08, 2021 7:59 pm

Thanks everyone for responses :) Thing is I know that the older version, that used .png was decrypted. But the tools for cracking the old one (at least the ones I tried before they were scrapped from internet or the ones that are still there) don't seem to work with the .ktx version. (I mean, duh, they weren't made for .ktx)

User avatar
aspadm
advanced
Posts: 46
Joined: Wed Nov 25, 2015 8:43 pm
Has thanked: 10 times
Been thanked: 26 times

Re: Miracle Nikki - .ktx file doesn't open

Post by aspadm » Mon Mar 08, 2021 8:03 pm

From which game version did you take sample .ktx file?
"png" signature also was in .ktx files, it's just flag for chosing right encryption method.

Lucy
ultra-n00b
Posts: 3
Joined: Sun Sep 04, 2016 7:37 am

Re: Miracle Nikki - .ktx file doesn't open

Post by Lucy » Mon Mar 08, 2021 8:14 pm

It's from miracle nikki for mainland china.

lunar23
ultra-n00b
Posts: 2
Joined: Tue Mar 16, 2021 6:46 am

Re: Miracle Nikki - .ktx file doesn't open

Post by lunar23 » Fri Mar 19, 2021 12:01 pm

hope someone can decrypt the ktx file :cry:

lunar23
ultra-n00b
Posts: 2
Joined: Tue Mar 16, 2021 6:46 am

Nikki Games .ktx file help

Post by lunar23 » Sun Mar 21, 2021 4:20 am

I have several ktx files encoded from png files (the current png file is also an encrypted file but I can decrypt them). I used some softwares like Mali or PVRTexTool but can't open ktx file.
I hope someone can help me method to decode this ktx file. Attachments include the ktx file and the original png file.
https://drive.google.com/drive/folders/ ... sp=sharing

User avatar
aspadm
advanced
Posts: 46
Joined: Wed Nov 25, 2015 8:43 pm
Has thanked: 10 times
Been thanked: 26 times

Re: Nikki Games .ktx file help

Post by aspadm » Tue Mar 23, 2021 12:23 pm

lunar23 wrote:
Sun Mar 21, 2021 4:20 am
I hope someone can help me method to decode this ktx file. Attachments include the ktx file and the original png file.
Well, this is the encrypted textures. You can see characters "dr***png" at the end of files.
They have known file structure, but sharing the decryption keys is prohibited.

Post Reply