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.

Dragon Nest custom encrypted .pak

Featured Replies

  • Author
  • Localization

Omnitrix, posted Fri Jan 31, 2020 2:45 pm (53620)


Hello, dunno if this allowed here. I am having custom encrypted Dragon Nest .pak file and regular .pak script is not working with that file. Or this is impossible without an encryption key? Thank you! https://www.mediafire.com/file/i4j0vjdz ... d.pak/file
  • Author
  • Localization

LokiReborn, posted Sat Feb 01, 2020 12:30 am (53629)


Omnitrix wrote:
Hello, dunno if this allowed here. I am having custom encrypted Dragon Nest .pak file and regular .pak script is not working with that file. Or this is impossible without an encryption key? Thank you! https://www.mediafire.com/file/i4j0vjdz ... d.pak/file


It's allowed however probably not doable, I did try to guess at what it might be with the high repeat in some of the data "DN RU" and use that as an xor key to 0 it out however the data still didn't look correct. If you want to upload the bin folder can try taking a look but guessing encryption for files in 99% of cases is impossible.
  • Author
  • Localization

Omnitrix, posted Sat Feb 01, 2020 10:45 pm (53661)


LokiReborn wrote:
Omnitrix wrote:
Hello, dunno if this allowed here. I am having custom encrypted Dragon Nest .pak file and regular .pak script is not working with that file. Or this is impossible without an encryption key? Thank you! https://www.mediafire.com/file/i4j0vjdz ... d.pak/file


It's allowed however probably not doable, I did try to guess at what it might be with the high repeat in some of the data "DN RU" and use that as an xor key to 0 it out however the data still didn't look correct. If you want to upload the bin folder can try taking a look but guessing encryption for files in 99% of cases is impossible.

Thank you for the answer. What files I need to provide to you? The whole game folder is really huge size.
  • Author
  • Localization

LokiReborn, posted Sun Feb 02, 2020 2:18 am (53670)


Omnitrix wrote:
LokiReborn wrote:
Omnitrix wrote:
Hello, dunno if this allowed here. I am having custom encrypted Dragon Nest .pak file and regular .pak script is not working with that file. Or this is impossible without an encryption key? Thank you! https://www.mediafire.com/file/i4j0vjdz ... d.pak/file


It's allowed however probably not doable, I did try to guess at what it might be with the high repeat in some of the data "DN RU" and use that as an xor key to 0 it out however the data still didn't look correct. If you want to upload the bin folder can try taking a look but guessing encryption for files in 99% of cases is impossible.

Thank you for the answer. What files I need to provide to you? The whole game folder is really huge size.


There is usually something like a bin folder that contains the executable & dll files, that's what would be needed to attempt to see how it's done.
  • Author
  • Localization

Omnitrix, posted Sun Feb 02, 2020 1:04 pm (53675)


LokiReborn wrote:
Omnitrix wrote:
LokiReborn wrote:

It's allowed however probably not doable, I did try to guess at what it might be with the high repeat in some of the data "DN RU" and use that as an xor key to 0 it out however the data still didn't look correct. If you want to upload the bin folder can try taking a look but guessing encryption for files in 99% of cases is impossible.

Thank you for the answer. What files I need to provide to you? The whole game folder is really huge size.


There is usually something like a bin folder that contains the executable & dll files, that's what would be needed to attempt to see how it's done.

Here is everything from the folder except another .paks
http://www.mediafire.com/file/gt09or0cj ... N.zip/file
  • Author
  • Localization

LokiReborn, posted Sun Feb 02, 2020 6:44 pm (53681)


Omnitrix wrote:
LokiReborn wrote:
Omnitrix wrote:
Thank you for the answer. What files I need to provide to you? The whole game folder is really huge size.


There is usually something like a bin folder that contains the executable & dll files, that's what would be needed to attempt to see how it's done.

Here is everything from the folder except another .paks
http://www.mediafire.com/file/gt09or0cj ... N.zip/file


So ... good news and bad news.
The good news is that it's doable with what you provided me, the bad news is that it's doing something I'm not familiar with.
Essentially in most games I've worked when the decryption happens it's happens as part of a routine in the game whether it be AES, TEA, Xor, etc. however with Dragon nest the decryption is done through a handle as part of the Read File call. So when the buffer arrives to the game the data is already decrypted.
So I can see the data you want at the moment but I'm not sure how it's done until I can trace the handle back and figure out what's actually happening. I'll let ya know if I figure it out. For anyone that may be more familiar with this sort of thing the first Read of a Pack File happens at 0x00DC7328 for 0x110 bytes where it determines what it's going to do next.

Edit: Small edit correcting myself, it's not the handle itself it's the fact the game uses Xigncode and it's hooking the call to ReadFile to do custom operations.
  • Author
  • Localization

Omnitrix, posted Sun Feb 02, 2020 7:08 pm (53682)


LokiReborn wrote:
Omnitrix wrote:
LokiReborn wrote:

There is usually something like a bin folder that contains the executable & dll files, that's what would be needed to attempt to see how it's done.

Here is everything from the folder except another .paks
http://www.mediafire.com/file/gt09or0cj ... N.zip/file


So ... good news and bad news.
The good news is that it's doable with what you provided me, the bad news is that it's doing something I'm not familiar with.
Essentially in most games I've worked when the decryption happens it's happens as part of a routine in the game whether it be AES, TEA, Xor, etc. however with Dragon nest the decryption is done through a handle as part of the Read File call. So when the buffer arrives to the game the data is already decrypted.
So I can see the data you want at the moment but I'm not sure how it's done until I can trace the handle back and figure out what's actually happening. I'll let ya know if I figure it out. For anyone that may be more familiar with this sort of thing the first Read of a Pack File happens at 0x00DC7328 for 0x110 bytes where it determines what it's going to do next.

Edit: Small edit correcting myself, it's not the handle itself it's the fact the game uses Xigncode and it's hooking the call to ReadFile to do custom operations.

Thank you for information. Hope you will manage that :) Praying for you!
  • Author
  • Localization

LokiReborn, posted Mon Feb 03, 2020 2:53 am (53685)


Omnitrix wrote:
LokiReborn wrote:
Omnitrix wrote:
Here is everything from the folder except another .paks
http://www.mediafire.com/file/gt09or0cj ... N.zip/file


So ... good news and bad news.
The good news is that it's doable with what you provided me, the bad news is that it's doing something I'm not familiar with.
Essentially in most games I've worked when the decryption happens it's happens as part of a routine in the game whether it be AES, TEA, Xor, etc. however with Dragon nest the decryption is done through a handle as part of the Read File call. So when the buffer arrives to the game the data is already decrypted.
So I can see the data you want at the moment but I'm not sure how it's done until I can trace the handle back and figure out what's actually happening. I'll let ya know if I figure it out. For anyone that may be more familiar with this sort of thing the first Read of a Pack File happens at 0x00DC7328 for 0x110 bytes where it determines what it's going to do next.

Edit: Small edit correcting myself, it's not the handle itself it's the fact the game uses Xigncode and it's hooking the call to ReadFile to do custom operations.

Thank you for information. Hope you will manage that :) Praying for you!


This was as far as I was able to get for the moment. I sadly got to work on a few other things not sure if anyone else can see what's missing.
Basically it fixes the header and file table however what I haven't been able to see is why the zlib won't decompress, it's possible they have some modification to that somewhere in the code too.

DragonNest RU.zip

  • Author
  • Localization

Omnitrix, posted Mon Feb 03, 2020 12:22 pm (53695)


LokiReborn wrote:
Omnitrix wrote:
LokiReborn wrote:

So ... good news and bad news.
The good news is that it's doable with what you provided me, the bad news is that it's doing something I'm not familiar with.
Essentially in most games I've worked when the decryption happens it's happens as part of a routine in the game whether it be AES, TEA, Xor, etc. however with Dragon nest the decryption is done through a handle as part of the Read File call. So when the buffer arrives to the game the data is already decrypted.
So I can see the data you want at the moment but I'm not sure how it's done until I can trace the handle back and figure out what's actually happening. I'll let ya know if I figure it out. For anyone that may be more familiar with this sort of thing the first Read of a Pack File happens at 0x00DC7328 for 0x110 bytes where it determines what it's going to do next.

Edit: Small edit correcting myself, it's not the handle itself it's the fact the game uses Xigncode and it's hooking the call to ReadFile to do custom operations.

Thank you for information. Hope you will manage that :) Praying for you!


This was as far as I was able to get for the moment. I sadly got to work on a few other things not sure if anyone else can see what's missing.
Basically it fixes the header and file table however what I haven't been able to see is why the zlib won't decompress, it's possible they have some modification to that somewhere in the code too.

Thank you so much! But unpacking script is still not working even for decrypted file. But still I am very grateful to you, thank you! May be you will have a time in a future to finish this?
  • Author
  • Localization

Ekey, posted Mon Feb 03, 2020 12:54 pm (53696)


Code:
# Dragon Nest (custom encryption) PAK format
# script for QuickBMS http://quickbms.aluigi.org

set MEMORY_FILE10 string "
static unsigned char lpKey[499] = {
       0xBA, 0xAA, 0xAA, 0xDA, 0xBA, 0xEB, 0x24, 0x0A, 0xC5, 0x9B, 0x59, 0xAE, 0x8D,
       0xC0, 0xB8, 0x8D, 0x49, 0x6F, 0x66, 0x05, 0xA5, 0x25, 0x59, 0x4A, 0xA2, 0xFB,
       0xF2, 0x6B, 0x12, 0xF4, 0x7E, 0xBE, 0x12, 0xB5, 0xEA, 0x24, 0x19, 0x5B, 0x4D,
       0x60, 0x6D, 0x00, 0x96, 0xB9, 0xD5, 0x19, 0xB5, 0x96, 0x91, 0x07, 0x19, 0x22,
       0x48, 0x83, 0x7D, 0x49, 0xDE, 0xE9, 0x57, 0x82, 0xD5, 0x6D, 0xB8, 0x34, 0x3E,
       0x24, 0x1B, 0x74, 0x35, 0x67, 0xF1, 0x2C, 0xCC, 0x1E, 0x8B, 0x46, 0x0F, 0x68,
       0x0F, 0xC1, 0xEC, 0xAC, 0xAF, 0x4B, 0x36, 0x05, 0x14, 0x5E, 0xFD, 0xD9, 0x35,
       0x48, 0x10, 0x35, 0xC4, 0xA7, 0x46, 0x1B, 0x3D, 0x5D, 0x6B, 0xE1, 0xCA, 0x8A,
       0x81, 0x47, 0x6A, 0xE7, 0xC6, 0x31, 0xA1, 0xF4, 0x7D, 0x3F, 0x57, 0x51, 0x4B,
       0x3D, 0xDE, 0xB9, 0x84, 0x90, 0x85, 0x43, 0xD0, 0x20, 0x96, 0x55, 0xD4, 0x97,
       0x4C, 0xC6, 0x3F, 0xE2, 0x25, 0x5D, 0x7F, 0x74, 0x0E, 0x62, 0x37, 0xCA, 0x74,
       0x5A, 0x71, 0x73, 0xB0, 0x05, 0xB6, 0x77, 0x51, 0x16, 0xA9, 0x1E, 0xE7, 0x59,
       0xD6, 0x0B, 0x9D, 0x16, 0x0C, 0x72, 0x5C, 0x24, 0xCB, 0x28, 0x27, 0xEB, 0x1A,
       0xC1, 0xD9, 0x96, 0xA5, 0xE8, 0xCC, 0x62, 0xDF, 0xAF, 0xE4, 0x98, 0x67, 0x27,
       0x04, 0xBB, 0xDF, 0x3A, 0x13, 0x6B, 0x78, 0x13, 0x90, 0x5B, 0x20, 0xFA, 0xEC,
       0x00, 0x30, 0x38, 0xF9, 0x95, 0x11, 0x0C, 0x31, 0x83, 0x29, 0xCF, 0x3C, 0xD7,
       0x46, 0x05, 0x36, 0x27, 0xF7, 0xD2, 0xF9, 0xE8, 0x25, 0x9E, 0xBF, 0xED, 0x3D,
       0x81, 0x40, 0xA0, 0x57, 0x54, 0xEE, 0xA6, 0x9A, 0xC0, 0x76, 0x0B, 0xAA, 0x09,
       0xBF, 0xB7, 0xA7, 0x1C, 0xA8, 0x6D, 0x4B, 0xFF, 0xEE, 0xAA, 0x79, 0x12, 0xAF,
       0x29, 0x4A, 0xE6, 0x28, 0xC2, 0xB9, 0x7B, 0x91, 0x7A, 0x88, 0x8E, 0x80, 0x37,
       0xE5, 0x63, 0x90, 0x33, 0xD5, 0x5E, 0x7A, 0x13, 0x74, 0xC0, 0xE2, 0x07, 0x7A,
       0x7E, 0x09, 0x98, 0x78, 0xF0, 0xD7, 0x1D, 0xF9, 0xB1, 0x0D, 0x19, 0xEF, 0x62,
       0x11, 0x0D, 0x32, 0x7C, 0x3B, 0x32, 0x2E, 0x56, 0x3B, 0x03, 0x55, 0xA2, 0x04,
       0x28, 0x46, 0xDF, 0x2B, 0x65, 0x05, 0x6B, 0x22, 0x02, 0xBE, 0xF2, 0xB8, 0x89,
       0x0C, 0x28, 0x2D, 0x26, 0x3E, 0xE1, 0x6B, 0x63, 0x8A, 0x37, 0x76, 0x23, 0xF2,
       0xDD, 0xAC, 0x04, 0xC6, 0x20, 0x62, 0xDB, 0xAB, 0x02, 0xA0, 0x31, 0x8F, 0x7A,
       0xD6, 0x98, 0x42, 0x75, 0xC0, 0xBB, 0x84, 0x33, 0x10, 0x78, 0xF7, 0x43, 0x12,
       0xC6, 0x03, 0x8F, 0x63, 0x1F, 0x75, 0x94, 0x9E, 0x95, 0x5B, 0x71, 0x9E, 0x49,
       0xA5, 0x13, 0x5B, 0x29, 0xFC, 0xFF, 0x23, 0x80, 0xAF, 0xF1, 0xE4, 0x15, 0x1A,
       0xE9, 0x3C, 0xFB, 0x71, 0x4D, 0x7A, 0xAC, 0x7F, 0x26, 0x74, 0x14, 0x0F, 0x6B,
       0xF7, 0xBB, 0xB8, 0x05, 0x36, 0x4D, 0xC9, 0xA4, 0x35, 0x2C, 0x19, 0x0A, 0xFC,
       0x8C, 0xB3, 0x36, 0x0F, 0x36, 0x4C, 0x75, 0x14, 0x65, 0x50, 0xCD, 0x5E, 0x7F,
       0x9B, 0x01, 0x24, 0x22, 0xCB, 0x91, 0x9F, 0xF4, 0x3E, 0x31, 0xC6, 0x10, 0x30,
       0x42, 0x9D, 0xB2, 0xF9, 0x02, 0xA2, 0x80, 0x3B, 0xDB, 0x15, 0x04, 0x07, 0xED,
       0x1F, 0x9A, 0x2C, 0x5F, 0xF9, 0xAB, 0x44, 0xAB, 0x27, 0x42, 0x41, 0xC5, 0x30,
       0xA3, 0x2E, 0xB6, 0xFD, 0x67, 0xEF, 0xE8, 0xF4, 0xE2, 0x86, 0x44, 0x1E, 0x07,
       0x40, 0xB7, 0x03, 0x4A, 0x19, 0xDE, 0x92, 0x70, 0x3B, 0x2A, 0xB3, 0xAA, 0x6A,
       0xEB, 0xDB, 0x5C, 0x6C, 0x58, 0x5D, 0xE5, 0x59, 0x62, 0x46, 0xA1, 0xF0, 0xB4,
       0x56, 0x70, 0x4C, 0xBB, 0xBD};

void iDecryptHeader(unsigned char* lpBuffer)
{
  for (int i = 272; i != 31; --i )
  {
     lpBuffer[i] ^= lpKey[i % 0x1F3] ^ lpBuffer[i - 1];
  }
}

void iDecryptEntry(unsigned char* lpBuffer, int dwSize)
{
  for (int i = dwSize - 1; i != 50; --i)
  {
     lpBuffer[i] ^= lpKey[i % 0x1F3] ^ lpBuffer[i - 1];
  }
 
  for (int i = 0; i   {
     lpBuffer[i] ^= lpKey[(i 105) % 0x1F3];
  }
}

void iDecryptFileData(unsigned char* lpBuffer, int dwSize)
{
  for (int i = 1; i   {
     lpBuffer[i] ^= lpKey[i % 0x1F3];
  }
}
"

savepos HEADER_OFFSET
math HEADER_SIZE = 272

log MEMORY_FILE HEADER_OFFSET HEADER_SIZE
calldll MEMORY_FILE10 "iDecryptHeader" "tcc" RET MEMORY_FILE

idstring MEMORY_FILE "!!BEWARE THIS FILE IS ENCRYPTED"
goto 260 MEMORY_FILE
get FILES long MEMORY_FILE
get TABLE_OFFSET long MEMORY_FILE

get ARCHIVE_SIZE asize
math TABLE_SIZE = ARCHIVE_SIZE
math TABLE_SIZE -= TABLE_OFFSET

log MEMORY_FILE2 TABLE_OFFSET TABLE_SIZE
calldll MEMORY_FILE10 "iDecryptEntry" "tcc" RET MEMORY_FILE2 TABLE_SIZE

for i = 0   getdstring NAME 256 MEMORY_FILE2
  get ZSIZE long MEMORY_FILE2
  get SIZE long MEMORY_FILE2
  get XSIZE long MEMORY_FILE2
  get OFFSET long MEMORY_FILE2
  getdstring DUMMY 44 MEMORY_FILE2
  callfunction EXTRACT_FILE 1
next i

startfunction EXTRACT_FILE
 if ZSIZE == SIZE
    log MEMORY_FILE OFFSET SIZE
    calldll MEMORY_FILE10 "iDecryptFileData" "tcc" RET MEMORY_FILE SIZE
    log NAME 0 SIZE MEMORY_FILE
 else
    log MEMORY_FILE OFFSET ZSIZE
    calldll MEMORY_FILE10 "iDecryptFileData" "tcc" RET MEMORY_FILE ZSIZE
    clog NAME 0 ZSIZE SIZE MEMORY_FILE
 endif
endfunction


btw: x3.xem it's a fake dll, used for hook ReadFile function :)
  • Author
  • Localization

Omnitrix, posted Mon Feb 03, 2020 1:12 pm (53698)


Ekey wrote:
Code:
# Dragon Nest (custom encryption) PAK format
# script for QuickBMS http://quickbms.aluigi.org

set MEMORY_FILE10 string "
static unsigned char lpKey[499] = {
       0xBA, 0xAA, 0xAA, 0xDA, 0xBA, 0xEB, 0x24, 0x0A, 0xC5, 0x9B, 0x59, 0xAE, 0x8D,
       0xC0, 0xB8, 0x8D, 0x49, 0x6F, 0x66, 0x05, 0xA5, 0x25, 0x59, 0x4A, 0xA2, 0xFB,
       0xF2, 0x6B, 0x12, 0xF4, 0x7E, 0xBE, 0x12, 0xB5, 0xEA, 0x24, 0x19, 0x5B, 0x4D,
       0x60, 0x6D, 0x00, 0x96, 0xB9, 0xD5, 0x19, 0xB5, 0x96, 0x91, 0x07, 0x19, 0x22,
       0x48, 0x83, 0x7D, 0x49, 0xDE, 0xE9, 0x57, 0x82, 0xD5, 0x6D, 0xB8, 0x34, 0x3E,
       0x24, 0x1B, 0x74, 0x35, 0x67, 0xF1, 0x2C, 0xCC, 0x1E, 0x8B, 0x46, 0x0F, 0x68,
       0x0F, 0xC1, 0xEC, 0xAC, 0xAF, 0x4B, 0x36, 0x05, 0x14, 0x5E, 0xFD, 0xD9, 0x35,
       0x48, 0x10, 0x35, 0xC4, 0xA7, 0x46, 0x1B, 0x3D, 0x5D, 0x6B, 0xE1, 0xCA, 0x8A,
       0x81, 0x47, 0x6A, 0xE7, 0xC6, 0x31, 0xA1, 0xF4, 0x7D, 0x3F, 0x57, 0x51, 0x4B,
       0x3D, 0xDE, 0xB9, 0x84, 0x90, 0x85, 0x43, 0xD0, 0x20, 0x96, 0x55, 0xD4, 0x97,
       0x4C, 0xC6, 0x3F, 0xE2, 0x25, 0x5D, 0x7F, 0x74, 0x0E, 0x62, 0x37, 0xCA, 0x74,
       0x5A, 0x71, 0x73, 0xB0, 0x05, 0xB6, 0x77, 0x51, 0x16, 0xA9, 0x1E, 0xE7, 0x59,
       0xD6, 0x0B, 0x9D, 0x16, 0x0C, 0x72, 0x5C, 0x24, 0xCB, 0x28, 0x27, 0xEB, 0x1A,
       0xC1, 0xD9, 0x96, 0xA5, 0xE8, 0xCC, 0x62, 0xDF, 0xAF, 0xE4, 0x98, 0x67, 0x27,
       0x04, 0xBB, 0xDF, 0x3A, 0x13, 0x6B, 0x78, 0x13, 0x90, 0x5B, 0x20, 0xFA, 0xEC,
       0x00, 0x30, 0x38, 0xF9, 0x95, 0x11, 0x0C, 0x31, 0x83, 0x29, 0xCF, 0x3C, 0xD7,
       0x46, 0x05, 0x36, 0x27, 0xF7, 0xD2, 0xF9, 0xE8, 0x25, 0x9E, 0xBF, 0xED, 0x3D,
       0x81, 0x40, 0xA0, 0x57, 0x54, 0xEE, 0xA6, 0x9A, 0xC0, 0x76, 0x0B, 0xAA, 0x09,
       0xBF, 0xB7, 0xA7, 0x1C, 0xA8, 0x6D, 0x4B, 0xFF, 0xEE, 0xAA, 0x79, 0x12, 0xAF,
       0x29, 0x4A, 0xE6, 0x28, 0xC2, 0xB9, 0x7B, 0x91, 0x7A, 0x88, 0x8E, 0x80, 0x37,
       0xE5, 0x63, 0x90, 0x33, 0xD5, 0x5E, 0x7A, 0x13, 0x74, 0xC0, 0xE2, 0x07, 0x7A,
       0x7E, 0x09, 0x98, 0x78, 0xF0, 0xD7, 0x1D, 0xF9, 0xB1, 0x0D, 0x19, 0xEF, 0x62,
       0x11, 0x0D, 0x32, 0x7C, 0x3B, 0x32, 0x2E, 0x56, 0x3B, 0x03, 0x55, 0xA2, 0x04,
       0x28, 0x46, 0xDF, 0x2B, 0x65, 0x05, 0x6B, 0x22, 0x02, 0xBE, 0xF2, 0xB8, 0x89,
       0x0C, 0x28, 0x2D, 0x26, 0x3E, 0xE1, 0x6B, 0x63, 0x8A, 0x37, 0x76, 0x23, 0xF2,
       0xDD, 0xAC, 0x04, 0xC6, 0x20, 0x62, 0xDB, 0xAB, 0x02, 0xA0, 0x31, 0x8F, 0x7A,
       0xD6, 0x98, 0x42, 0x75, 0xC0, 0xBB, 0x84, 0x33, 0x10, 0x78, 0xF7, 0x43, 0x12,
       0xC6, 0x03, 0x8F, 0x63, 0x1F, 0x75, 0x94, 0x9E, 0x95, 0x5B, 0x71, 0x9E, 0x49,
       0xA5, 0x13, 0x5B, 0x29, 0xFC, 0xFF, 0x23, 0x80, 0xAF, 0xF1, 0xE4, 0x15, 0x1A,
       0xE9, 0x3C, 0xFB, 0x71, 0x4D, 0x7A, 0xAC, 0x7F, 0x26, 0x74, 0x14, 0x0F, 0x6B,
       0xF7, 0xBB, 0xB8, 0x05, 0x36, 0x4D, 0xC9, 0xA4, 0x35, 0x2C, 0x19, 0x0A, 0xFC,
       0x8C, 0xB3, 0x36, 0x0F, 0x36, 0x4C, 0x75, 0x14, 0x65, 0x50, 0xCD, 0x5E, 0x7F,
       0x9B, 0x01, 0x24, 0x22, 0xCB, 0x91, 0x9F, 0xF4, 0x3E, 0x31, 0xC6, 0x10, 0x30,
       0x42, 0x9D, 0xB2, 0xF9, 0x02, 0xA2, 0x80, 0x3B, 0xDB, 0x15, 0x04, 0x07, 0xED,
       0x1F, 0x9A, 0x2C, 0x5F, 0xF9, 0xAB, 0x44, 0xAB, 0x27, 0x42, 0x41, 0xC5, 0x30,
       0xA3, 0x2E, 0xB6, 0xFD, 0x67, 0xEF, 0xE8, 0xF4, 0xE2, 0x86, 0x44, 0x1E, 0x07,
       0x40, 0xB7, 0x03, 0x4A, 0x19, 0xDE, 0x92, 0x70, 0x3B, 0x2A, 0xB3, 0xAA, 0x6A,
       0xEB, 0xDB, 0x5C, 0x6C, 0x58, 0x5D, 0xE5, 0x59, 0x62, 0x46, 0xA1, 0xF0, 0xB4,
       0x56, 0x70, 0x4C, 0xBB, 0xBD};

void iDecryptHeader(unsigned char* lpBuffer)
{
  for (int i = 272; i != 31; --i )
  {
     lpBuffer[i] ^= lpKey[i % 0x1F3] ^ lpBuffer[i - 1];
  }
}

void iDecryptEntry(unsigned char* lpBuffer, int dwSize)
{
  for (int i = dwSize - 1; i != 50; --i)
  {
     lpBuffer[i] ^= lpKey[i % 0x1F3] ^ lpBuffer[i - 1];
  }
 
  for (int i = 0; i   {
     lpBuffer[i] ^= lpKey[(i 105) % 0x1F3];
  }
}

void iDecryptFileData(unsigned char* lpBuffer, int dwSize)
{
  for (int i = 1; i   {
     lpBuffer[i] ^= lpKey[i % 0x1F3];
  }
}
"

savepos HEADER_OFFSET
math HEADER_SIZE = 272

log MEMORY_FILE HEADER_OFFSET HEADER_SIZE
calldll MEMORY_FILE10 "iDecryptHeader" "tcc" RET MEMORY_FILE

idstring MEMORY_FILE "!!BEWARE THIS FILE IS ENCRYPTED"
goto 260 MEMORY_FILE
get FILES long MEMORY_FILE
get TABLE_OFFSET long MEMORY_FILE

get ARCHIVE_SIZE asize
math TABLE_SIZE = ARCHIVE_SIZE
math TABLE_SIZE -= TABLE_OFFSET

log MEMORY_FILE2 TABLE_OFFSET TABLE_SIZE
calldll MEMORY_FILE10 "iDecryptEntry" "tcc" RET MEMORY_FILE2 TABLE_SIZE

for i = 0   getdstring NAME 256 MEMORY_FILE2
  get ZSIZE long MEMORY_FILE2
  get SIZE long MEMORY_FILE2
  get XSIZE long MEMORY_FILE2
  get OFFSET long MEMORY_FILE2
  getdstring DUMMY 44 MEMORY_FILE2
  callfunction EXTRACT_FILE 1
next i

startfunction EXTRACT_FILE
 if ZSIZE == SIZE
    log MEMORY_FILE OFFSET SIZE
    calldll MEMORY_FILE10 "iDecryptFileData" "tcc" RET MEMORY_FILE SIZE
    log NAME 0 SIZE MEMORY_FILE
 else
    log MEMORY_FILE OFFSET ZSIZE
    calldll MEMORY_FILE10 "iDecryptFileData" "tcc" RET MEMORY_FILE ZSIZE
    clog NAME 0 ZSIZE SIZE MEMORY_FILE
 endif
endfunction


btw: x3.xem it's a fake dll, used for hook ReadFile function :)

OH MY. IT'S WORKING! Thank you so much. I am so thankful to both of you. guys. I'll be praying for you both! Thank you so much!!!
  • Author
  • Localization

rochey, posted Thu Dec 30, 2021 1:00 pm (68555)


hello can you help me encryption the .pak files i not understand how to use this script thanks , and if it possible to do it on all paks ?
  • Author
  • Localization

rochey, posted Sat Jan 01, 2022 9:58 am (68584)


it ask for dll ?
  • Author
  • Localization

aluigi, posted Thu Jan 06, 2022 3:53 pm (68749)


That's a script for quickbms:
http://quickbms.com

Type Y when quickbms will ask you about the DLL code (there is no dll, it refers to the C-language code in the MEMORY_FILE10 string)
  • Author
  • Localization

Omnitrix, posted Thu Dec 29, 2022 1:10 pm (74801)


Hello everyone and happy holidays! After two years I have a problem with another Dragon Nest .pak while unpacking. I got this error:
Image
I saw a topic with similar problem on this forum and tried provided fix but unfortunately it's not working. Script looks like that:
Code:
IDString "EyedentityGames Packing File 0.1"
goto 0x104
get Files long
get noffset long
goto noffset
for i = 0 getdstring NAME 0x100
get ZSIZE long
get SIZE long
get ZSIZE1 long
get OFFSET long
get UNK3 long
getdstring NULL1 0x28
if SIZE log NAME OFFSET SIZE
else
clog NAME OFFSET ZSIZE SIZE
endif
next i

Here is the file, it's 27mb. https://www.mediafire.com/file/colladrc ... 1.pak/file
  • Author
  • Localization

Omnitrix, posted Wed Jan 04, 2023 1:12 pm (74856)


Sorry for bumping. Really need your help, guys!
  • Author
  • Localization

Omnitrix, posted Tue Jan 17, 2023 4:42 pm (75053)


Bump
  • Author
  • Localization

Omnitrix, posted Mon Jan 23, 2023 10:45 am (75146)


bumping again
  • Author
  • Localization

Omnitrix, posted Thu Feb 02, 2023 4:12 pm (75265)


bumping again, please help someone
  • Author
  • Localization

Omnitrix, posted Sat Feb 11, 2023 1:42 pm (75398)


I need help, please if someone can, I will be appreciated
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.