Skip to content
mechpaul edited this page Sep 16, 2018 · 3 revisions

Format

struct PatchFormat
{
  char WzPatch[9]; //WzPatch\x1A - plus null terminator
  int version; //Always 0x02 - This is some sort of patch file version
  unsigned int checksum;
  unsigned char* zlibBlock;
}

The actual patcher program reads the first 12 bytes then runs strncmp on the first 8 bytes to make sure it equals WzPatch. The other bytes (version bytes) are skipped.

The Checksum is then read and computed on the zlibBlock. If the Checksum matches the one given in the header, unpack the zlibBlock and then begin parsing file blocks.