Lego Super Mario .bin files (iOS/Android)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Machow8
Posts: 13
Joined: Thu May 02, 2019 11:58 pm

Lego Super Mario .bin files (iOS/Android)

Post by Machow8 »

Hi,

I'm aiming to extract textures and sound files from the lego Mario and Luigi toys.

Textures like the fire sprite as can be see on Mario's chest in this pic: https://www.lego.com/cdn/cs/set/assets/ ... _alt17.png

I discovered files in the iOS app that has all those assets, which i got and uploaded them:

Mario bin: https://cdn.discordapp.com/attachments/ ... -0-202.bin

Luigi bin: https://cdn.discordapp.com/attachments/ ... -0-215.bin

They seem to be encrypted and idk how to decrypt in order to extract such files.

--------

Edit 1: i used watto's game extractor tool to extract files from bins, but they are still encrypted: https://www.mediafire.com/file/lgjoq770 ... 9.zip/file

But, this time will be better to just decrypt files instead of trying to find a way of dumping them.

--------

Thanks for who can help me with this. =]
VendorX
Posts: 9
Joined: Fri Apr 15, 2022 11:41 am

Re: Lego Super Mario .bin files (iOS/Android)

Post by VendorX »

Below bms will export all data - I don't think is encrypted.

Code: Select all

# Lego Super Mario. *.Bin
# script for QuickBMS http://quickbms.aluigi.org

get ExportSze long
math DataOffset = ExportSze + 4

do
    get ExportFlags long
    get ExportCont long

    for i = 0 < ExportCont
        get Unk00 long
        get Unk01 long
        get SerialOffset long
        get SerialSize long
        get Flags long
       
        string Name p "%x_%i_%i_%i_%x%s" ExportFlags i Unk00 Unk01 Flags ".dat"
       
        log Name SerialOffset SerialSize
    next i

    Savepos Position
while Position < DataOffset


Note: The names consist:
MasterChnkIDinHex_Index_UnkInt_UnkInt_ChnkIDinHex
Machow8
Posts: 13
Joined: Thu May 02, 2019 11:58 pm

Re: Lego Super Mario .bin files (iOS/Android)

Post by Machow8 »

Dude, that is so nice to see this! Thx!

But the next step is: extract textures and sound files from those dat files.

Can you create a script to extract them too or know about such a script or tool that can extract lego .dat files?

I tryed the ttgames.bms script ( http://aluigi.altervista.org/bms/ttgames.bms from http://aluigi.altervista.org/quickbms.htm ), but without success.

I hope for the best there is a way to extract sounds and textures those .dat files from Lego Mario.
Last edited by Machow8 on Thu Apr 21, 2022 1:52 pm, edited 1 time in total.
Machow8
Posts: 13
Joined: Thu May 02, 2019 11:58 pm

Re: Lego Super Mario .bin files (iOS/Android)

Post by Machow8 »

VendorX wrote:Below bms will export all data - I don't think is encrypted.

Code: Select all

# Lego Super Mario. *.Bin
# script for QuickBMS http://quickbms.aluigi.org

get ExportSze long
math DataOffset = ExportSze + 4

do
    get ExportFlags long
    get ExportCont long

    for i = 0 < ExportCont
        get Unk00 long
        get Unk01 long
        get SerialOffset long
        get SerialSize long
        get Flags long
       
        string Name p "%x_%i_%i_%i_%x%s" ExportFlags i Unk00 Unk01 Flags ".dat"
       
        log Name SerialOffset SerialSize
    next i

    Savepos Position
while Position < DataOffset


Note: The names consist:
MasterChnkIDinHex_Index_UnkInt_UnkInt_ChnkIDinHex

Are you able to create another script to extract sounds and textures from those .dat files?