Script bms for Irony Curtain (cub files)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
ghylard
Posts: 77
Joined: Wed Oct 08, 2014 1:03 pm

Script bms for Irony Curtain (cub files)

Post by ghylard »

Aluigi,
I tried to use the script you made for enigmatis to extract the data from the *.cub files of the Irony Curtain game: From Matryoshka with Love because it is also from Artifex Mundi but the script does not work correctly.
Would it be possible to modify it so that it could work on Irony Curtain?

https://www.mediafire.com/file/7ocif0z4rvv67zz/IronyCurtain_en.cub/file
Last edited by ghylard on Tue May 21, 2019 5:38 am, edited 1 time in total.
ghylard
Posts: 77
Joined: Wed Oct 08, 2014 1:03 pm

Script bms for Irony Curtain (cub files)

Post by ghylard »

I used the same script enigmatis.bms on the previous game of Atifex Mundi, My Brothers Rabbit and the script works perfectly. :D
I can't see how the file structure is modified to modify the enigmatis.bms script.
With Irony Curtains files, the extracted files are empty. :shock:

Code: Select all

# Artifex Mundi *.cub (script 0.3)
#   Enigmatis
#   The Secret Order
# script for QuickBMS http://quickbms.aluigi.org

getdstring SIGN 3
goto 0
if SIGN != "cub"
    getvarchr TMP SIGN 0
    math TMP ^ 'c'
    filexor TMP
endif
idstring "cub\0"
get VER string
get FILES long
getdstring DUMMY 0x100
if FILES == 0
    get CUB_SIZE asize
    savepos OFFSET
    for OFFSET = OFFSET < CUB_SIZE
        callfunction DUMP 1
        math OFFSET += SIZE
        goto OFFSET
    next
else
    for i = 0 < FILES
        callfunction DUMP 1
    next i
endif

startfunction DUMP
    getdstring NAME 0x100
    get OFFSET long
    get SIZE long

    savepos TMP
    goto OFFSET
    get SIGN long
    if SIGN == 0x12345678
        get DUMMY long
        get DUMMY long
        get DUMMY long
        get DUMMY short
        get NUM long
        math OLD_OFFSET = OFFSET
        savepos OFFSET
        xmath OFFSET "OFFSET + (NUM * 16)"
        xmath SIZE "SIZE - (OFFSET - OLD_OFFSET)"
    endif
    goto TMP

    log NAME OFFSET SIZE
endfunction
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Script bms for Irony Curtain (cub files)

Post by aluigi »

ghylard
Posts: 77
Joined: Wed Oct 08, 2014 1:03 pm

Re: Script bms for Irony Curtain (cub files)

Post by ghylard »

Thanks a lot, Aluigi, the modified script works perfectly! :D