1/11/2021 Download Steam Gcf Files For Steam
Last update: 23 January 2007
GCF files are special file extension from Steam. Steam is a gaming client that provides legal games like Half-life, Counter strike 1.6, Counter strike zero condition and other first person shooting games that can be played online by paying a small fee. The GCF files that are created by gaming programs are commonly used to store games that have been downloaded from the Valve Steam distribution service. GCF files may also contain game updates for computer games that have been distributed by Valve Stream.
Added info on the fragmentation map which Ryan used to add defragmentation to the latest GCFScape. Proper defragmention of the .gcf files has had a significant and noticeable performance gain (for example, tests show load times for 8% (on average) fragmented .gcf files speed up by at least 1.25 times after defragmentation).
Last update: 05 September 2004
Added link to Ryans HLLib library. See the “sample code” section.
Last update: 01 July 2004
Ryan recieved some info from Timo Scripf the the last change in the GCF format has made the version number quite apparent in the GCF. Version 5 of the GCF format uses the GCF Block Map Heade but version 6 doesnt. Ryan has provided updated source files to reflect these changes.
Last update: 26 June 2004
Ryan has updated the format and code to reflect the changes in Steam from the 21st Juned 2004. I’ve also reverted to Ryan’s code notation format for the sake of backwards compatibility with original programs based on his code.
Last update: 06 June 2004
Ryan and myself have recieved some additional information on the file format from “Addict“. He’s managed to figure out what some of the unknown sections are. The format specifications have been updated and the sample C++ files have had the relevant code added.
Introduction
Not so long ago Valve rolled out their new Steam content delivery and game network service (for want of a better description) which is destined to replace their old WON network. Apart from a GUI and all the other gubbins that comes with it, Valve have opted to place all of the files for each game into a game cache file which was unpopular with some who mod Half-Life based games. See, the problem was they locked all the files in the cache, but never provided a tool to get them out…
There is one GCF extractor currently floating around called Steam Dump It which interfaces to the filesystem API in steam.dll but its a bit slow and extracts everything, so you cant select individual files. Also, theres a bit of controvesy surrounding it as its rumoured it was made by OGC who are a source of many of the cheats found in Half-Life games. There is also the issue of how they figured out the API calls without using the leaked Half-Life 2 source code however I’m not touching that argument with a ten foot barge pole.
Anyhew, I’ve been taking a somewhat old fashioned approach and have had a go at cracking the GCF format itself in its raw format so that it should be possible to write some sort of extractor or utility without any dependancy on Steam. How I’ve been cracking the format is somewhat longwinded – I’ve been using a hex editor and a calculator and looking for patterns and values that match certain known aspects about the file and its contents. Its sounds pretty nuts but it works for me.
Ryan Gregg of Nem’s Tools has also been working on the GCF format in the same way and we’ve decided to combine our findings and publish them here for the good of the Half-Life modding community. Ryan cracked a significant ammount of the file format and is currently developing a stand-alone GCF extractor called GCFScape which although in beta, does allow you to extract individual files from the GCF.
Ryan is currently developing GCFScape and other code/utilities for the GCF format in .NET and I am handling documentation.
So, below is what I know about the GCF file format so far. Your welcome to use it and if you manage to expand on it and make any further progress I’d appreciate it if you could let me know of your findings. Remember, this is a work in progress.
Basic overview of the GCF Format
Right, first things first, what is the GCF format? Well its a virtual file system, just like a disk file system except that the entire thing is stored in one big file. Based on this, it conforms to the the basic needs of a file system and works in a similar way. At least, this is the assumtion we’re making.
Anyway, in short, the GCF file has a header followed by the actually data. Data is divided up between 8kb blocks (8192 bytes) and a file can occupy more than one block. These blocks do not have to be sequential.
Sample Code
Ryan has recently release a C++ package library called HLLib which abstracts several Half-Life package formats and provides a simple interface for them.
![]()
HLLib is an open source library licensed under the LGPL license. It comes with the source code and binaries necessary to use it. An example application called HLExtract is also included. HLExtract is a command line utility that can load all HLLib supported packages and extract multiple items from them while maintaining their directory structure. The entire application is under 150 lines (with about 20 lines that do all the work) and shows just how easy HLLib is to use.
Thomas Kaiser has contributed the following code which can be used to check the GCF file checksums:
“I figured out the GCF checksum algorithm and wrote an implementation in C. Note that the adler32 and crc32 functions used are from the zlib source code. “
If you have written your own code based on this for other development languages and would like to contribute it, please feel free to send it to either Ryan or myself.
GCF structure and layout
Based on the Ryan’s and Addict’s work so far the GCF file seems to be layed out in the following manner:
![]()
The directory structure appears as follows:
Most values inside the GCF are stored as DWORD 32-bit (4 byte) values.
GCF File Header
This is at the start of every GCF file and seems to be constant in its format throughout them:
Notes:
1. CacheID numbers seem to be confirmed by values in the registry. The ClientGameInfo.vcf file lists each game installed in Steam as having a number, for example Day of Defeat is number “30”. Within this definition is a Primary Cache ID. In the case of DoD this is number 31 which matches this value in the header of Day of Defeat.gcf.
Also, in the Windows registry under ValveSteamApps30 are a number of folders with numbers relating to cache ID’s. I assume these are dependencies for the game, i.e. in DoD’s case it requires 0, 1, 2, 3 and 31. Matching these numbers against the cache id’s in the GCF files gives us:
0 = half-life engine.gcf
1 = half-life.gcf 2 = half-life localized.gcf 3 = platform.gcf 31 = day of defeat.gcf https://renewadult532.weebly.com/blog/lush-lovelife-rapidshare-free.
This seem logical that DoD would depend on these base files.
2. Each GCF file also has a version number. Again, looking in the Windows registry, where cache ID’s are listed there is also a key called “LastVersionPlayed”. For each GCF the value in the registry matches this value. These version numbers also seem to match with version numbers displayed when updating the stand alone HLDS.
3. The BlockSize value currently always seems to be set to 8192 (8k). File data is divided up and stored in 8k blocks. A file smaller than 8k will be padded at the end with zero’s before the next file starts. Those that are larger than 8k are split over several 8k blocks with any last, incomplete block being padded out at the end.
Blocks
The Block Entry section stores information for piecing together chunks of files in a GCF file. It contains a map or table for piecing multiple chunks together back into a file along with information to find and defrag each block in the chunk. It is the core of all file reconstruction.
There isn’t really any link between it and the Fragmentation Map other then the FirstDataBlockIndex is used in the Fragmentation Map when you go to extract a file (or should I say chunk of a file). There is no reason to require more then one Block Entry to specify a file other then maybe a performance issue when updating existing files which Steam was designed for.
The entries list is preceeded by a short header:
Notes:
1. The checksum is simply the sum total of all the preceeding DWORDs in the header.
There then follows the block entries. There are as many block entries as there are blocks in the file, regardless if they contain actually usable data or not.
Notes:
1. EntryType can be one of three values depending on if the block is used or not. Values are:
As a general rule, the value 0x200F0000 means it contains no data, anything else does (I don’t know what the difference between 0x200F8000 and 0x200FC000 is; you should note that these are the only other observed values so far though).
Download Steam Gcf Files For Steam Games
2. FileDataOffset defines at which offset in the extracted file this block of data is located.
3. FileDataSize defines how many bytes of data this block contains.
4. NextBlockEntryIndex and PreviousBlockEntryIndex are used to piece together block entries as a file can be made of multiple blocks. The values for either will equal BlockCount if there is no previous or next value.
Ryan gives an example of using this below:
“So let’s say we want to extract directory item 1:
We would scan the Block Entries looking for a block entry with a corresponding Directory Index. The Block Entry we found could be in the middle of the file for all we know (as shown in the above example); to find the first one we would use the Previous Entry index.
5. Ryan explains the DataOffset and DataLength as follows:
“The DataOffset and DataLength are for the file you are extracting to, not values within the GCF files. GCF files are split into 8 KB blocks; you need the defragmentation map to defrag them. DataLength is the amount of data you can extract using the defragmentation map and starting from the FirstBlock (Ceiling(DataLength / BlockSize) blocks I believe.)”
6. DirectoryIndex refers to the index in the directory that the BlockEntry contains data for.
Fragmentation Map
As far as Im aware, the fragmentation map dictates how the blocks the make up the file are located inside the GCF file whereas the Block Entries dictate where data lies in the extracted file. The header contains a simple block count and checksum calculated in the same way as with the block entry header.
What follows the header is a simple list of DWORD’s for the fragmentation map.
Notes:
1. NextDataBlockIndex is the index of the next data block indexed into by the index of the first data block (from the block entries.) This defrags the files.
2. To extract a block entry you would write the First Block then use the index of the First Block in the fragmentation map to get the index of the NextDataBlockIndex. NextDataBlockIndex is BlockCount when you are done.
Ryan explains a little more: “The defragmentation map is quite simple to use. Let’s say you had a file that was composed of three blocks. The index of the first data block would be the value of the FirstBlock field in the Block Entries. The index of the second data block would be the value contained at the index of the first data block in the Defragmentation Map. The index of the third data block would be the value contained at the index of the second data block in the Defragmentation Map. And lastly you should find that the value at the index of the third data block in the defragmentation map is BlockCount.”
3. Dummy0 appears to be the index of the first unused GCFFRAGMAP entry, if all the entries are unused then it appears to be 0 (though sometimes it is any other valid index, not sure why). Not 100% about this one.
4. Dummy1 takes the values 0 or 1. In the case of 0, the value 0x0000ffff for NextDataBlockIndex in GCFFRAGMAP means there is no next index. In the case of 1, the value 0xffffffff for NextDataBlockIndex in GCFFRAGMAP means there is no next index. These values are also consistent with the size of the .gcf (if the .gcf has more than 65534 data blocks it needs the later). These special values are needed because a value of BlockCount for NextDataBlockIndex means the entry is unused.
Block Entry Usage Map
This section only exists in version 5 and lower format GCF files and was removed in the June 21, 2004 Steam update.
This section allows you to navigate the Block Entries in a more efficient manner as it only takes you through Block Entries that are used.
Directory
The directory defines the actually file heirarchy and layout of the files once extracted from the GCF.
DirectoryHeader Notes:
1. DirSize contains the total directories size in number of bytes from the start of GCFDirHeader. Thus GCFDirHeader + GCFDirHeader.DirSize = GCFDirMapHeader.
2. NameSize containts the total length of the buffer containing the directory item names.
3. The checksum does not compute for the header (maybe due to overflow)
DirectoryEntry Notes:
1. CheckIndex contains an index in the CheckMapEntries. Android mobile games apk download. The value is 0xFFFFFFFF in case of a folder, simply because a folder doesnt have a checksum.
2. DirectoryType. Addict; “I’ve observed several values here. It looks to me as if it is some sort of bit mask which is composed of the following components, however I have seen other values.”
As a general rule the value 0x00000000 is a folder, anything else is a file (I don’t know what the difference between 0x00004000 and 0x0000400A is; again you should note that these are the only other observed values so far though).
3. ParentIndex is 0xFFFFFFFF when there is none.
Download Steam Gcf Files For Steam Free
4. NextIndex is 0x00000000 when there is none.
5. FirstIndex is 0x00000000 when there is none.
6. Directory/File Names – The directory and file name list is just a list of names in plaintext format terminated by a NULL (0x00) character. The first character in the list is always NULL which indicated “root”.
7. GCFDirInfo1Entry – Contains Info1Count entries with unknown data.
8. GCFDirInfo2Entry – Contains ItemCount entries with unknown data.
9. GCFDirCopyEntry – Contains a list of CopyCount entries which denotes that a local copy of the file is to be made in the SteamApps<steamaccount><game> directory.
10. GCFDirLocalEntry – Contains a list of LocalCount entries which denote local file copies that have priority over cache copies and are not to be overwritten.
Directory Map
The Directory Map contains a mapping between the items in the Directory section and the data in the Blocks section. Basicly it maps the item to the first block used by its data.
Remi download free android. The Directory Map structure looks like:
Directory Map Notes:
1. The GCFDirMapEntry uses the same index as the GCFDirEntry, so when looking up a file in the entry list one can easily get the First Block index of that entry. If the First Block index is BlockCount, then there is no data for that Directory entry.
Checksums
The checksums section contains some form of checksums for the data in the files. I have no idea how these checksums are calculated or what they stand for. However, they do appear to be related to a defined length of data of the corresponding Directory entry.
The Checksums structure looks like:
GCFCheckHeader Notes:
1. The CheckSize contains the total checksums size in number of bytes from the start of GCFCheckMapHeader. Thus GCFCheckMapHeader + GCFCheckHeader.CheckSize = GCFDataHeader.
GCFCheckMapEntry Notes:
1. It seems as if each checksum is generated for a maximum of 0x8000 bytes (4 * BlockSize = 0x2000). This means that files larger than 0x8000 bytes have several checksums for each piece of data. CheckCount contains this number of checksums.
GCFCheckEntry Notes:
1. There are a total of (GCFCheckMapHeader.CheckCount + 0x20) entries. From what these other 0x20 checksums are, I have no idea, nor do I have any idea on how the other checksums are calculated.
Data Blocks
The data that makes up the files is divided into 8kb (8912 byte) blocks preceeded with a small header. If a block is not completely used, the remaining unused bytes are padded out with NULL characters (0x00).
Notes:
1. FirstBlockOffset is the offset from the start of the file to the data blocks.
2. There can be a region or garbage between the data block header and the data blocks.
3. BlocksUsed indicates total blocks with data in them.
4. The checksum of the header does NOT take the GCFVersion into account.
The information on this page was derived from studying several Steam GCF files with a Hex Editor and human logic. No software was reverse engineered or source code used.
Download Steam Gcf Files For Steam 2
The information on this page comes with no warranty or liability of any kind. None of the contributers to this documentation take any responsibility for any result of using this information or sample code.
By continuing to use the site, you agree to the use of cookies. more information
The cookie settings on this website are set to 'allow cookies' to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click 'Accept' below then you are consenting to this.
Top 4 Download periodically updates software information of steam full versions from the publishers, but some information may be slightly out-of-date.
Using warez version, crack, warez passwords, patches, serial numbers, registration codes, key generator, pirate key, keymaker or keygen for steam license key is illegal. Download links are directly from our mirrors or publisher's website, steam torrent files or shared files from free file sharing and free upload services, including Rapidshare, MegaUpload, YouSendIt, Letitbit, DropSend, MediaMax, HellShare, HotFile, FileServe, LeapFile, MyOtherDrive or MediaFire, are not allowed!
Your computer will be at risk getting infected with spyware, adware, viruses, worms, trojan horses, dialers, etc while you are searching and browsing these illegal sites which distribute a so called keygen, key generator, pirate key, serial number, warez full version or crack for steam. These infections might corrupt your computer installation or breach your privacy. steam keygen or key generator might contain a trojan horse opening a backdoor on your computer.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |