Author Topic: Extraction Demo  (Read 376 times)

0 Members and 1 Guest are viewing this topic.

[TKC] ~<{LTC}>~

  • Master Heckler
  • *****
  • Posts: 2781
    • View Profile
Extraction Demo
« on: January 04, 2004, 04:03:24 pm »
All credits for this goes to tintin, who has been kind enough to write everything down:

This is for informational purposes only. It is up to the user to decide if it is moral/legal to use this information,I take no resposibility in any way how you use this information, or if you screw up your system trying to follow it.

Well everyone has tried to find a program that would extract the cbf files. There were a few programs that did most of the job, but did not extract the important config files. After much searching and even writing a program that could extract most the files, it dawned on me. Pterodon was nice enough to package a cbf extractor for us. It just needed a bit of tweaking to do what is wanted.

If you notice when Pterodon puts out its games, like its demo it packages them as an installer + a cbf file. If you pay attention the cbf file called disk01.cbf contains the game executable, the dlls, and at least one other cbf file. All the setup.exe does is extract files from disk01.cbf and adds some reg entries.

For example when we run setup on the demo it creates the demo dir extracts the game dlls from disk01.cbf, extracts the vietcong.exe and also another build###.cbf that contains all the game info. When you later patch the game it replaces some dlls and the exe and adds some more cbf files in the game dir.

What people have wanted to do is to extract cbf files OTHER than the disk0#.cbf. Through studying how setup.exe works you can adapt it to extract ANY cbf file.

With a hex editor open the setup.exe in the demo. Keep searching for the work disk. EVentually you will see were it says disk....cbf

Right before this you will see 2 sets of %s%02d . What needs to be done is the first %s%02d needs to be replaced with nulls. That is replace each of those characters with hex 00. This will allow the setup program to extract every file from a cbf. The cbf has to still be renamed to disk01.cbf.

To extract any cbf, copy it to a blank drive in the root folder. copy your modified setup.exe and the original setup.cbf to the blank drive too. Now go to you windows temp dir and empty it of everything! This is important as the setup program will try and copy anything from the temp dir. One trick is to make a text file with some odd name and put it in the temp dir. This is because when you see the setup program copy this file, then you know it is time to kill the setup program.


Before you attempt this remember this will extract the files into the vietcong game directory. You may want to move your demo installation somewhere else. Also rename the reg keys. The install (setup.exe) program may ask you to uninstall the old install, let it do that all it does is remove anything in the vietcong default install folder (if you rename it, it does nothgin) and remove the regkey. Now with the newly moded setup.exe, setup.cbf and the build#.cbf file that was renamed to disk01.cbf that you moved to a empty drive start the install. Dont choose to install icons or gamespy! Just let the program run, it will list all the files being extracted, When you see it trying to copy that one file that you made and placed in the windows temp dir use the task manager to kill the setup exe. Do not press cancel as cancel will delete any extracted files.

I am writing this from memory, I have not messed with this in months. This is the instructions for the demo. It is similar to the retail version extraction but it is simpler as alot less files are involved.

For this you will need a Hex Editor
A lot of diskspace and
a lot of computer experience.
southpark:
global warming is going to strike two days before the day after tomorrow