Casc Storages

Overview

Overview

In 2014, Blizzard Entertainment changed data format in their games from MPQ to CASC (Content Addressable Storage Container). Every Blizzard game today (2019) has its own storage, which can be found in a subdirectory of the game (Data, SC2Data). Compared to the old MPQ archives, files in a CASC storage are not standalone; they are all needed to keep the storage in shape. It is no longer possible to copy a single file out and treat it as single archive. CASC storages are also closely tight up with the remote server, called Content Delivery Network - the CDN. Every time when a missing or corrupt file is detected, the game client (or game agent) automatically downloads the data from the server. The client also checks whether the server variant of the game data contains a new version.

An exhausting information about the format of the CASC storage can be found on WoWDev Wiki.

Here's list of Blizzard games and their usage of CASC storages:

  • Warcraft III (since version 1.30, build 9655 PTR)
  • Starcraft I (since build 2457)
  • Starcraft II (since Legacy of the Void, build 38996)
  • Overwatch (since build 24919, limited support)
  • Diablo 3 (since version 2.2.0 PTR)
  • World of Warcraft (since Warlords of Draenor)
  • Heroes of the Storm (all versions)
  • Call of Duty 4: Black Ops

What is a CASC storage made of?

When browsing the data subdirectory in the game directory, you may notice several files in various subdirectories. There are data files in the "data" subdirectory. However, unlike MPQs, these data files are not standalone archives. The complete storage directory with several extra files is needed to be able to browse the storage and extract files from it. The following list contains the complete list of files and directories that you need to preserve in order to be able to extract files:

  • The entire data subdirectory ("Data", "BNTData" or "HeroesData", whichever is present)
  • Make sure that the "config" subdirectory under data folder is present
  • The ".build.info" file
  • The ".build.db" file (older storages)

GitHub Logo

CascLib

A standalone library, written in C++, is available in the GitHub repository, containing the complete source code and a testing program.

A fulltext documentation about the available functions of the CascLib library is also available.

CascView Logo

CascView

A tool for browsing files and extracting data, called CascView is available, supporting all Blizzard games. CascView features browsing of local and online storages, searching files, extracting files, viewing BLP images and more. Note that CascView is not an editor - there is no support for modifying CASC storages and there are no plans for adding it. Due to the ever-changing nature of the storages, it would be extremely difficult and also a violation of Blizzard terms of use.

Example of a very large file Built-in image BLP viewer INSTALL Manifest viewer

Download CascView for Windows (32+64 bit) v 2.4.

History

  • 2.4.0.286: Support for Overwatch assets

 

How do I open CASC storage with CascView?

When opening a game storage directory, you can either enter the storage at the command line or select "File\Open Storage" in the application UI. To open the storage, you either select a game directory or one of the storage subdirectories (no matter how deep). Examples:

CascView.exe "c:\Games\Diablo III"
CascView.exe "C:\Games\Heroes of the Storm\HeroesData"
CascView.exe "C:\Games\World of Warcraft\Data"
CascView.exe "C:\Games\Overwatch\data\casc\config\66\77"
CascView.exe "C:\Games\WoW\45745-meta\wow-46902-classic.versions"

Meta-storages

Because all files in the CASC storage is named by its MD5, there is a possibility to hold multiple games in one storage. This is what World of Warcraft does - a single installation folder can contain WoW, WoW Classic, WoW Classic TBC, and also the PTR for each of them.

The only conflicting file in the storage is the main file - ".build.info", ".build.db" and "versions" ("cdns") file. To overcome this disadvantage, CascLib (from version 3) supports opening a storage by the main file, which can have an arbitrary name. For example, to create a meta-storage folder for WoW, one needs to rename the default "versions" and "cdns" files to a different, unique name, such as on the screenshot:

Example of a meta-storage

As you can see, there are multiple pairs of "versions" and "cdns" files in the folder, each of them describing a separate game version. Config files are stored in the "config" subfolder, data and indexes are stored in the "data" subfolder.

To open such storage in CascView, you need version 2.4 or newer. Simply enter the name of a "versions" file on the command line. Alternatively, it is possible to associate CascView with the ".versions" file extension

ListFile

Listfiles

Some CASC storages, namely for World of Warcraft do not hold file names. Names are encoded as 64-bit hashes in the storage and accessed as such by the game. Fuhrtermore, since World of Warcraft version 8.2, the file name hashes are missing for most of the files and files are accessed by File Data Id by the game.

Overwatch

Overwatch

Overwatch's storage contains multiple manifest files, which are encrypted by AES encryption. While the AES encryption is standard AES_cbc_decrypt(), the encryption key and IV is generated by an algorithm unique to each game build. Thanks to the guys who made TACTLib, CascLib supports these too and give a view over Overwatch's files (assets). The assets are identified by their GUIDs and can be open as such.