Log in

View Full Version : need help extracting files, making sense of results


cgmark
May 26th, 2009, 17:13
I have been trying to help out some fellow artist who want to make the process of installing some content files on the pc easier. The problem is that they have over a hundred exe files, and to normally install the content they have to run each file one by one, answering all the prompts, selecting install directories, etc. Needless to say it takes a very long time.

I have managed to extract the content from most of the installers using uniextract. The two most common installers were Vise and Wise based.
The one installer I cannot seem to find an extractor for is BitRock. If anyone knows how to extract from that installer I would love to know how. Using CFF Explorer All I can determine is that it is UPX 3.0 , and I was able to uncompress the exe, but not extract the contents . The files end with the string bitrock-lzma-4.0 , but lzma is unable to extract.

The other issue I am having is deciphering the file script.bin that the installer uses to decide where the extracted files are to be installed. I have attached a sample of that file in the hope someone recognizes the format. It is produced from the Vise installer base files.

I can parse that file using text strings, but it isn't always producing correct results.

If anyone can help here or point me in the right direction , many thanks appreciated



Edit:

I forgot to add that none of these files are protected by any form of serial or license keys, or anything like that, it is just run and it installs after answering the questions like where to install, do you want to include an uninstaller, etc.

Woodmann
May 26th, 2009, 19:05
Howdy,

I am a little confused.

Is the script.bin file related to the BitRock installer?

As far as the script.bin file and where it installs the files,
I will assume you want to know the default location which should be fairly easy to determine. If the person installing the program chooses something other than the default location, then what?

I mean they could choose any location so I dont understand why you need to know this.

Or am I missing something obvious?

Woodmann

cgmark
May 26th, 2009, 19:28
The script.bin file is in the files that are extracted from using uniextract on the installers that used vise.
The directory looks like this after extraction from the exe.

default.bmp
English.vlg
file0003_58ca0_58dc2.bin
installerBackground.jpg
installerImage.gif
jpeg.dll
rebootnt.exe
script.bin
uninst32.exe
vise32ex.dll
Main\


Inside the main directory are the files to be installed, various jpg and model files that the art programs use without any directory information.

Most of the newer files that I extract also contain a text file in the Main directory that list where each file is suppose to go. But a lot of the older exe do not have that file so I need to determine another way for where the extracted files in Main\ should go.

I wrote a program that would allow someone to put all the content.exe in one directory. Then set the target directory and using uniextract it opens each file, extracts it, then reads the text file and copies the files to the appropriate folder structure. They can put in 20 files and then just press start and it will extract the content and puts all the content in the correct directories without having to run the installer for each file. But without being able to read the script.bin file I can't tell where content from older content.exe files should be stored.

The only change a person could make in directory and still have the content files work would be to change the drive letter.

The bitrock installer is used for all the newest content and since I cannot extract it, I have been unable to do anything with those files.

I have attached the text file that corresponds to the script.bin file that I posted earlier. It was from a newer content.exe that has that file. I just wish the older content files had that with them .

When looking at the text file, all those file names are in the Main directory, but without that txt file or deciphering the script.bin I can't tell what directories they go into.

Thanks for your help !

Woodmann
May 26th, 2009, 19:59
Well,

A PE viewer might provide you with some clues.
Look at the .exe file.
Woodmann

Woodmann
May 26th, 2009, 20:59
OK,

From what you have provided.........

Each type of file (by extension) should go into the same directory as all the other files (by extension).

So all the .jpg should go to c:\yourapp\yourlib\yourjpg\
or whatever the location is.

Clear as mud ?

Woodmann

cgmark
May 27th, 2009, 08:17
The problem is that the directory structure is somewhat different for each set of content files installed. So while one content file would place the .jpg files in something like \runtime\materials , another content file might place its .jpg into something like \runtime\materials\final.

The only way to know what file goes where in the art programs directory structure is either by reading the text file, if it has one, or figuring out how to decode the script.bin file.
I can read the text file that comes with the newer content files and copy files where they belong, but most older files don't have that text file so I need to figure out what format the script.bin file is in.

Here is a text file from another content file showing how it differs from the text file I attached earlier.

Thanks a bunch for helping me !

disavowed
May 27th, 2009, 23:03
seems like the easiest solution would be to use filemon/process-monitor or a tool like winalysis (http://www.woodmann.com/collaborative/tools/Winalysis), run all the installers, see what files get installed, and then just copy them into your new uber-installer. tada, no reversing needed.

cgmark
May 29th, 2009, 14:31
I spent more time looking at the bitrock installer and decided they are just going to have to run each installer, then when all the files are installed, zip up the directories for future use.

The bitrock installer doesn't look like the traditional installers like Vise. Once you uncompress it the installer doesn't extract the files to somewhere then install them. Instead it never extracts the files to any location but the directory to where they are installed. It is Tcl based using vfs to mount the virtual image and then uses a index for the files to tell where they start and stop in the exe before copying them to the destination.

I would have to modify every single exe and if I were to do that, then I just might as well run each exe.