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.

.bf extraction - memory allocation problem

Featured Replies

  • Author
  • Localization

Omnitrix, posted Wed Dec 23, 2020 1:19 am (61246)


Hello! I am trying to unpack Michael Jackson The Experience (PS3) .bf archive and getting this error in a middle of extraction:

- error in src\extra\xalloc.c line 618: xdbg_malloc()

Error: memory allocation problem

I am using this script:
Code:
# The Adventures of Tintin / Ubisoft BBF (script 0.1.4)
# script for QuickBMS http://quickbms.aluigi.org

comtype lzo1x
idstring "ABE"
get DUMMY byte
get DUMMY long
get DUMMY long
get DUMMY long
get DUMMY long
get DUMMY long
get NEXT long
get DUMMY long
get ROOT long
get DUMMY long
get DUMMY long  # packs?
get FILES long
do
    goto NEXT
    get FILES long
    get PREV long
    get NEXT long
    for i = 0 < FILES
        getdstring NAME 0x50
        if NAME == ""
            break   # in case the FILES calculation is wrong
        endif
        get ZERO long
        if ZERO == 0xfafafafa
            break
        endif
        get PREV_FILE long
        get ZSIZE long
        get TIMESTAMP longlong
        get CRC long
        get DUMMY long
        get OFFSET long
        get DUMMY long
        get SIZE long
        getdstring DUMMY 0x50
        string NAME R= "_" "/"
        savepos TMP
        goto OFFSET
        get ZSIZE long
        get SIZE long
        get DUMMY long
        get TEST long
        math OFFSET = 0x20

        if TEST == 3    # apparently this is correct
            math SIZE = ZSIZE
        endif
        if SIZE == 0
            math SIZE = ZSIZE   # just a test
        endif
        if SIZE != 0
            if ZSIZE == SIZE
                goto OFFSET
                getdstring SIGN 4
                if SIGN == "LySE"
                    math OFFSET = 0x14
                    math SIZE   -= 0x14
                endif
                log NAME OFFSET SIZE
            else
                if TEST >= 4
                    goto OFFSET
                    get DUMMY long  # 1
                    get NUM long
                    xmath OFFSET "OFFSET (4 4 (NUM * 4))"
                    xmath ZSIZE  "ZSIZE  - (4 4 (NUM * 4))"
                endif
                clog NAME OFFSET ZSIZE SIZE
            endif
        endif
        goto TMP
    next i
    if NEXT == 0xaaaaaaaa || NEXT == 0x7f7f7f7f
        math NEXT = 0xffffffff
    endif
while NEXT != 0xffffffff
  • Author
  • Localization

Omnitrix, posted Sat Dec 26, 2020 10:11 pm (61305)


Sorry, but no one?
  • Author
  • Localization

aaa801, posted Sun Dec 27, 2020 1:39 pm (61315)


without a sample file or the script you used linked, you likely won't get many takers.
  • Author
  • Localization

Omnitrix, posted Sun Dec 27, 2020 9:30 pm (61336)


aaa801 wrote:
without a sample file or the script you used linked, you likely won't get many takers.

The main file is 14 gb and extracting breaking in a middle of the process :(
  • Author
  • Localization

aluigi, posted Thu May 13, 2021 3:22 pm (64010)


No need to upload 14Gb because nobody is going to download it.
Long story short the format is a mess.

What I can suppose based on the large size of the file is that some 32bit fields probably must be set to 64bit, for example OFFSET which is used as absolute position and can't be 32bit.
The problem is that the original formats used a 32bit offset followed by a DUMMY which is usually used for non-zero values.
You can try to replace "get OFFSET long" with "get OFFSET longlong" and later (if still not working) remove the "get DUMMY long" after it
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.