Difference between revisions of "Category:Save Data"

From COD Engine Research
Jump to: navigation, search
(SAVEGAME.SVG)
(Black Ops)
 
(29 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== GPAD0 Files ==
+
== GPADX.PRF Files ==
These files (gpad0_mp, gpad0_cm, etc..) contain variables related to game settings (such as view region, brightness, gamma, etc. )
+
These files (GPADX_MP.PRF, GPADX_CM.PRF, and GPADX_SP.PRF, "X" being the controller number) contain variables related to game settings.
  
[[GPAD0 COD(4,5,7)|COD4, COD5, COD7]]
+
=== Call of Duty 4: Modern Warfare, World at War ===
 +
Call of Duty 4 stores the GPAD files in plaintext. The max size the file can be is 1000 bytes. It was then later patched by Infinity Ward because users started to edit the files to exploit the game.
 +
 
 +
World at War in the other hand, is encrypted using Sony's AES encryption algorithm. After decrypting that layer the GPAD's is going to be plaintext just like Call of Duty 4. Treyarch hasn't bothered in patching the files, which allows modifications on the game.
 +
 
 +
Both games use .cfg codes, which is easy to manipulate dvars (Developer Vars).
 +
 
 +
=== Black Ops ===
 +
Treyarch has added additional protection on the save data. It is first encrypted using Sony's AES algorithm, after decrypting that layer it is additionally encrypted using the 3DES-CBC algorithm.
 +
 
 +
3DES key:
 +
<source lang="cpp">
 +
unsigned char black_ops_3des_key[24] = "Md8ea20lPcftYwsl496q63x9"
 +
</source>
 +
 
 +
3DES IV (Initialization Vector)
 +
<source lang="cpp">
 +
unsigned char black_ops_3des_iv[24] = "0Peyx825J4S2ndpr54rW312z"
 +
</source>
 +
 
 +
After decrypting this DES layer it is then plaintext and you are able to edit the file to your liking, allowing you to edit dvars and .cfg code.
 +
 
 +
=== Modern Warfare 2, Modern Warfare 3, Ghosts, Advanced Warfare ===
 +
Ever since Modern Warfare 2, Infinity Ward started compiling the saves because of people taking advantage of cfg code in Call of Duty 4. They are hard-coded dvars that can only mod in-game settings like sensivity, in-game volume, and button configurations etc...
 +
 
 +
<source lang="cpp">
 +
enum GamerProfileDataType
 +
{
 +
  TYPE_INVALID = 0x0,
 +
  TYPE_BYTE = 0x1,
 +
  TYPE_BOOL = 0x2,
 +
  TYPE_SHORT = 0x3,
 +
  TYPE_INT = 0x4,
 +
  TYPE_FLOAT = 0x5,
 +
  TYPE_STRING = 0x6,
 +
#if defined(IW5) || defined(IW6) || defined(S1) // If it is Modern Warfare 3, Ghosts, or Advanced Warfare...
 +
  TYPE_BITFIELD = 0x7,
 +
#endif
 +
};
 +
 
 +
union GamerProfileDataUnion
 +
{
 +
  char byteVal;
 +
  bool boolVal;
 +
  __int16 shortVal;
 +
  int intVal;
 +
  float floatVal;
 +
  const char *stringVal;
 +
};
 +
 
 +
struct GamerProfileData
 +
{
 +
  GamerProfileDataType type;
 +
  GamerProfileDataUnion u;
 +
};
 +
</source>
 +
 
 +
== FILE.SVG ==
 +
=== Call of Duty: Classic ===
 +
<source lang="cpp">
 +
struct qtime_s
 +
{
 +
  int tm_sec;
 +
  int tm_min;
 +
  int tm_hour;
 +
  int tm_mday;
 +
  int tm_mon;
 +
  int tm_year;
 +
  int tm_wday;
 +
  int tm_yday;
 +
  int tm_isdst;
 +
};
 +
 
 +
struct SaveHeader
 +
{
 +
  int saveVersion;
 +
  char mapNameLen;
 +
  char mapName[mapNameLen];
 +
  char buildNumberLen;
 +
  char buildNumber[buildNumberLen];
 +
  char unknown1[20];
 +
  char campaignLen;
 +
  char campaign[campaignLen];
 +
  char screenShotNameLen;
 +
  char screenShotName[screenShotNameLen];
 +
  int unknown2;
 +
  char descriptionLen;
 +
  char description[descriptionLenLen];
 +
  qtime_s time;
 +
  int bodySize;
 +
};
 +
</source>
  
 
== SAVEGAME.SVG ==
 
== SAVEGAME.SVG ==
 +
=== World at War ===
 
<source lang="cpp">
 
<source lang="cpp">
 +
struct qtime_s
 +
{
 +
  int tm_sec;
 +
  int tm_min;
 +
  int tm_hour;
 +
  int tm_mday;
 +
  int tm_mon;
 +
  int tm_year;
 +
  int tm_wday;
 +
  int tm_yday;
 +
  int tm_isdst;
 +
};
 +
 +
struct SaveHeader
 +
{
 +
int saveVersion;
 +
int gameCheckSum;
 +
int saveCheckSum;
 +
int saveId;
 +
bool isUsingScriptChecksum;
 +
int scrCheckSum[3];
 +
char mapName[256];
 +
char buildNumber[128];
 +
char campaign[256];
 +
char screenShotName[64];
 +
char description[256];
 +
char filename[64];
 +
int health;
 +
int skill;
 +
bool internalSave;
 +
qtime_s time;
 +
int server_bodySize;
 +
int client_bodySize;
 +
};
 +
</source>
 +
 +
=== Black Ops & Black Ops II ===
 +
<source lang="cpp">
 +
enum SaveType
 +
{
 +
  SAVE_TYPE_INTERNAL = 0x0,
 +
  SAVE_TYPE_AUTOSAVE = 0x1,
 +
  SAVE_TYPE_CONSOLE = 0x2,
 +
};
 +
 +
struct qtime_s
 +
{
 +
  int tm_sec;
 +
  int tm_min;
 +
  int tm_hour;
 +
  int tm_mday;
 +
  int tm_mon;
 +
  int tm_year;
 +
  int tm_wday;
 +
  int tm_yday;
 +
  int tm_isdst;
 +
};
 +
 
struct SaveHeader
 
struct SaveHeader
 
{
 
{
Line 17: Line 167:
 
   char mapName[256];
 
   char mapName[256];
 
   char buildNumber[128];
 
   char buildNumber[128];
  unsigned int omnvarPerGameCount;
+
   char gametype[256];
  unsigned int omnvarPerClientCount;
+
   char gametype[128];
+
 
   char buildVersionSuffix[16];
 
   char buildVersionSuffix[16];
 
   unsigned int networkProtocol;
 
   unsigned int networkProtocol;
Line 28: Line 176:
 
   qtime_s time;
 
   qtime_s time;
 
   int bodySize;
 
   int bodySize;
   unsigned int pad[6];
+
   unsigned int pad[8];
 
};
 
};
 +
</source>
  
struct MemoryFile
+
=== Ghosts ===
 +
<source lang="cpp">
 +
enum SaveType
 
{
 
{
   char *buffer;
+
   SAVE_TYPE_INTERNAL = 0x0,
   unsigned __int64 bufferSize;
+
   SAVE_TYPE_AUTOSAVE = 0x1,
   unsigned __int64 bufferSizeOriginal;
+
   SAVE_TYPE_CONSOLE = 0x2,
   unsigned __int64 bytesUsed;
+
   SAVE_TYPESCOUNT = 0x3,
  int segmentIndex;
+
  unsigned __int64 segmentStart;
+
  int segmentFullLen;
+
  bool errorOnOverflow;
+
  bool memoryOverflow;
+
  bool compress;
+
  void (__cdecl *archiveProc)(MemoryFile *, unsigned __int64, void *);
+
 
};
 
};
  
struct __declspec(align(128)) SaveGame
+
struct qtime_s
 
{
 
{
   SaveHeader header;
+
   int tm_sec;
   MemoryFile memFile;
+
  int tm_min;
 +
  int tm_hour;
 +
  int tm_mday;
 +
  int tm_mon;
 +
  int tm_year;
 +
  int tm_wday;
 +
  int tm_yday;
 +
  int tm_isdst;
 +
};
 +
 
 +
struct SaveHeader
 +
{
 +
  int saveVersion;
 +
  int gameCheckSum;
 +
  int saveCheckSum;
 +
  int saveId;
 +
  bool demoPlayback;
 +
  bool splitscreen;
 +
  int scrCheckSum[3];
 +
  char mapName[256];
 +
  char buildNumber[128];
 +
  unsigned int omnvarPerGameCount;
 +
  unsigned int omnvarPerClientCount;
 +
  char gametype[128];
 +
  char buildVersionSuffix[16];
 +
  unsigned int networkProtocol;
 +
  char screenShotName[64];
 +
  char description[256];
 +
  char filename[64];
 +
  SaveType saveType;
 +
  qtime_s time;
 +
  int bodySize;
 +
   unsigned int pad[6];
 
};
 
};
 
</source>
 
</source>

Latest revision as of 07:40, 1 April 2015

GPADX.PRF Files

These files (GPADX_MP.PRF, GPADX_CM.PRF, and GPADX_SP.PRF, "X" being the controller number) contain variables related to game settings.

Call of Duty 4: Modern Warfare, World at War

Call of Duty 4 stores the GPAD files in plaintext. The max size the file can be is 1000 bytes. It was then later patched by Infinity Ward because users started to edit the files to exploit the game.

World at War in the other hand, is encrypted using Sony's AES encryption algorithm. After decrypting that layer the GPAD's is going to be plaintext just like Call of Duty 4. Treyarch hasn't bothered in patching the files, which allows modifications on the game.

Both games use .cfg codes, which is easy to manipulate dvars (Developer Vars).

Black Ops

Treyarch has added additional protection on the save data. It is first encrypted using Sony's AES algorithm, after decrypting that layer it is additionally encrypted using the 3DES-CBC algorithm.

3DES key:

unsigned char black_ops_3des_key[24] = "Md8ea20lPcftYwsl496q63x9"

3DES IV (Initialization Vector)

unsigned char black_ops_3des_iv[24] = "0Peyx825J4S2ndpr54rW312z"

After decrypting this DES layer it is then plaintext and you are able to edit the file to your liking, allowing you to edit dvars and .cfg code.

Modern Warfare 2, Modern Warfare 3, Ghosts, Advanced Warfare

Ever since Modern Warfare 2, Infinity Ward started compiling the saves because of people taking advantage of cfg code in Call of Duty 4. They are hard-coded dvars that can only mod in-game settings like sensivity, in-game volume, and button configurations etc...

enum GamerProfileDataType
{
  TYPE_INVALID = 0x0,
  TYPE_BYTE = 0x1,
  TYPE_BOOL = 0x2,
  TYPE_SHORT = 0x3,
  TYPE_INT = 0x4,
  TYPE_FLOAT = 0x5,
  TYPE_STRING = 0x6,
#if defined(IW5) || defined(IW6) || defined(S1) // If it is Modern Warfare 3, Ghosts, or Advanced Warfare...
  TYPE_BITFIELD = 0x7,
#endif
};
 
union GamerProfileDataUnion
{
  char byteVal;
  bool boolVal;
  __int16 shortVal;
  int intVal;
  float floatVal;
  const char *stringVal;
};
 
struct GamerProfileData
{
  GamerProfileDataType type;
  GamerProfileDataUnion u;
};

FILE.SVG

Call of Duty: Classic

struct qtime_s
{
  int tm_sec;
  int tm_min;
  int tm_hour;
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_wday;
  int tm_yday;
  int tm_isdst;
};
 
struct SaveHeader
{
  int saveVersion;
  char mapNameLen;
  char mapName[mapNameLen];
  char buildNumberLen;
  char buildNumber[buildNumberLen];
  char unknown1[20];
  char campaignLen;
  char campaign[campaignLen];
  char screenShotNameLen;
  char screenShotName[screenShotNameLen];
  int unknown2;
  char descriptionLen;
  char description[descriptionLenLen];
  qtime_s time;
  int bodySize;
};

SAVEGAME.SVG

World at War

struct qtime_s
{
  int tm_sec;
  int tm_min;
  int tm_hour;
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_wday;
  int tm_yday;
  int tm_isdst;
};
 
struct SaveHeader
{
 int saveVersion;
 int gameCheckSum;
 int saveCheckSum;
 int saveId;
 bool isUsingScriptChecksum;
 int scrCheckSum[3];
 char mapName[256];
 char buildNumber[128];
 char campaign[256];
 char screenShotName[64];
 char description[256];
 char filename[64];
 int health;
 int skill;
 bool internalSave;
 qtime_s time;
 int server_bodySize;
 int client_bodySize;
};

Black Ops & Black Ops II

enum SaveType
{
  SAVE_TYPE_INTERNAL = 0x0,
  SAVE_TYPE_AUTOSAVE = 0x1,
  SAVE_TYPE_CONSOLE = 0x2,
};
 
struct qtime_s
{
  int tm_sec;
  int tm_min;
  int tm_hour;
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_wday;
  int tm_yday;
  int tm_isdst;
};
 
struct SaveHeader
{
  int saveVersion;
  int gameCheckSum;
  int saveCheckSum;
  int saveId;
  bool demoPlayback;
  bool splitscreen;
  int scrCheckSum[3];
  char mapName[256];
  char buildNumber[128];
  char gametype[256];
  char buildVersionSuffix[16];
  unsigned int networkProtocol;
  char screenShotName[64];
  char description[256];
  char filename[64];
  SaveType saveType;
  qtime_s time;
  int bodySize;
  unsigned int pad[8];
};

Ghosts

enum SaveType
{
  SAVE_TYPE_INTERNAL = 0x0,
  SAVE_TYPE_AUTOSAVE = 0x1,
  SAVE_TYPE_CONSOLE = 0x2,
  SAVE_TYPESCOUNT = 0x3,
};
 
struct qtime_s
{
  int tm_sec;
  int tm_min;
  int tm_hour;
  int tm_mday;
  int tm_mon;
  int tm_year;
  int tm_wday;
  int tm_yday;
  int tm_isdst;
};
 
struct SaveHeader
{
  int saveVersion;
  int gameCheckSum;
  int saveCheckSum;
  int saveId;
  bool demoPlayback;
  bool splitscreen;
  int scrCheckSum[3];
  char mapName[256];
  char buildNumber[128];
  unsigned int omnvarPerGameCount;
  unsigned int omnvarPerClientCount;
  char gametype[128];
  char buildVersionSuffix[16];
  unsigned int networkProtocol;
  char screenShotName[64];
  char description[256];
  char filename[64];
  SaveType saveType;
  qtime_s time;
  int bodySize;
  unsigned int pad[6];
};

This category currently contains no pages or media.