XIV Dev Wiki
  • Welcome
  • Community Projects
  • Game Data
    • Visual Effects
      • AVFX Files
      • Global Parameters
      • Schedulers
      • Particles
      • Emitters
      • Timelines
      • Effectors
      • Binders
      • Object Life
    • File Formats
      • Excel
    • Character Data Files
      • Character Creator Preset
      • Character data folder
        • Chat Log (.log)
  • Data Files
    • ZiPatch
      • SQPK
    • SqPack
  • Network
    • Packet Structure
    • Channels
    • Ping
  • Game Internals
    • Actions
      • Animation Lock
    • World
      • Coordinate System
      • Weather
    • RSV
    • RSF
  • SqexArg
Powered by GitBook
On this page
  • Encoded Process Argument
  • Encoding Process
  • Checksum

Was this helpful?

Edit on GitHub
Export as PDF

SqexArg

PreviousRSF

Last updated 2 years ago

Was this helpful?

Encoded Process Argument

Upon launching the game, the retail launcher passes handful of information (e.g. login token, client language, etc...) to the game that usually looks like this:

//**sqex0003VGhpcyBpcyBqdXN0IGZvciBleGFtcGxlIHB1cnBvc2U7IGl0IGFjdHVhbGx5IG5ldmVyIGxvb2sgbGlrZSB0aGlzA**//

Encoding Process

  • Encrypt UTF-8 plain text using Blowfish; you need to pad the buffer with zero as needed

    • Key is GetTickCount() & 0xFFFF_0000

    • Block cipher mode of operation is ECB (yes, you read it right.)

  • Convert encrypted bytes to

  • Format it as //**sqex0003{base64}{checksum}**//

Checksum

Pseudocode

char[] ChecksumTable = {
    'f', 'X', '1', 'p', 'G', 't', 'd', 'S',
    '5', 'C', 'A', 'P', '4', '_', 'V', 'L'
};

char GetChecksum(uint key) {
    // mask the nibble we're looking for
    var value = key & 0x000F_0000;

    return ChecksumTable[value >> 16];
}
Base64URL