GCFScape - NemPosted: Dec 13th, 2003 - 9:56:09 pm

I've been working on a GCF file extraction utility for two or three days now, so far I've figured out about 60% of the .gcf file format (as you can see below) but it's not quite ready to start exporting files yet. A little preview:

GCFScape
Modified: Jul 13th, 2004 - 12:07:46 pm[ 24944 Views ]

[ 1 2 ]

1. ricardobr2003Posted: Dec 14th, 2003 - 10:54:20 am

this program is finished?
if yes, how can I download it?

thanks

2. SlackillerPosted: Dec 14th, 2003 - 2:36:56 pm

but itís not quite ready to start exporting files yet. A little preview:

soon we all hopelovelovelove

3. NemModified: Dec 16th, 2003 - 11:30:52 am

Well here is how it looks so far. I've identified four different sections (along with several headers) but I suspect there may be two or three more sections to go. I don't know if they are necessary for exportation though.

GCF files store data in blocks which are 8192 B or 8 KB big.

The first section of the file (which I call the block entries) contains a block entry for each data block and contains such information as whether or not they are in use, and if they are what the index of the first data block is, what index in the directory the file is and how large the file is. There seems to be one block entry per file even though a file can take up more then one data block.

The second section I haven't yet identified but know how to scan over.

The third section (which I call the directory) contains the directory information which is basically a 2D representation of a directory tree (files, folders etc.). It is indexed into by the first section. It is interesting to note that files can exist in the directory and not in the block entries. In fact one of the .gcf files on my computer is about 400 MB in size; it has a full directory but doesn't actually contain any data.

The fourth section contains a list of null terminated strings for each folder and file in the directory. It is indexed into by the third section.

The fifth section (which may be two sections) I haven't yet identified and DON'T know how to scan past.

And finally the sixth section (which I call the data blocks) contains the contents of all the files. It is indexed into by the first section.

The only thing I can think of that the two mystery sections could contain is a map for putting fragmented files back together with (if files can indeed be fragmented) or checksums for the files. If the data is stored unfragmented then all I need to do to be able to extract the files is figure out how to scan past the fifth section, otherwise it could be a while.

chillin

Nem

4. SlackillerPosted: Dec 14th, 2003 - 9:22:48 pm

foldershrug
sounds difficult where

5. DarkdruidPosted: Dec 15th, 2003 - 8:33:42 pm

I am going to post this good news on the valve-erc.happy

6. NemModified: Dec 16th, 2003 - 1:21:14 am

Here's another little status update:

I added the ability to export files today (still don't know how to scan past the fifth section; it uses a hard coded offset to the data blocks). It works rather nice, right click on a file or folder and extract it to your hard drive; it even produces the necessary directory hierarchy. Anyways, it immediately revealed that the files are indeed fragmented in .gcf files.

Now to make matters even more confusing, it would appear that there are multiple levels of fragmentation. For example, the block entries can contain one or more entry per file effectively breaking the file up into several large chunks which I've figured out how to put back together. However exportation is still producing corrupt files which leads me to believe that these larger chunks are further fragmented with the information to defragment them possibly residing in one of the two as of yet unknown sections.

In short, it's getting there but it still has a ways to go.



7. MolagPosted: Dec 16th, 2003 - 10:06:33 am

Is it possible to import files?
Or maybe in the long run create your own .GCF?
Would be nice for modders...maybe.
But what is its purpose? carryingstuff

8. NemModified: Dec 16th, 2003 - 1:17:09 pm

My immediate concern is for the ability to export .gcf files. Creating .gcf files and writing data to them may be a fair bit more difficult. This is because though I know a great deal of the .gcf file format, there are still fields that I haven't been able to decipher and probably never will be able to unless Valve releases the actual format. (These could contain flags, checksums or other values that could throw Steam off.)

Once exportation is complete I will release a beta but not until then.

miam

In the mean time Iíll be on vacation (ski trip) for four days so donít expect any more updates till then.

bored

9. guannaisPosted: Dec 16th, 2003 - 3:51:38 pm

Hi!
First of all, I'm spanish, sorry for my english.

I was yesterday trying to extract files of "counter-strike.gcf" and I though that anyone could have to try it before. Nem, you are my hero :P

Because you are more advanced in .gcf files, could you send me more details about gcf format, please? (or GCFScape sources :P )

10. hotbotModified: Dec 17th, 2003 - 6:40:43 am

i have gathered some (maybe usefull) threads and hope it will help you... ;)(ps: Steam Dump-It was released by OGC, therefore i don't want to post a link)

11. LancerPosted: Dec 17th, 2003 - 6:01:54 pm

Hey, I'm random guy that made some maps in dod (liike the old dog1 and the range_a03 maps) and i'm looking to create some more maps for the game and I really need that program, i'm a basic programmer myself, and my friend is an expert so if you need anyhelp or debuging gimme a holler k nim?

12. Free LaNcerPosted: Dec 17th, 2003 - 10:02:29 pm

Jet_use screwed up the HTML coding for this page, but anyway, I NEED THIS PROGRAM!! happy yeahbaby yelling

13. Free LaNcerPosted: Dec 18th, 2003 - 1:05:48 pm

To follow up on what hotbot said about Dump-It, it's crappy. You have to login and have Steam running to get the cached data. It also seems very peculiar since you HAVE TO LOGIN IN. It may steal your password, ya never know.

14. hotbotPosted: Dec 19th, 2003 - 6:10:24 am

i never rated this tool ;) and to understand how steamdumpit works you should read the posts from Trp. Jed in the DoD forums.

15. Don_TornowPosted: Dec 19th, 2003 - 1:04:32 pm

I will have this Programm can i downlaod it?
plz i need this Prog.where

[ 1 2 ]

You must be logged in to post a comment.
New users can register here.
Nem's Tools v2.0 © 2006 Ryan Gregg.
Execution time: 0.045131s; Queries: 17.
dishes served.
Powered by The Wavelength.

Valid XHTML 1.0 Transitional Valid CSS
π