Results 1 to 3 of 3
  1. #1
    Genz
    Genz is offline
    New member
    Join Date
    2010 May
    Posts
    4
    Thanks Thanks Given 
    0
    Thanks Thanks Received 
    3
    Thanked in
    0 Posts
    Rep Power
    0

    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>;

  2. The Following User Says Thank You to Genz For This Useful Post:


  3. #2
    Surubre
    Surubre is offline
    New member
    Join Date
    2010 Jun
    Posts
    24
    Thanks Thanks Given 
    8
    Thanks Thanks Received 
    0
    Thanked in
    0 Posts
    Rep Power
    0

    Re: SoulMaster NPK file structure

    Can you explain a little more on how to use this?

  4. #3
    Dwar
    Dwar is offline
    Veteran Dwar's Avatar
    Join Date
    2010 Mar
    Posts
    2,222
    Thanks Thanks Given 
    211
    Thanks Thanks Received 
    2,230
    Thanked in
    292 Posts
    Rep Power
    10

    Re: SoulMaster NPK file structure

    HowTo:
    1. Decrypt .npk
    2. Open decrypted .npk in 010 Editor
    3. Apply the template
    4. 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
    Please, post your questions on forum, not by PM or mail

    I spend my time, so please pay a little bit of your time to keep world in equilibrium

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •