Skip to content

CD‐Key service

Michał Kapała edited this page Aug 13, 2024 · 7 revisions

CD-Key service validated online key activation and authorized the game for online feature access.

Protocol

Internally CD-Key service uses the following classes:

  • clDataList for data serialization
  • clCDKeyMessage (a wrapper for clSimpleMessage) for data encryption
  • CMessageBuffer for message queueing

Transaction

There are 5 request/response exchanges with the CD Key service:

  1. Challenge
  2. Key activation
  3. Authorization
  4. Validation
  5. Player status

Challenge Request

Initial handshake with the server.

Request

Payload

struct cdKeyActChalReq {
  unsigned char msgType;
  unsigned int size;
  unsigned char encDataList[18];
};

Note:

  1. msgType is 0xD3
  2. size is big-endian
  3. After decryption (Blowfish), the data list contains:
    • message ID - incremental packet id (string)
    • request ID - 1 (string)
    • unknown - 1 (string)
    • empty data list

Response

Clone this wiki locally