Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Mimi Neko's Avatar
    Join Date
    Jul 2020
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    4
    HashTable consisting of its own header, followed by hash records that are 16 bytes long.
    - I think these hash records indicate the beginning of the file in the data stream, inside the .LPQ file, as well as its size and possibly something else (possibly the decoding key, since all data streams are encoded.)




    Also, half of the file .BHL occupies a BlockTable...
    - this may be some data related to files Packed in LPQ.
    Perhaps these are keys for decoding the data streams of the files themselves, or the file names are encoded there.

    I watched the debugger how Loader KOK3 works:
    the Loader opens the .BHL file, and copies the BlockTable and HashTable to the allocated large buffer in memory.
    Moreover, it swaps them!
    First copies the BlockTable and then inserts the HashTable before it.
    Then, in front of him, puts the file header .BHL without the first signature.
    The .LPQ file is also loaded into memory.
    And then, some magic begins that I couldn't understand...
    the Algorithm swaps a lot of different data that I couldn't track.
    I only found in memory, already unpacked some KOK3 files...
    Then the process waits for you to log in to the game, and everything starts too fast. I couldn't freeze it and look at it.

    - - - Updated - - -

    BHL UserData - This is a hash table consisting of its own header, followed by hash records that are 16 bytes long.
    - I think these hash records indicate the beginning of the file in the data stream, inside the .LPQ file, as well as its size and possibly something else (possibly the decoding key, since all data streams are encoded.)



    Also, half of the file .BHL occupies a BlockTable...
    - this may be some data related to files Packed in LPQ.
    Perhaps these are keys for decoding the data streams of the files themselves, or the file names are encoded there.

    I watched the debugger how Loader KOK3 works:
    the Loader opens the .BHL file, and copies the BlockTable and HashTable to the allocated large buffer in memory.
    Moreover, it swaps them!
    First copies the BlockTable and then inserts the HashTable before it.
    Then, in front of him, puts the file header .BHL without the first signature.
    The .LPQ file is also loaded into memory.
    And then, some magic begins that I couldn't understand...
    the Algorithm swaps a lot of different data that I couldn't track.
    I only found in memory, already unpacked some KOK3 files...
    Then the process waits for you to log in to the game, and everything starts too fast. I couldn't freeze it and look at it.

    - - - Updated - - -

    The program for easy highlighting and the study of file structures: Hexinator
    Below you can download my grammars by clicking this program.
    These grammars contain the KOK3 file structures that I recognized:
    Attached Thumbnails Attached Thumbnails
    YTLCX233a0k.jpg  

    <b>Downloadable Files</b> Downloadable Files
    Last edited by Mimi Neko; 10-18-2020 at 09:14 AM.

  2. #17
    VXP's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    18
    Reputation
    18
    Thanks
    13
    My Mood
    Drunk
    Long time no post, I am back to work and will edit this post with some progress info.
    Check out my official King of Kings III reverse engineering project thread!

    https://www.mpgh.net/forum/showthread.php?t=1367141

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Assembly Tutorial] 40 Reverse Engineering
    By radnomguywfq3 in forum Programming Tutorials
    Replies: 29
    Last Post: 04-02-2020, 01:52 PM
  2. [Release] Crossfire > King < Have a look on this thread please :)
    By speedo_edoo in forum CrossFire Europe Discussions
    Replies: 3
    Last Post: 03-25-2016, 10:44 AM
  3. Warface Reverse Engineering, Addresses and Resources Thread
    By _PuRe.LucK* in forum Warface Coding & Source Code
    Replies: 2
    Last Post: 01-30-2015, 05:24 AM
  4. Replies: 0
    Last Post: 10-18-2008, 06:06 PM
  5. Reverse Engineering!
    By Jeckels in forum WarRock - International Hacks
    Replies: 13
    Last Post: 11-06-2007, 09:45 PM

Tags for this Thread