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.

Does anyone knows how to extract PAK files?

Featured Replies

  • Author
  • Localization

Lucas Hood, posted Sun Aug 16, 2020 1:56 pm (58096)


Hello, currently i wants to extract resources from the game Kishin Hishou Demonbane, however i have tried all the tools but none of them worked. The files are all in .pak, much appreciated if anyone can help me with this. I can upload the game if you guys need.

Image

Editted: Solved, big thanks to Ekey.
  • Author
  • Localization

Ekey, posted Sun Aug 16, 2020 2:36 pm (58097)


Upload sample files.
  • Author
  • Localization

Ekey, posted Sun Aug 16, 2020 4:21 pm (58101)


Entry table compressed by zlib but fields with size, offsets and etc. values is encrypted/obfuscated (also with files data), there is nothing much we can do without reverse engineering.
  • Author
  • Localization

Lucas Hood, posted Sun Aug 16, 2020 5:25 pm (58102)


Ekey wrote:
Entry table compressed by zlib but fields with size, offsets and etc. values is encrypted/obfuscated (also with files data), there is nothing much we can do without reverse engineering.


Do you need me to upload the whole game? Maybe you guys can check or something
  • Author
  • Localization

Ekey, posted Sun Aug 16, 2020 5:33 pm (58104)


Lucas Hood wrote:
Do you need me to upload the whole game?

Yeah, sure.
  • Author
  • Localization

Lucas Hood, posted Mon Aug 17, 2020 7:51 am (58113)


My friend used quick bms to extract, but all of his images are like this

Much appreciated if anyone can help us to fix

Image
  • Author
  • Localization

Ekey, posted Mon Aug 17, 2020 3:15 pm (58118)


Code:
# KishinHisho PAK format
# script for QuickBMS http://quickbms.aluigi.org

set MEMORY_FILE10 string "
int pak_gethash(const char* m_String)
{
  char bTemp;
  int result;

  bTemp = *m_String;
  for ( result = 0; bTemp; m_String )
  {
    result = bTemp 137 * result;
    bTemp = m_String[1];
  }
  return result;
}

void pak_decrypt(unsigned char* lpBuffer, int dwKey, int dwSize, int dwFullData)
{
  if (!dwFullData){
    if (dwSize > 1024){
        dwSize = 1024;
      }
  }

  int dwTemp;
  int* dwBlock = (int*)lpBuffer;

  dwSize >>= 2;
  while(dwSize-- > 0)
  {
     dwTemp = *dwBlock ^ dwKey;
     *dwBlock = dwTemp;
  }
}"

get VERSION long #4
getdstring ID 256 #KishinHisyouDB

get PAD long #100
get TABLE_SIZE long
get FILES long
get TABLE_ZSIZE long
savepos TABLE_OFFSET

math PAD ^= TABLE_ZSIZE
math PAD = 276

calldll MEMORY_FILE10 "pak_gethash" "tcc" TABLE_KEY ID # 0xCC09DBB5 (3051030988)

math FILES ^= TABLE_KEY
math TABLE_SIZE ^= TABLE_KEY

comtype zlib_noerror
clog MEMORY_FILE TABLE_OFFSET TABLE_SIZE TABLE_ZSIZE

for i = 0 < FILES
   get NSIZE long MEMORY_FILE
   getdstring NAME NSIZE MEMORY_FILE
   calldll MEMORY_FILE10 "pak_gethash" "tcc" ENTRY_KEY NAME
   
   codepage 932
   set NAME to_unicode NAME  # jis -> utf16 (unicode)
   codepage "utf8"
   set NAME unicode NAME     # utf16 -> utf8
     
   get OFFSET long MEMORY_FILE
   get SIZE long MEMORY_FILE
   get DUMMY1 long MEMORY_FILE
   get ZIP long MEMORY_FILE
   get ZSIZE long MEMORY_FILE

   math ZIP ^= ENTRY_KEY
   math OFFSET ^= ENTRY_KEY
   math OFFSET = PAD
   math SIZE ^= ENTRY_KEY
   math ZSIZE ^= ENTRY_KEY

   if ZIP == 0
      log MEMORY_FILE2 OFFSET SIZE
   else
      clog MEMORY_FILE2 OFFSET ZSIZE SIZE
   endif
   
   if EXT == "NPS"
      calldll MEMORY_FILE10 "pak_decrypt" "tcc" RET MEMORY_FILE2 ENTRY_KEY SIZE 1
   else
      calldll MEMORY_FILE10 "pak_decrypt" "tcc" RET MEMORY_FILE2 ENTRY_KEY SIZE 0
   endif

   log NAME 0 SIZE MEMORY_FILE2
next i
  • Author
  • Localization

Lucas Hood, posted Mon Aug 17, 2020 3:50 pm (58119)


Thanks for the script, so all i have to do is put it into a text document file in my Quickbms folder?

Update: IT WORKED! THANK YOU, THANK YOU VERY MUCH!
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.