[Request] Update script for QQ VFS file

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

[Request] Update script for QQ VFS file

Post by unominhtuan »

I use dzs_qq.bms, i can unpack file, but i can't repack.... vfs file of Moonligh Blade by QQ game...
who can help me update this script can reimport vfs file on this game...
many thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Request] Update script for QQ VFS file

Post by aluigi »

I have just updated the script to version 0.3.1a for being able to work in reimport mode:
http://aluigi.org/bms/dzs_qq.bms

Let me know if not it works better.
There are no other solutions.
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

I tried, it still does not work

notice: 0 file reimporter in 33 seconds

this link to vfs file: https://drive.google.com/open?id=1cAZmb ... GluWkbaFhS

I hope you can make it work, very grateful
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Request] Update script for QQ VFS file

Post by aluigi »

Usually if you get 0 files it means you are using it in the wrong way.
Are you using the latest version of quickbms?
Remember to select the same file and folder you selected for extraction.
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

aluigi wrote:Usually if you get 0 files it means you are using it in the wrong way.
Are you using the latest version of quickbms?
Remember to select the same file and folder you selected for extraction.



I used quickbms 0.8.4 and have followed the instructions, but still take note of such. I open reimport.bat select the script, select the .vfs file, select the directory containing the reimport file :(
This script can be unpacked but can not be repimported. you can check back for me again, thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Request] Update script for QQ VFS file

Post by aluigi »

I guess the problem is just the directory you selected because you must select the original folder that you selected during extraction without having touched the location of the file or quickbms will not been able to find it.

What quickbms does is extremely simple, it just open the file in read mode instead of write mode so if you get zero files it means there was no file to open
flowersun
Posts: 6
Joined: Sun Apr 29, 2018 1:33 pm

Re: [Request] Update script for QQ VFS file

Post by flowersun »

I'm curious about that why do you want to repack vfs file? The client will check each file at start, repack may be discovered. At least, I know if you repack the sfc file, you couldn't even log in.
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

i can translate this game
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: [Request] Update script for QQ VFS file

Post by Ekey »

CRC calc for this game. Maybe useful for someone.

Code: Select all

uint32_t moon_crc32(uint32_t dwSize, uint8_t *pBuffer, uint32_t dwHash)
{
  uint32_t dwShiftedSize;
  uint32_t dwR1;
  uint32_t dwR2;
  uint32_t dwR3;

  while ( (uint8_t)pBuffer & 3 && dwSize )
  {
    dwHash = crc32_tab[*pBuffer++ ^ (uint8_t)dwHash] ^ (dwHash >> 8);
    --dwSize;
  }
 
  if ( dwSize >= 4 )
  {
    dwShiftedSize = dwSize >> 2;
    do
    {
      dwSize -= 4;
      dwR1 = crc32_tab[(uint8_t)(*pBuffer ^ dwHash)] ^ ((*(DWORD *)pBuffer ^ dwHash) >> 8);
      pBuffer += 4;
      dwR2 = crc32_tab[(uint8_t)dwR1] ^ (dwR1 >> 8);
      dwR3 = crc32_tab[(uint8_t)dwR2] ^ (dwR2 >> 8);
      dwHash = crc32_tab[(uint8_t)dwR3] ^ (dwR3 >> 8);
      --dwShiftedSize;
    }
    while ( dwShiftedSize );
  }
 
  for ( ; dwSize; ++pBuffer )
  {
    dwHash = crc32_tab[*pBuffer ^ (uint8_t)dwHash] ^ (dwHash >> 8);
    --dwSize;
  }
 
  return ~dwHash;
}
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

Ekey wrote:CRC calc for this game. Maybe useful for someone.

Code: Select all

uint32_t moon_crc32(uint32_t dwSize, uint8_t *pBuffer, uint32_t dwHash)
{
  uint32_t dwShiftedSize;
  uint32_t dwR1;
  uint32_t dwR2;
  uint32_t dwR3;

  while ( (uint8_t)pBuffer & 3 && dwSize )
  {
    dwHash = crc32_tab[*pBuffer++ ^ (uint8_t)dwHash] ^ (dwHash >> 8);
    --dwSize;
  }
 
  if ( dwSize >= 4 )
  {
    dwShiftedSize = dwSize >> 2;
    do
    {
      dwSize -= 4;
      dwR1 = crc32_tab[(uint8_t)(*pBuffer ^ dwHash)] ^ ((*(DWORD *)pBuffer ^ dwHash) >> 8);
      pBuffer += 4;
      dwR2 = crc32_tab[(uint8_t)dwR1] ^ (dwR1 >> 8);
      dwR3 = crc32_tab[(uint8_t)dwR2] ^ (dwR2 >> 8);
      dwHash = crc32_tab[(uint8_t)dwR3] ^ (dwR3 >> 8);
      --dwShiftedSize;
    }
    while ( dwShiftedSize );
  }
 
  for ( ; dwSize; ++pBuffer )
  {
    dwHash = crc32_tab[*pBuffer ^ (uint8_t)dwHash] ^ (dwHash >> 8);
    --dwSize;
  }
 
  return ~dwHash;
}


how to use this code?
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

aluigi wrote:I guess the problem is just the directory you selected because you must select the original folder that you selected during extraction without having touched the location of the file or quickbms will not been able to find it.

What quickbms does is extremely simple, it just open the file in read mode instead of write mode so if you get zero files it means there was no file to open



You can check the Script for me again? many thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: [Request] Update script for QQ VFS file

Post by aluigi »

unominhtuan wrote:You can check the Script for me again? many thanks

As I have already said (and tested since I check every feedback), it's not a problem of quickbms or script.

If you need another example usage:
viewtopic.php?p=23032#p23032
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

aluigi wrote:
unominhtuan wrote:You can check the Script for me again? many thanks

As I have already said (and tested since I check every feedback), it's not a problem of quickbms or script.

If you need another example usage:
https://zenhax.com/viewtopic.php?p=23032#p23032


I have followed the instructions, it can unpack, but can not repack
This is a video I uploaded to google drive, please take a look

https://drive.google.com/open?id=1zrmL8qwXTt9YFyjI7yN_UW7aN9XEAjkg
HPAndroid
Posts: 67
Joined: Sun Mar 04, 2018 1:29 am

Re: [Request] Update script for QQ VFS file

Post by HPAndroid »

unominhtuan wrote:
aluigi wrote:
unominhtuan wrote:You can check the Script for me again? many thanks

As I have already said (and tested since I check every feedback), it's not a problem of quickbms or script.

If you need another example usage:
viewtopic.php?p=23032#p23032


I have followed the instructions, it can unpack, but can not repack
This is a video I uploaded to google drive, please take a look

https://drive.google.com/open?id=1zrmL8qwXTt9YFyjI7yN_UW7aN9XEAjkg

Chào bạn! Bạn có thể cho tôi biết, Bạn có phải là người Việt Nam không? Và tôi sử dụng Tiếng Việt để giúp bạn hiểu hơn(Nếu phải hãy cho tôi biết)
Thật sự vấn đề của bạn có thể được giải quyết, và tôi đã thấy vấn đề của bạn! Bạn đã reimport không đúng. :)
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

HPAndroid wrote:
unominhtuan wrote:
aluigi wrote:As I have already said (and tested since I check every feedback), it's not a problem of quickbms or script.

If you need another example usage:
https://zenhax.com/viewtopic.php?p=23032#p23032


I have followed the instructions, it can unpack, but can not repack
This is a video I uploaded to google drive, please take a look

https://drive.google.com/open?id=1zrmL8qwXTt9YFyjI7yN_UW7aN9XEAjkg

Chào bạn! Bạn có thể cho tôi biết, Bạn có phải là người Việt Nam không? Và tôi sử dụng Tiếng Việt để giúp bạn hiểu hơn(Nếu phải hãy cho tôi biết)
Thật sự vấn đề của bạn có thể được giải quyết, và tôi đã thấy vấn đề của bạn! Bạn đã reimport không đúng. :)

đúng vậy, tôi đã cố gắng để reimport vfs file, nhưng không thể, có thể sai ở một bước nào đó
HPAndroid
Posts: 67
Joined: Sun Mar 04, 2018 1:29 am

Re: [Request] Update script for QQ VFS file

Post by HPAndroid »

Bạn hãy cung cấp cho tôi các tệp mà bạn muốn reimport lại. Tôi sẽ giúp bạn tìm ra chỗ sai của mình :)
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

HPAndroid wrote:Bạn hãy cung cấp cho tôi các tệp mà bạn muốn reimport lại. Tôi sẽ giúp bạn tìm ra chỗ sai của mình :)

https://drive.google.com/file/d/1cAZmbsdcqy2TQSzaMo-TWoGluWkbaFhS/view cảm ơn bạn
HPAndroid
Posts: 67
Joined: Sun Mar 04, 2018 1:29 am

Re: [Request] Update script for QQ VFS file

Post by HPAndroid »

unominhtuan wrote:
HPAndroid wrote:Bạn hãy cung cấp cho tôi các tệp mà bạn muốn reimport lại. Tôi sẽ giúp bạn tìm ra chỗ sai của mình :)

https://drive.google.com/file/d/1cAZmbsdcqy2TQSzaMo-TWoGluWkbaFhS/view cảm ơn bạn

Này anh bạn! :o
Bạn đã sai ở bước cuối cùng!
Tôi có một câu hỏi này với bạn! Liệu bạn muốn reimport phần nào trong các phần bạn trích xuất ra được, hay là tất cả :?:
unominhtuan
Posts: 34
Joined: Tue Apr 24, 2018 9:56 am

Re: [Request] Update script for QQ VFS file

Post by unominhtuan »

HPAndroid wrote:
unominhtuan wrote:
HPAndroid wrote:Bạn hãy cung cấp cho tôi các tệp mà bạn muốn reimport lại. Tôi sẽ giúp bạn tìm ra chỗ sai của mình :)

https://drive.google.com/file/d/1cAZmbsdcqy2TQSzaMo-TWoGluWkbaFhS/view cảm ơn bạn

Này anh bạn! :o
Bạn đã sai ở bước cuối cùng!
Tôi có một câu hỏi này với bạn! Liệu bạn muốn reimport phần nào trong các phần bạn trích xuất ra được, hay là tất cả :?:

các file trong thư mục TEXT
HPAndroid
Posts: 67
Joined: Sun Mar 04, 2018 1:29 am

Re: [Request] Update script for QQ VFS file

Post by HPAndroid »

unominhtuan wrote:
HPAndroid wrote:

Này anh bạn! :o
Bạn đã sai ở bước cuối cùng!
Tôi có một câu hỏi này với bạn! Liệu bạn muốn reimport phần nào trong các phần bạn trích xuất ra được, hay là tất cả :?:

các file trong thư mục TEXT

Tại bước cuối cùng bạn hãy chọn lưu mà không chọn bất kỳ tệp xml nào cả. Chúc may mắn!
Image
Nếu bạn muốn reimport lại tất cả, thì các bước cũng tương tự nhưng đến bước cuối thì chọn thư mục vfs rồi nhấp vào lưu.
Image
Last edited by HPAndroid on Thu May 10, 2018 1:45 am, edited 1 time in total.