Help creating a QuickBMS Script for this format (found vital info!)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Penney19
Posts: 19
Joined: Sat Jan 12, 2019 10:07 pm

Help creating a QuickBMS Script for this format (found vital info!)

Post by Penney19 »

Hello, a while ago I posted about a format for .ho files. This time, I found out some useful things about these .ho that is vital information, but I need help creating a script for them.
First of all, these .ho files have filenames, but no absolute offsets in the file to the assets.
Image
But, the game i am researching on has these .lo files that are logs! it has all of the filenames, and their absolute offsets, as well as what asset type they are, as well as their size, and padding size!!! Image
So, my question is, knowing the files absolute offsets, as well as their name, size and padding, how do I make a script to extract these .ho files??? Please help! .ho and .lo samples here! https://drive.google.com/file/d/1Pv_jqTZ9wYbVo2llkvvy5C7rcQBF8dX8/view?usp=sharing
Penney19
Posts: 19
Joined: Sat Jan 12, 2019 10:07 pm

Re: Help creating a QuickBMS Script for this format (found vital info!)

Post by Penney19 »

Any help? Like i said, for these .ho files, there is a .lo file that goes with it that in plain text says what offset the files are as well as their size. So knowing this, how would I make a QuickBMS script for these .ho files? :)
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Help creating a QuickBMS Script for this format (found vital info!)

Post by aluigi »

It's a messy format, I can only make a script for scanning the LO file and dumping the data referenced in HO:

Code: Select all

OPEN FDDE "lo"
OPEN FDDE "ho" 1

set SEARCH binary  "\t      0\t "

get LO_SIZE asize
do
    get TMP line
    set NAME string TMP
    string TMP 0| SEARCH
    if TMP != ""
        string NAME % " "
        string TMP << 8
        string TMP p "0x%s" TMP
        putarray 0 -1 NAME
        putarray 1 -1 TMP
    endif
    savepos TMP
while TMP < LO_SIZE

get TMP asize 1
putarray 0 -1 ""
putarray 1 -1 TMP
sortarray 1 1

for i = 0
    getarray NAME 0 i
    if NAME == ""
        break
    endif
    getarray OFFSET 1 i
    math i + 1
    getarray SIZE   1 i
    math SIZE - OFFSET
    log NAME OFFSET SIZE 1
next i
Penney19
Posts: 19
Joined: Sat Jan 12, 2019 10:07 pm

Re: Help creating a QuickBMS Script for this format (found vital info!)

Post by Penney19 »

Thanks!!! This works!