ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Jan 21, 2021 2:11 am

All times are UTC




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Nov 25, 2020 1:47 pm 

Joined: Sun Nov 08, 2020 1:07 pm
Posts: 26
Hi, I'm just started working with QuickBMS, so I don't know much about it
I create this script to extract sound from uexp files from a game, it can export and import files with less or equal size, but I cant import bigger files
i know its very messy :) sorry about that

Code:
GETDSTRING UNKNOW 143
GET TEXT_NUM byte
GETDSTRING UNKNOW 87

for i = 1 <= TEXT_NUM
   GET GUID_long  long
   if GUID_long == "33"
      GETDSTRING GUID GUID_long
      GET STRING_long long
      GETDSTRING STRING_text STRING_long
      GETDSTRING UNKNOW 72
   else
      GETDSTRING UNKNOW 67
   endif
next i

GETDSTRING UNKNOW 26
GET OGG_SIZE long
GET OGG_SIZE long
GET UNKNOW longlong
Savepos OFFSET

LOG "file.ogg" OFFSET OGG_SIZE


anyone can help me?


Attachments:
File comment: i create script based of this file
UEXP.zip [55.27 KiB]
Downloaded 48 times
Top
   
PostPosted: Wed Nov 25, 2020 3:19 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11886
In that specific case you may try reimport3, it's a special mode that you can activate using -r -r -r at command-line.
If you don't know how to do it, use this bat file:
Code:
quickbms.exe -G -w -r -r -r

In short it's made for enlarging the whole archive for putting the new file back in the original position.


Top
   
PostPosted: Wed Nov 25, 2020 5:24 pm 
User avatar

Joined: Sat Mar 14, 2020 7:17 pm
Posts: 40
aluigi wrote:
In that specific case you may try reimport3, it's a special mode that you can activate using -r -r -r at command-line.
If you don't know how to do it, use this bat file:
Code:
quickbms.exe -G -w -r -r -r

In short it's made for enlarging the whole archive for putting the new file back in the original position.

i test it, and its worked well
one other thing, as you know file size repeat two time in uexp files
Image
how can I update both of them in re-import


Last edited by saeid0034 on Wed Nov 25, 2020 6:12 pm, edited 1 time in total.

Top
   
PostPosted: Wed Nov 25, 2020 6:11 pm 

Joined: Sun Nov 08, 2020 1:07 pm
Posts: 26
aluigi wrote:
In that specific case you may try reimport3, it's a special mode that you can activate using -r -r -r at command-line.
If you don't know how to do it, use this bat file:
Code:
quickbms.exe -G -w -r -r -r

In short it's made for enlarging the whole archive for putting the new file back in the original position.

thanks its worked


Top
   
PostPosted: Wed Nov 25, 2020 6:41 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11886
saeid0034 wrote:
one other thing, as you know file size repeat two time in uexp files
how can I update both of them in re-import

That's the only problem of the reimport feature when we have a table supporting compression and we meed a comparison of the compressed and uncompressed size for handling the file.
Usually there is often another field saying if a file is compressed, probably also here, but in case there is none the following solution may work:
Code:
get ZSIZE long
get SIZE long
comtype copy
clog "output.dat" OFFSET ZSIZE SIZE
There are two different variables because if you use the same, only the second field will be changed.

Another solution is using the optional field of Log instead of CLog:
Code:
get ZSIZE long
get SIZE long
log "output.dat" 8 SIZE 0 SIZE

It's a particular situation that can't be automatically handled by quickbms because the reimport mode just work on the arguments of Log and Clog.


Top
   
PostPosted: Wed Nov 25, 2020 7:46 pm 
User avatar

Joined: Sat Mar 14, 2020 7:17 pm
Posts: 40
aluigi wrote:
Another solution is using the optional field of Log instead of CLog:
Code:
get ZSIZE long
get SIZE long
log "output.dat" 8 SIZE 0 SIZE

Thank you, its did the job


Top
   
PostPosted: Wed Nov 25, 2020 11:02 pm 

Joined: Sun Nov 08, 2020 1:07 pm
Posts: 26
I face another problem, I hope someone help me again
I successfully get string and ogg from most of my uexp files
Image
but in some files, QuickBMS give me following error
Image
text string are different in these files
Image

what can I do to get text from these files too?
Thanks


Top
   
PostPosted: Thu Nov 26, 2020 8:08 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11886
It's a feature of the Unreal Engine for storing utf16 strings, replace the following:
Code:
      GET STRING_long long
      GETDSTRING STRING_text STRING_long
with:
Code:
      GET STRING_long signed_long
      if STRING_long < 0
        math STRING_long n STRING_long
        math STRING_long * 2
        GETDSTRING STRING_text STRING_long
        set STRING_text unicode STRING_text
      else
        GETDSTRING STRING_text STRING_long
      endif


Top
   
PostPosted: Thu Nov 26, 2020 12:15 pm 

Joined: Sun Nov 08, 2020 1:07 pm
Posts: 26
aluigi wrote:
It's a feature of the Unreal Engine for storing utf16 strings, replace the following:
Code:
      GET STRING_long long
      GETDSTRING STRING_text STRING_long
with:
Code:
      GET STRING_long signed_long
      if STRING_long < 0
        math STRING_long n STRING_long
        math STRING_long * 2
        GETDSTRING STRING_text STRING_long
        set STRING_text unicode STRING_text
      else
        GETDSTRING STRING_text STRING_long
      endif

thanks, its worked perfect
I found something else I could not understand in QuickBMS
why this script print same?
Code:
set SIGN_1      binary "\x0A"  
set SIGN_2      binary "\x09" 

if SIGN_1 == SIGN_2
   print "same"
else
   print "different"
endif


Top
   
PostPosted: Thu Nov 26, 2020 3:50 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11886
Definitely a bug, I'm going to check and fix it in the upcoming version of quickbms.

*edit* In short is myisdechex_string() that invokes readbase() which ignores the non-textual chars and therefore says that it's a number.


Top
   
PostPosted: Thu Nov 26, 2020 4:56 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 11886
Just fixed in the beta.
The new beta quickbms.exe is here:
https://aluigi.altervista.org/beta/quickbms_exe.zip


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 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