ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Dec 10, 2018 4:06 am

All times are UTC




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sun Aug 19, 2018 2:04 am 

Joined: Sun Aug 19, 2018 2:01 am
Posts: 5
Hello, I used quickbms with this script http://aluigi.altervista.org/papers/bms ... player.bms to extract a unity webplayer file, everything worked flawlessly, however I can't reimport modified files to the package (tried a lot of stuff, like -r -r)

Can anyone help me out? Thanks a lot


Top
   
PostPosted: Mon Aug 20, 2018 2:16 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9414
The script can't be used for reimporting because it uses a memory file, basically it makes 2 jobs in one script: decompressing the archive and extracting the files from the decompressed archive.
Splitting the script in 2 parts may work but the uncompressed archive will not be loaded by the game because it has no headers so then you should "reimport" it too back in the original unity3d file... it's prone to problems.


Top
   
PostPosted: Mon Aug 20, 2018 3:35 pm 

Joined: Sun Aug 19, 2018 2:01 am
Posts: 5
Can replacing the old file with a new smaller file and recompressing the archive work?

Just so I can understand, is compressing the archive again a problem?


Top
   
PostPosted: Tue Aug 21, 2018 3:24 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9414
The answer to both the question is that it "may" be a problem and may not work.

I have splitted the script for you:

Script 1:
Code:
endian big
comtype lzma86head
idstring "UnityWeb"
get DUMMY long
get VER1 byte
get VER2 string
get VER3 string
get SIZE long
get DUMMY short # not supported at the moment
get OFFSET short

get DUMMY long
get ENTRIES long
for i = 0 < ENTRIES # last entry remain saved
    get ZSIZE long
    get SIZE long
next i
get LAST_OFFSET long
get DUMMY byte

get NAME filename
string NAME += "_unpacked"
clog NAME OFFSET ZSIZE SIZE

Script 2:
Code:
get PATH filename
get FILES long
for i = 0 < FILES
    get NAME string
    get OFFSET long
    get SIZE long
    set FNAME string PATH
    string FNAME += /
    string FNAME += NAME
    log FNAME OFFSET SIZE
next i


Extraction: script 1 + script 2
Reimporting: script 2 + script 1

It may be chaotic due to the presence of 2 scripts and 2 files but try it and if you are lucky it will work but the risk the game will refuse the edited archive is very high.
Let me know your results, that's the max I can do.


Top
   
PostPosted: Tue Aug 21, 2018 7:32 am 

Joined: Sun Aug 19, 2018 2:01 am
Posts: 5
Thanks for the answer, however i'm getting "incomplete input file" error because of "clog NAME OFFSET SIZE SIZE" what does that line do?
I'm supposed to concatenate the two scripts right? Or can I input two scripts in quickbms?


Top
   
PostPosted: Tue Aug 21, 2018 11:45 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9414
My fault, I forgot a 'Z' in the ZSIZE of the first script


Top
   
PostPosted: Tue Aug 21, 2018 9:15 pm 

Joined: Sun Aug 19, 2018 2:01 am
Posts: 5
Thanks a lot I appreciate the help, however the script now throws this error:

Code:
Error: incomplete input file 0: file.unity3d
       Can't read 515880 bytes from offset 004021d0.
       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   187%   7881394    4202960    . offset 004021d0

Last script line before the error or that produced the error:
  34  log FNAME OFFSET SIZE


I tried tweaking the script myself without success


Top
   
PostPosted: Wed Aug 22, 2018 12:40 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9414
You must use script 2 on the file generated by script 1, obviously :D


Top
   
PostPosted: Wed Aug 22, 2018 12:57 pm 

Joined: Sun Aug 19, 2018 2:01 am
Posts: 5
I think there is a problem with the second script, the first one generate an unpacked file but the second give one 0 byte file and this error :

Code:
10   log FNAME OFFSET SIZE


Sorry for the annoyance :D


Top
   
PostPosted: Thu Aug 23, 2018 1:17 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 9414
Honestly I don't see any error.
It's just the original script splitted in 2 parts, if the original script worked then these 2 one work too.
Sorry.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited