Gameloft *.bar files

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
lupus
Posts: 36
Joined: Sun Dec 03, 2017 7:52 am

Gameloft *.bar files

Post by lupus »

Hi, can somebody helps with unpacking Gameloft *.bar files?
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Gameloft *.bar files

Post by LolHacksRule »

What game? Also they are usually ZIPs except for oconf.bar which is plaintext and the samples you provided...
lupus
Posts: 36
Joined: Sun Dec 03, 2017 7:52 am

Re: Gameloft *.bar files

Post by lupus »

LolHacksRule wrote:What game?

Soul of Darkness - dsiware
LolHacksRule wrote:Also they are usually ZIPs except for oconf.bar

Not this time :(
res.bar have GLPK magic, maybe its GameLoft PacKage, IDK.
LolHacksRule
Posts: 865
Joined: Fri Apr 20, 2018 12:41 am

Re: Gameloft *.bar files

Post by LolHacksRule »

Probably... offzip -a on sprites_new.bar outputs a number of files (not sure if they are useful).

Code: Select all

- 58 valid compressed streams found
- 0x0003070d -> 0x00035f71 bytes covering the 15% of the file

On res.bar (there's a bunch of BSPRITEs).

Code: Select all

- 27 valid compressed streams found
- 0x0001a419 -> 0x0001afd5 bytes covering the 16% of the file
lupus
Posts: 36
Joined: Sun Dec 03, 2017 7:52 am

Re: Gameloft *.bar files

Post by lupus »

I tried to start from offzip, but not found any useful in unpacked data. Sad.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Gameloft *.bar files

Post by aluigi »

The two samples have different formats.

This is an example script for the sprites one:

Code: Select all

get FILES short
for i = 0 < FILES
    get OFFSET long
    putarray 0 i OFFSET
next i
savepos BASE_OFF
math FILES - 1
for i = 0 < FILES
    getarray OFFSET 0 i
    math i + 1
    getarray SIZE 0 i
    math SIZE - OFFSET
    math OFFSET + BASE_OFF
    log "" OFFSET SIZE
next