STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Zolodei
Posts: 36
Joined: Sat Sep 16, 2017 6:34 pm

STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by Zolodei »

There is a suspicion that SLZ is used. Could you, write a script for unpacking SLZ or clarify the algorithm?
If you use, this script with changes idstring "PACK" на idstring "KCAP" gives an error message (OFFSET 0x00000000000000b2, ZSIZE 0x0000000000003582) in 1 block.
http://aluigi.altervista.org/bms/slz.bms

Code: Select all

Structure KCAP:
0x0 4 Header KCAP.
0x4 4 Unknown (Скорей версия).
0x8 4 Number of files.
0xС 4 file size KCAP.

С 0x10, идут файлы, из структуры KCAP:
0x0 2 Unknown_0 (Скорей указатель на путь или имя файла).
0x0 2 Unknown_1 (Скорей указатель на путь или имя файла).
0x4 4 Unknown_2.
0x8 4 Unknown_3.
0xС 4 Offset data1.

Structure data1 SLZ:
0x0 3 Header SLZ
0x3 1 digit
0x4 4 Unknown_0
0x8 4 file size, начинается с 0x20.
0xС 4 Size after compression
0x10 4 Zero
0x14 4 Size of structure data1 SLZ.
0x18 4 Unknown_3
0x1C 4 Zero
0x20 (file size) Начинается файль.
Zolodei
Posts: 36
Joined: Sat Sep 16, 2017 6:34 pm

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by Zolodei »

Could you tell, where is the mistake?

Code: Select all

g:\proect6\TOLL\quickbms>quickbms.exe 2.bms 32.slz 01

QuickBMS generic files extractor and reimporter 0.8.1
by Luigi Auriemma
e-mail: me@aluigi.org
web:    aluigi.org
        (Sep  9 2017 - 00:45:49)

                   quickbms.aluigi.org  Homepage
                            zenhax.com  ZenHAX Forum
                               @zenhax  Twitter & Scripts

- open input file g:\proect6\TOLL\quickbms\32.slz
- open script 2.bms
- set output folder 01

  offset   filesize   filename
--------------------------------------
  00000020 82         32.unslz

Error: incomplete input file 0: g:\proect6\TOLL\quickbms\32.slz
       Can't read 6 bytes from offset 00000072.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0   100%   114        114        . offset 00000072

Last script line before the error or that produced the error:
  22  clog NAME offset zsize size

g:\proect6\TOLL\quickbms>
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by aluigi »

For slz files I have a script here, maybe try that one:
http://aluigi.org/bms/slz.bms
Zolodei
Posts: 36
Joined: Sat Sep 16, 2017 6:34 pm

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by Zolodei »

aluigi, http://aluigi.org/bms/slz.bms gives an error message
g:\proect6\TOLL\quickbms>quickbms.exe slz.bms 32.slz

QuickBMS generic files extractor and reimporter 0.8.1
by Luigi Auriemma
e-mail: me@aluigi.org
web: aluigi.org
(Sep 9 2017 - 00:45:49)

quickbms.aluigi.org Homepage
zenhax.com ZenHAX Forum
@zenhax Twitter & Scripts

- open input file g:\proect6\TOLL\quickbms\32.slz
- open script slz.bms
- set output folder .

offset filesize filename
--------------------------------------

-------------------
*EXCEPTION HANDLER*
-------------------
An error or crash occurred:

*EH* ExceptionCode 80000001 guard page violation
*EH* ExceptionFlags 00000000
*EH* ExceptionAddress 003f29b4
003D0000 + 000229b4 quickbms.exe
*EH* NumberParameters 00000002
*EH* 00000000
*EH* 0d2d3000

Last script line before the error or that produced the error:
210 clog MEMORY_FILE OFFSET ZSIZE SIZE

g:\proect6\TOLL\quickbms>
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by aluigi »

Unfortunately I have no other ideas at the moment.
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by chrrox »

Here is a quick script for kcap archives.

Code: Select all

idstring "KCAP"
get bname basename
string bname += \
get version long
get files long
get kcapsize long
savepos tmp
for i = 0 < files
set MEMORY_FILE binary ""
set name bname
string name + i
string name + .unslz
goto tmp
get unk00 short
get unk01 short
get unk02 long
get usize long
get offset long
savepos tmp
goto offset
getdstring NULL 0x3
get TYPE byte
    if TYPE == 0
        comtype copy
        math SIZE = ZSIZE
    elif TYPE == 1
        comtype slz_01
    elif TYPE == 2
        comtype slz_02
    elif TYPE == 3
        comtype slz_03
    elif TYPE == 4
        comtype xmemdecompress
    elif TYPE == 5
        comtype unzip_dynamic   # it's both zlib_noerror and deflate_noerror depending by the game!
    else
        print "Error: unsupported type %TYPE%, contact me"
        cleanexit
    endif
get version long
get tzsize long
get tsize long
getdstring NULL 16
savepos offset
append
DO
goto offset
get zsize short
savepos offset
if tsize > 0x10000
clog MEMORY_FILE offset zsize 0x10000
math tsize -= 0x10000
else
clog MEMORY_FILE offset zsize tsize
math tsize -= tsize
endif
math offset += zsize
while tsize > 0
append
get size asize MEMORY_FILE
log name 0 size MEMORY_FILE
next i
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by aluigi »

Even forcing the decompression from offset 0x20 does not work, trying also the other compressions fail:

Code: Select all

idstring "SLZ"
get TYPE byte
get DUMMY long
get ZSIZE long
get SIZE long
get ZERO long
get OFFSET long
comtype slz_01
clog "dump.dat" OFFSET ZSIZE SIZE
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by chrrox »

There are some times the code fils when star ocean 4 gets all the drm removed the function could be dumped for use in quickbms.
Here are some archives that work for you to test to make a bms script.
They started making some slz archives that don't extract around star ocean 5.
http://www15.zippyshare.com/v/m0rGwAVm/file.html
Vezina
Posts: 1
Joined: Thu Nov 30, 2017 11:36 am

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by Vezina »

chrrox wrote:There are some times the code fils when star ocean 4 gets all the drm removed the function could be dumped for use in quickbms.
Here are some archives that work for you to test to make a bms script.
They started making some slz archives that don't extract around star ocean 5.
http://www15.zippyshare.com/v/m0rGwAVm/file.html


Not sure I understand, wasn't the Star Ocean 4 drm already removed?
chrrox
Posts: 388
Joined: Thu Aug 07, 2014 10:28 pm

Re: STAR OCEAN™ - THE LAST HOPE™ - 4K & Full HD Remaster "KCAP", "SLZ"

Post by chrrox »

No star ocean 4 uses denuvo