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.

QuickBMS errors [programming, scripting, quickbms.exe tool... NOT games]

Featured Replies

  • Author
  • Localization

Brolijah, posted Wed May 01, 2019 8:25 pm (47519)


From what I see in my pseudocode notes from both Ghidra and IDA, that line should be correct...
Code:
// Ghidra
if (param_src <= pbVar6 param_srcSize)
// IDA
if ( ptr_encoded_src <= &v3[arg_srcSize] )

I think you forgot a * and meant:
Code:
return dst - *ptr_dst;

Even if I return the difference between the dst and it's starting point, that doesn't verify decoding didn't accidentally jump past the boundaries of its buffer. If the dst is beyond the expected EOF, that return wouldn't confirm it decompressed exactly as intended. (Except for the heap error that would probably occur.)
  • Replies 671
  • Views 61
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Localization

kakarash, posted Thu May 02, 2019 2:17 pm (47536)


HI, i wanna extract Urban Chaos PS2 games files (.000 .001 .002 and .wad files)

i have tried all scripts and tools but it wont work any one have an idea how to extract those files ?
  • Author
  • Localization

kakarash, posted Fri May 03, 2019 6:51 pm (47570)


sry i'm new
  • Author
  • Localization

Brolijah, posted Thu May 23, 2019 6:50 pm (47972)


While I was attempting (and failing) to build quickbms in Windows, I found this error with the swprintf macros which refuses to compile in against my GCC7 and GCC8 toolchains due to arithmetic on a pointer.
Code:
// utils.c :  Line 439 in build_lpstrFilter()
for(i = 0; (f = g_filter_in_files[i]); i ) {
    myswprintf(fW, /*(ret_len - fW)*/ ret_len / sizeof(wchar_t), L"(%s)", native_utf8_to_unicode(f));
    fW = wcslen(fW) 1;   // correct
    myswprintf(fW, /*(ret_len - fW)*/ ret_len / sizeof(wchar_t), L"%s", native_utf8_to_unicode(f));
    fW = wcslen(fW) 1;   // correct
}

You make a comment about swprintf being borked in MinGW GCC7, but I can't find related error information on this particular function. Even if it was related... I really can't imagine why you subtract the pointer from the buffer length and use that as a size argument.

Also, before I make a thread on the subject: Do you have a specialized makefile for building in a Windows environment? Or do you only cross-compile? I've spent 3 days trying and consistently failing with errors that would only arise from compiling within Windows. (It's been a complete nightmare.)
  • Author
  • Localization

aluigi, posted Thu May 23, 2019 8:43 pm (47973)


Indeed that math doesn't have sense since there is a "ret" missing there, I have no idea why gcc didn't yell at me.
The good news is that the function is NEVER used.

I use a .bat file for doing the whole compiling job on Windows using gcc 4:
http://aluigi.org/bms/compa.bat
  • Author
  • Localization

kantonin, posted Mon Jun 10, 2019 9:00 am (48633)


Hi everybody is someone can help me?

I got this error when I tried to extract a .cpk
"Can't read 1 bytes from offset 000000007d02b938"
....
Coverage file 0 0%

I don't understand because the game (PES 2019) read the cpk well all content included.
But the file make crash every tools to extract...

Even CriPakTools can't extract

error in CriPAK :
Image

I read somewhere that it's possible to lock cpk... Maybe this one is...

Is it possible that with an hex editor someone has changed one byte the one told by the program?

but the offset in hex editor are not with 16 digit so how can I repair this?

Thanks a lot
  • Author
  • Localization

aluigi, posted Mon Jun 10, 2019 4:04 pm (48641)


@kantonin
off-topic, this topics is "NOT games" as written in the title.

If you get errors with all the tools, it means it's not the right format for them.

As far as I know PES uses its own format and there are specific tools for it:
viewtopic.php?p=34590#p34590
  • Author
  • Localization

GHFear, posted Mon Jun 10, 2019 4:23 pm (48644)


if statements like this are bugged.
I tested on 0.9.2
and 0.10.0.

Instead of comparing if the VLV variable == "VLV", it will compare if the VLV variable == the VLV variable.
So it will ALWAYS come back as true.
So in other words, if your variable name is the same as the the string you look for, it always returns true.

Code:
goto 64
get VLV string

if VLV == "VLV"
    print "YES"
else
    print "NO"
endif


but maybe I am misunderstanding the use of "" in quickBMS and even "VAR" can be used as only VAR in if statements.
  • Author
  • Localization

aluigi, posted Mon Jun 10, 2019 5:17 pm (48645)


That's how it should work, variable names and constants are the same.

It's a bug/feature that can't be changed.

Same happens for the case, for example:
Code:
if VAR == "VLV"
elif VAR == "vlv"
  • Author
  • Localization

GHFear, posted Mon Jun 10, 2019 5:38 pm (48651)


aluigi wrote:
That's how it should work, variable names and constants are the same.

It's a bug/feature that can't be changed.

Same happens for the case, for example:
Code:
if VAR == "VLV"
elif VAR == "vlv"


Okay, then it's good.
I will remember that.
Took me forever to figure out why it was only giving me true.
  • Author
  • Localization

kantonin, posted Mon Jun 10, 2019 8:17 pm (48659)


aluigi wrote:
@kantonin
off-topic, this topics is "NOT games" as written in the title.

If you get errors with all the tools, it means it's not the right format for them.

As far as I know PES uses its own format and there are specific tools for it:
viewtopic.php?p=34590#p34590


Know the specific tool, but it works every time with quickBMS so only got the error with this file... my question is not related to the game... but specific to this error and way to solve it even if the file doesn't come from a game... Is there a way to solve such "byte error"

Thanks
  • Author
  • Localization

aluigi, posted Tue Jun 11, 2019 8:56 am (48674)


kantonin wrote:
my question is not related to the game... but specific to this error and way to solve it even if the file doesn't come from a game...

It's IS related to this game since you get that error because it's an error in the format.
The only thing you can do is opening a new topic in the Game Archive section for it, upload that specific file that gives the problem and wait an answer.
Please note that the cpk script will not be updated anymore.
  • Author
  • Localization

BCGhost, posted Fri Jul 12, 2019 1:52 pm (49271)


The sortarray command somehow produces a bug when the number of elements in arrays exceeds 6:
Code:
before
fileID  Offset  Size  NameID
0x00000000  0x0002dae0  0x00006878  0x00000020
0x00000000  0x000175f0  0x00003834  0x00000021
0x00000000  0x00034360  0x00006878  0x00000022
0x00000000  0x000272a0  0x0000683c  0x00000023
0x00000000  0x0001ae30  0x00003894  0x00000024
0x00000000  0x00021fa0  0x000052f8  0x00000025
0x00000001  0x0000ed50  0x000080a8  0x00000026
0x00000000  0x0001e6d0  0x000038c4  0x00000027
0x00000000  0x0000dd40  0x00003184  0x00000028
0x00000001  0x00016e00  0x0000a558  0x00000029
0x00000000  0x000021c0  0x00002ee0  0x0000002a
0x00000000  0x000050a0  0x00002ee0  0x0000002b
0x00000001  0x000074d0  0x00007874  0x0000002c
0x00000000  0x00010ed0  0x00003384  0x0000002d
0x00000000  0x00014260  0x00003384  0x0000002e
0x00000001  0x00000000  0x000074c8  0x0000002f
0x00000000  0x00007f80  0x00002ee0  0x00000030
0x00000000  0x0000ae60  0x00002ee0  0x00000031
0x00000000  0x000004b0  0x00001d05  0x00000032
0x00000000  0x00000180  0x00000328  0x00000033
0x00000002  0x00000000  0x002404dc  0x00000034
0x00000000  0x00000000  0x0000017a  0x00000035
after
fileID  Offset  Size  NameID
0x00000000  0x0002dae0  0x00006878  0x00000020
0x00000000  0x000175f0  0x00003834  0x00000021
0x00000000  0x00034360  0x00006878  0x00000022
0x00000000  0x000272a0  0x0000683c  0x00000023
0x00000000  0x0001ae30  0x00003894  0x00000024
0x00000000  0x00021fa0  0x000052f8  0x00000025
0x00000000  0x0001e6d0  0x000038c4  0x00000027
0x00000000  0x0000dd40  0x00003184  0x00000028
0x00000000  0x000021c0  0x00002ee0  0x0000002a
0x00000000  0x000050a0  0x00002ee0  0x0000002b
0x00000000  0x00010ed0  0x00003384  0x0000002d
0x00000000  0x00014260  0x00003384  0x0000002e
0x00000000  0x00007f80  0x00002ee0  0x00000030
0x00000000  0x0000ae60  0x00002ee0  0x00000031
0x00000000  0x000004b0  0x00001d05  0x00000032
0x00000000  0x00000180  0x00000328  0x00000033
0x00000000  0x00000000  0x0000017a  0x00000035
0x00000000  0x00000000  0x00000000  0x00000000
0x00000001  0x00016e00  0x0000a558  0x00000029
0x00000001  0x00000000  0x000074c8  0x0000002f
0x00000001  0x000074d0  0x00007874  0x0000002c
0x00000001  0x0000ed50  0x000080a8  0x00000026


The elements of the line where the NameID was 0x34 are all set to zeros somehow after sortarray. Tested with quickbms and quickbms_4gb_files of v0.9.2 and 0.10.0, all same results.
Here's the test script and the source data.

sortarrayTest.zip

  • Author
  • Localization

Cromdar, posted Thu Jul 18, 2019 10:29 pm (49367)


I try to unpak "Game-WindowsNoEditor.pak" of the Killsquad game and I have the following error.
Quote:
Error: the compressed zlib/deflate input is wrong or incomplete (-3)
Info: algorithm 1
offset 000000001136514c
input size 0x00000000000041e7 16871
output size 0x0000000000010000 65536
result 0xffffffffffffffff -1

Error: the uncompressed data (-1) is bigger than the allocated buffer (65562)

Last script line before the error or that produced the error:
213 clog NAME CHUNK_OFFSET CHUNK_ZSIZE CHUNK_SIZE 0 CHUNK_XSIZE

The reason to extract the files is to see if I can play the game because I have problems with most games that use UE4, or do not install or give me several errors. I used the following script "unreal_tournament_4.bms" I don't know if it is the right one, I'm a complete noob.
  • Author
  • Localization

kamtesel, posted Wed Sep 25, 2019 9:35 am (50873)


hi
any update for gears 5?
it gave you the offset error
  • Author
  • Localization

aluigi, posted Sun Oct 06, 2019 6:36 am (51349)


@BCGhost
Ok I have found the cause of the issue but it's not a bug of quickbms.

The problem is related to the pre-allocation of the arrays like "putarray 0 totalFileNum 0 # fileID" that indeed adds a new element in the array.

With the new element the total number of entries is totalFileNum 1 and no longer totalFileNum, so everything is perfectly sorted but:
- you can't see fileID 2 because it's at position totalFileNum 1 not covered by the display cycle
- the last zeroed element you see for fileID 0 is the new element added for pre-allocation

If you remove pre-allocation everything is ok, you can see the NameID 0x34 element if you use "for i = 0 < totalFileNum".

Since it's not a bug, there is nothing to fix.

Usually pre-allocation is not necessary for arrays.
  • Author
  • Localization

Shokoniraya, posted Wed Oct 09, 2019 2:17 pm (51416)


sir aluigi, i found a problem, seems like slog cant use a opened file by FDSE
here a example: slog ''' OFFSET SIZE 1 or slog "" OFFSET SIZE 2

Code:
open FDSE DAT 1
open FDSE LANG 2
for i
get OFFSET long 1
get SIZE long 1
slog "" OFFSET SIZE 2
next i



please add full float Support in quickbms, it's really important for new games in font files and config files)

and please add a option to quickbms to get CRC or MD5 of a file
  • Author
  • Localization

aluigi, posted Sat Oct 12, 2019 12:30 pm (51472)


The Slog syntax is "SLog NAME OFFSET SIZE [TYPE] [FILENUM]" so the correct usage is:
slog "" OFFSET SIZE string 2

I'm trying to implement float just now but it will be very limited, just get math put print

crc and md5 is already possible with Encryption command.
  • Author
  • Localization

aluigi, posted Sun Oct 20, 2019 6:35 pm (51650)


QuickBMS 0.10.1 is now available
  • Author
  • Localization

Nameless, posted Mon Dec 09, 2019 7:15 am (52473)


It seems like there is very ugly bug in CRC calculation. If you process list with thousands of strings, for some of them you can receive invalid CRC values but retesting faulty strings individually gives CRC without errors. As if there occurs internal overflow or something? It happened to me with type 1 and I don't know if it also happens with other types, I tested this feature just to find out how useful it can be with such tasks and it gave me only headache because of how convoluted it is, putting parameters into one whole string is really terrible idea.
  • Author
  • Localization

GHOST DEAD, posted Tue Dec 10, 2019 12:16 pm (52490)


slog cant put anything on MEMORY_FILE

Code:
slog MEMORY_FILE1 TEXT_OFFSET TEXT_LENGHT
  • Author
  • Localization

GHOST DEAD, posted Tue Dec 10, 2019 12:37 pm (52491)


there is something wrong if someone want to make a complete repacker with QuickBMS
because its possible to write algorithm with bms language for files with QuickBMS, but it cant do all of jobs at one script for repacking

is there any way to use export and reimport at one script? because it will be possible to make a script to work just like a program

it would be very better to use customized log command such as these commands, because need to update some info after repacking or need to change something in importing when a file will insert into the archive
and MEMORY_FILE importing is important too for this operation, i mean import a MEMORY_FILE to another MEMORY_FILE, or even import a file in MEMORY_FILE
Code:
export_log
import1_log
import2_log
import3_log

export_slog
import1_slog
import2_slog
import3_slog

export_clog
import1_clog
import2_clog
import3_clog
  • Author
  • Localization

greenlemonade1, posted Wed Dec 18, 2019 10:39 am (52645)


I noticed that quickbms doesn't export all files for my game. Using some other method that export files, I noticed that there are more files, what can be the problem?
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.