The wicket.vr1

Purpose
The wicket is a file which was downloaded from the providers website and contained information used to log into the game server through the launcher. It contains authentication information, the server IP and port, command line parameters for the game to be started, required game version numbers as well as ftp locations for downloading updated versions.

Technical Note
Unsigned 32bit Integers (uint32) are in Big-Endian byte order

Version
This structure applies for Launcher Version 4.4.0.0. Other versions may differ.

Structure
The wicket file consists of a header section followed by 3 blocks:
 * the Auth Block
 * the Launcher Block
 * the Private Block

Header
The header is 16 bytes long.

Offset   Type       Description - 0x0000   uint32     File Size; Always 0x087C, 2172 bytes 0x0004   uint32     Offset to the Auth Block 0x0008   uint32     Offset to the Launcher Block 0x000C   uint32     Offset to the Private Block

The Auth Block
The Auth Block contains data which the client uses to connect to a server. Offsets are relative to the block start. All Strings are zero-padded. Offset   Length     Description - 0x0000   0x0020     32 byte SHA hash 0x0020   0x0020     Login Name 0x0040   0x0100     Server Name / IP 0x0140    0x0100     Client command line parameters 0x0240   0x0004     Product code 0x0244   0x0004     Client Version: Latest 0x0248   0x0004     Client Version: Last Major Version 0x024C   0x0004     Client Version: Last upgradeable Version 0x0250   0x0100     Vendor Data // unused

All version numbers are encoded as described below.

The Launcher Block
The Launcher Block has information for the launcher to verify that the correct game is launched. Offsets are relative to the block start. All Strings are zero-padded.

Offset   Length     Description - 0x0000   0x0100     Registry Path from HKEY_LOCAL_MACHINE/SOFTWARE/Vr1/ 0x0100   0x0100     Download Path full client 0x0200   0x0100     Download Path major upgrade 0x0300   0x0100     Download Path minor upgrade 0x0400   0x0004     Launcher Product code 0x0404   0x0004     Launcher Version 0x0408   0x0100     Download Path Launcher upgrade

The private Block
20 bits. Unused.

Version Encoding
This is a little bit odd. Version numbers in Windows Registry are hex DWORDs. Version numbers in the wicket file are 32 bit unsigned numbers. So same storage size. But still some conversion is necessary to get the number in the registry from the number in the wicket. And vice versa.

Pseudocode: uint32 wicketNumber; uint32 a,b,c; uint32 registryNumber; a = wicketNumber & 0xFF0000; b = wicketNumber & 0xFF00; c = wicketNumber & 0xFF; b = b >> 8; b = b * 0x64; b = b + c; b = b << 4; registryNumber = a | b

Whatever.