SoulMaster NPK file structure
Here you can find template for 010 Editor, which describes the structure of NPK files from SoulMaster.
Note: Use it with decrypted NPK.
Code:
//--------------------------------------
//--- 010 Editor v3.0.6 Binary Template
//
// File: npk
// Author: Genz
// Revision: 2010-08-10
// Purpose: unpack npk
//--------------------------------------
struct FileRec // variable structure size for decrypted npk
{
uint FileOffset; // File offsets in NPK
uint PackedFileSize;
uint UnpackedFileSize;
uint Flags <format=binary>; // not important
time_t CreateTime;
uint Zero; // Always zero
uint StrSize; // Size of file name
char FileName[StrSize];
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
local uint64 Offset = FTell();
FSeek(FileOffset);
ubyte FileData[PackedFileSize];
FSeek(Offset);
};
struct NpkHeader // NPK
{
char Signature[4]; // NPK!
uint HeaderSize; // always 24
uint FileCount;
uint OffsetToNames <format=hex>;
uint FirstFileOffset; // = HeaderSize
time_t FileCreationTime;
};
NpkHeader Header;
FSeek(Header.OffsetToNames);
FileRec File[Header.FileCount] <optimize=false>;
Re: SoulMaster NPK file structure
Can you explain a little more on how to use this?
Re: SoulMaster NPK file structure
HowTo:
- Decrypt .npk
- Open decrypted .npk in 010 Editor
- Apply the template
- You will get full .npk structure
This template will be useful for understanding file structure.
Today we will post decryptor + unpacker, and then encryption algorithm that used in SoulMaster