Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

kingdom under fire 2 .PKG

Featured Replies

  • Author
  • Localization

godskin, posted Fri Mar 10, 2017 4:41 pm (21356)


aluigi wrote:
http://aluigi.org/bms/kingdom_under_fire_2.bms


thank you ^ ^
  • Author
  • Localization

aluigi, posted Thu Jun 08, 2017 3:16 pm (23939)


Unfortunately it looks like now the table with the information about the archived files is encrypted.
offzip -a -c 65536 can be a good work-around to extract the files anyway.
  • Author
  • Localization

paercen, posted Tue Jun 13, 2017 12:45 am (24066)


Hi, I also have a question
I can't find KUF2 game icons in files.
Icon - that's images of skills, items and etc. They usually have size 64x64.

I use "offzip -a -c 65536" as you said. Sometimes I see errors with text "try offzip -z 15" but that doesn't work
I check DDS files, PNG and BMP in all packages and no result.
Maybe offzip skips some files?

Link to file that gives an error - https://cloud.mail.ru/public/9eJb/uCUWVhmoj

ERROR:
. 0x0005f0be
- zlib Z_DATA_ERROR, the data in the file is not in zip format
or uses a different windowBits value (-z). Try to use -z -15
  • Author
  • Localization

aluigi, posted Tue Jun 13, 2017 4:06 pm (24078)


It's all correct, you can ignore that message.
  • Author
  • Localization

paercen, posted Tue Jun 13, 2017 9:54 pm (24097)


Thanks.
Maybe somebody helps with icons? Where are they?
  • Author
  • Localization

lelicopter, posted Thu Jun 15, 2017 5:21 am (24127)


today was update KUF2. link above not so actual. (but update was installed at this client well)
  • Author
  • Localization

aluigi, posted Fri Oct 20, 2017 6:46 pm (27491)


That file seems to have an encrypted TOC (the table with information about the archived files).
That's why the script doesn't work on it.
The only solution is using offzip -a.
  • Author
  • Localization

dron4938, posted Sun Oct 22, 2017 10:30 am (27596)


Image
after unpacking a bunch of files with random names.
how to decode .bsv and how to pack back?
thank you
Sample File .bsv : https://yadi.sk/d/qOo7hw0D3Nxvoz
  • Author
  • Localization

Ekey, posted Sun Mar 25, 2018 2:45 pm (33563)


aluigi wrote:
That file seems to have an encrypted TOC (the table with information about the archived files).
That's why the script doesn't work on it.
The only solution is using offzip -a.

Yeah, there two tables is encrypted. I wrote two functions for decrypt their.

Code:
uint32_t kuf2_fs_decrypt_entry(uint8_t *pBuffer, uint32_t dwTableSize, uint32_t dwArchiveSize)
{
   uint32_t dwResult1;
   uint32_t dwResult2;
   uint32_t dwResult3;
   uint32_t dwResult4;
   uint32_t dwSeed = dwArchiveSize;

   uint32_t dwBlockSize = 24;
   uint32_t dwBlockCount = dwTableSize / dwBlockSize;

   for (uint32_t i = 0; i    {
      dwResult1 = 0x19660D * dwSeed 0x3C6EF35F;
      *(uint64_t *)(pBuffer 0) = dwResult1;

      dwResult2 = 0x19660D * dwResult1 0x3C6EF35F;
      *(uint32_t *)(pBuffer 8) = dwResult2;

      dwResult3 = 0x19660D * dwResult2 0x3C6EF35F;
      *(uint32_t *)(pBuffer 12) = dwResult3;

      dwResult4 = 0x19660D * dwResult3 0x3C6EF35F;
      *(uint32_t *)(pBuffer 16) = dwResult4;

      dwSeed = 0x19660D * dwResult4 0x3C6EF35F;
      *(uint32_t *)(pBuffer 20) = dwSeed;
   }
   return dwSeed;
}


Code:
void kuf2_fs_decrypt_subentry(uint8_t *pBuffer, uint32_t dwTableSize, uint32_t dwSeed)
{
   uint32_t dwResult1;
   uint32_t dwResult2;
   uint32_t dwResult3;

   uint32_t dwBlockSize = 12;
   uint32_t dwBlockCount = dwTableSize / dwBlockSize;

   for (uint32_t i = 0; i    {
      dwResult1 = 0x19660D * dwSeed 0x3C6EF35F;
      *(uint32_t *)(pBuffer 0) = dwResult1;

      dwResult2 = 0x19660D * dwResult1 0x3C6EF35F;
      *(uint32_t *)(pBuffer 4) = dwResult2;

      dwSeed = 0x19660D * dwResult2 0x3C6EF35F;
      *(uint32_t *)(pBuffer 8) = dwSeed;
   }
}


First function for decrypt table with values:

Code:
    get SOME_CRC longlong
    get ZSIZE long
    get SIZE long
    get ID long
    get ZERO long


Second for
Code:
        get CHUNK_OFF long
        get CHUNK_ZSIZE long
        get CHUNK_SIZE long


Sample:

Code:
//First table
dwSeed = kuf2_fs_decrypt_entry(pBuffer, dwTableSize, dwArchiveSize);

//Second table
kuf2_fs_decrypt_subentry(pBuffer, dwTableSize, dwSeed);


Sorry for necropost :)
  • Author
  • Localization

WollieWoltaz, posted Sat Nov 16, 2019 11:20 am (52142)


Doesn't the tool Aluige provided work?
Btw.. is this game made with Unreal Engine or?
  • Author
  • Localization

Amagakuro, posted Sat Nov 16, 2019 2:40 pm (52144)


Quickbms works although files have no names and "useless" extension apart from the .dds, maybe the tables have a different encyption?

WollieWoltaz wrote:
Doesn't the tool Aluige provided work?
Btw.. is this game made with Unreal Engine or?


Sadly no... it uses the old engine (Blueside engine), what a pity, i was really looking forward an engine change.
  • Author
  • Localization

Ekey, posted Sat Nov 30, 2019 11:12 am (52319)


Amagakuro wrote:
Quickbms works although files have no names and "useless" extension apart from the .dds, maybe the tables have a different encyption?

Archives do not contain file names, only hashes. Therefore, QuickBMS unpack files with unknown names :)
  • Author
  • Localization

Ekey, posted Sat Dec 28, 2019 12:43 am (52826)


Pepita wrote:
Sadly the old Script wont work anymore. I uploade example File Binary just in Case someone of you can take a look!

https://mega.nz/#!XMpyzAwA!NkeuiTS0jhJ9 ... RYE2DSZeKg

If you uploaded the main executable file then attach also all the libraries. Anyway exe is protected.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.