Page 7 of 10
Re: Files extractors scripting
Posted: Wed May 27, 2009 1:33 am
by chrrox
can you go to end of file and add x bytes to the end like "fatduck"
and then process the file like normal?
not another - option just something in bms script like what fatduck did with the end of file only adding some bytes to the end so it will recognize it as a file.
Re: Files extractors scripting
Posted: Wed May 27, 2009 1:53 am
by aluigi
for the previous post of chrrox: uhmmm simple solution but it's not logical (because at that returned offset is not located the searched string) and still incompatible with the current findloc standard behaviour.
while for the current one: modifying the input file manually is definitely not a good solution (it's just not a solution at all, it can be defined a work-around)
Re: Files extractors scripting
Posted: Wed May 27, 2009 8:04 am
by fatduck
Is it possible to return a negative value rather then exit? eg: return -1 to the variable but not terminated the script! So we can at least do something to check and continue!
Another minor problem:
Code: Select all
set FName string "File_"
for i = 1 to 20
set RES_NAME FName
...
string RES_NAME += i
log RES_NAME RES_START RES_OFFSET
next i
The i value is in Hexadecimal format! So the RES_NAME become:
File_1
File_2
...
File_9
File_0xa
File_0xb
File_0xc
...
Is it possible to export a decimal number?
Re: Files extractors scripting
Posted: Wed May 27, 2009 1:28 pm
by aluigi
the value that I would assign to the destination variable is not found is "" so that it's enough to use the following example:
Code: Select all
findloc OFFSET string "FatduckFile"
if OFFSET == ""
cleanexit # or anything else you want to do when the end of the file is reached
endif
but the problem is that the standard BMS language says that FindLoc must exit if the string is not found so the problem is differentiating the behavioiur of FindLoc keeping the compatibility with the standard command.
and idea could be a new command like FindLocX which returns "" instead of exiting but I don't know if it's a good idea to introduce a new custom command only for this thing.
Re: Files extractors scripting
Posted: Wed May 27, 2009 4:02 pm
by aluigi
about FindLoc I have opted for the additional argument after the file number.
practically if you specify -1 after the filenumber that value will be assigned to the variable if the string is not found, example:
Code: Select all
FindLoc OFFSET string "FatduckFile" 0 "bad_luck_man"
if OFFSET == "bad_luck_man"
cleanexit
endif
well it's a good compromise, so this is the solution available in the next version of quickbms
Re: Files extractors scripting
Posted: Wed May 27, 2009 11:05 pm
by deve
is it possible to make quickbms also for packing back ?
Re: Files extractors scripting
Posted: Thu May 28, 2009 3:48 am
by chrrox
Here is an extractor for FEZ (fantasy earth Zero)
Code: Select all
get FILES long
get UNK long
for i = 0 < FILES
get NSIZE short
getdstring NAME NSIZE
get OFFSET long
get SIZE long
log NAME OFFSET SIZE
next i
this is a great archive format for som one to learn bms scripting from.
I attached a sample.
website
http://tw.fez.gamania.com/
installer
http://tw.dl.gamania.com/fez/FEZ_1103.exe
this game uses textures with wrong headers mainly dds and some tga and some kind of .mdl format.
Re: Files extractors scripting
Posted: Thu May 28, 2009 6:13 pm
by fatduck
The new version work great! Thank you Bugtest!
How about decimal output as I said a few post above?
Re: Files extractors scripting
Posted: Thu May 28, 2009 6:27 pm
by aluigi
ops I forgot that :)
uhmmm I could add an option for that (an option and not a command for not creating too much custom commands outside the BMS language).
practically internally quickbms converts all the numbers in 0xhexadecimal because it's more useful during scripts debugging so, yes, if necessary I can add an option which forces the myitoa() function to use the decimal notation.
oh I take the time also to say that I implemented some ways to add custom bytes (read "header") to the output files.
obviously it's not the most easy thing of the world just because it's not the job of the tool (something like a car which prepares the coffee) but works :)
the following is an example which builds a riff wave header in real time, like a raw_pcm to wav converter:
http://aluigi.org/papers/bms/raw2wav.bms
Re: Files extractors scripting
Posted: Sun May 31, 2009 10:59 am
by Savage
Any clue/bms for Indiana Jones lego?
viewtopic.php?f=21&t=3068
Re: Files extractors scripting
Posted: Sun May 31, 2009 2:08 pm
by chrrox
Here is an exe scan of the game. I am not familiar with this algorithm / compression.
Code: Select all
C:\signsrch>signsrch.exe "F:\Program Files\LEGO Indiana Jones\Indiana_Jones_GameExplorerHelper.dll"
Signsrch 0.1.4
by Luigi Auriemma
e-mail: [email protected]
web: aluigi.org
optimized search function from Andrew http://www.team5150.com/~andrew/
- open file "F:\Program Files\LEGO Indiana Jones\Indiana_Jones_GameExplorerHelper.dll"
- 111912 bytes allocated
- load signatures
- open file C:\signsrch\signsrch.sig
- 1294834 bytes allocated for the signatures
- 1869 signatures in the database
- start signatures scanning:
offset num description [bits.endian.size]
--------------------------------------------
0001a076 188 SSH RSA id-sha1 OBJ.ID. oiw(14) secsig(3) algorithms(2) 26 [..15]
00013daa 1784 anti-debug: IsDebuggerPresent [..17]
- 2 signatures found in the file
C:\signsrch>signsrch.exe "F:\Program Files\LEGO Indiana Jones\LEGOIndyDEMO.exe"
Signsrch 0.1.4
by Luigi Auriemma
e-mail: [email protected]
web: aluigi.org
optimized search function from Andrew http://www.team5150.com/~andrew/
- open file "F:\Program Files\LEGO Indiana Jones\LEGOIndyDEMO.exe"
- 7488808 bytes allocated
- load signatures
- open file C:\signsrch\signsrch.sig
- 1294834 bytes allocated for the signatures
- 1869 signatures in the database
- start signatures scanning:
offset num description [bits.endian.size]
--------------------------------------------
00723076 188 SSH RSA id-sha1 OBJ.ID. oiw(14) secsig(3) algorithms(2) 26 [..15]
00504e52 309 padding used in hashing algorithms (0x80 0 ... 0) [..64]
00317ead 567 classical random incrementer 0x343FD 0x269EC3 [32.le.8&]
00432c48 862 Generic bitmask table [32.le.128]
005300e0 1188 Vorbis FLOOR1_fromdB_LOOKUP [float.le.1024]
00136b19 1783 anti-debug: Dongle protection [..3]
0058e68a 1784 anti-debug: IsDebuggerPresent [..17]
00432c4c 1827 bitmask [32.le.128]
- 8 signatures found in the file
Re: Files extractors scripting
Posted: Sun May 31, 2009 5:36 pm
by aluigi
the archive of that game is horrible, it's composed by various chunks but the PNTR one is not like the others... blah
Re: Files extractors scripting
Posted: Sat Jun 06, 2009 5:26 am
by chrrox
Fighters Club Online
This game uses nif files so you can view all the models and their animations.
website
fc.kog.co.kr/main.aspx
client
http://download.kog.co.kr/FC_Install/Fi ... lubCB1.exe
quickbms script.
Code: Select all
goto 0x34
get FILES long
get UNK long
math LENGTH += 0x10c
math LENGTH *= FILES
MATH LENGTH += 0x3C
for i = 0 < FILES
getdstring NAME 0x100
get SIZE long
get ZSIZE long
get OFFSET long
math OFFSET += LENGTH
clog NAME OFFSET ZSIZE SIZE
next i
Re: Files extractors scripting
Posted: Sun Jun 07, 2009 10:17 pm
by aluigi
@fatduck
I have just added the -D option which uses the decimal notation internally in quickbms so your doubt problem be solved.
Re: Files extractors scripting
Posted: Sun Jul 05, 2009 4:31 pm
by chrrox
9th Company: Roots of Terror
Code: Select all
#9th Company PC Extractor
#QuickBMS Script
idstring "SMA\ 2\ 0"
get files long
get FTABLEEND long
for i = 0 < files
get NSIZE byte
getdstring NAME NSIZE
get SIZE long
get ZSIZE long
get offset long
clog NAME OFFSET ZSIZE SIZE
next i