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.
Important information: this site is currently scheduled to go offline indefinitely by end of the year.
Files extractors scripting
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Files extractors scripting
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)
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)
-
- mega-veteran
- Posts: 315
- Joined: Wed Aug 02, 2006 10:07 pm
- Has thanked: 10 times
- Been thanked: 94 times
Re: Files extractors scripting
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:
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?
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
File_1
File_2
...
File_9
File_0xa
File_0xb
File_0xc
...
Is it possible to export a decimal number?
No more Fatduck, no more FatImporter, Byebye everyone!
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Files extractors scripting
the value that I would assign to the destination variable is not found is "" so that it's enough to use the following example:
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.
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
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.
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Files extractors scripting
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:well it's a good compromise, so this is the solution available in the next version of quickbms
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
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Files extractors scripting
Here is an extractor for FEZ (fantasy earth Zero)
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.
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
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.
You do not have the required permissions to view the files attached to this post.
-
- mega-veteran
- Posts: 315
- Joined: Wed Aug 02, 2006 10:07 pm
- Has thanked: 10 times
- Been thanked: 94 times
Re: Files extractors scripting
The new version work great! Thank you Bugtest!
How about decimal output as I said a few post above?
How about decimal output as I said a few post above?
No more Fatduck, no more FatImporter, Byebye everyone!
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Files extractors scripting
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
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
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Files extractors scripting
Here is an exe scan of the game. I am not familiar with this algorithm / compression.Savage wrote:Any clue/bms for Indiana Jones lego?
viewtopic.php?f=21&t=3068
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
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Files extractors scripting
the archive of that game is horrible, it's composed by various chunks but the PNTR one is not like the others... blah
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Files extractors scripting
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.
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
- aluigi
- VVIP member
- Posts: 1916
- Joined: Thu Dec 08, 2005 12:26 pm
- Location: www.ZENHAX.com
- Has thanked: 4 times
- Been thanked: 664 times
- Contact:
Re: Files extractors scripting
@fatduck
I have just added the -D option which uses the decimal notation internally in quickbms so your doubt problem be solved.
I have just added the -D option which uses the decimal notation internally in quickbms so your doubt problem be solved.
-
- Moderator
- Posts: 2602
- Joined: Sun May 18, 2008 3:01 pm
- Has thanked: 57 times
- Been thanked: 1422 times
Re: Files extractors scripting
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