l)ragon's avatar

l)ragon

Member for 19 years, 4 months, 5 days User #14

To much to list in a little box like this.

Comments 8

On a packet ·
namespace Standards::CRC32 {

    constexpr uint32_t CRC32_BZIP2_POLYNOMIAL = 0x04C11DB7; //CRC-32/BZIP2
    uint32_t CRC32BZIP2Table[256];
    static bool CRC32BZIP2Initialized = false;

    // Initialize CRC table for CRC-32/BZIP2
    void constexpr InitCRC32_BZIP2() {
        if (CRC32BZIP2Initialized)
            return;
        CRC32BZIP2Initialized = true;

        for (size_t i = 0; i < 256; i++) {
            uint32_t crc = i << 24; // Non-reflected version starts with MSB
            for (size_t j = 0; j < 8; j++) {
                if (crc & 0x80000000) {
                    crc = (crc << 1) ^ CRC32_BZIP2_POLYNOMIAL;
                }
                else {
                    crc <<= 1;
                }
            }
            CRC32BZIP2Table[i] = crc;
        }
    }

    uint32_t BZIP2(uint8_t* data, size_t size) {
        InitCRC32_BZIP2();

        uint32_t crc = 0xFFFFFFFF;
        while (size--) {
            crc &= 0xFFFFFFFF;
            crc = ((crc << 8)) ^ CRC32BZIP2Table[((crc >> 24) ^ *data++) & 0xFF];
        }
        return ~(crc);
    }

}
On a packet ·
Subcommand 0x02 WID_MAPLIST: (probably should be labled QUERY, since its not only the map list information.)
    (UINT32) Cookie
     (UINT8) Number of responses
     For each response:
         (UINT32) ID
         (UINT32) (CRC-32/BZIP2)->(uncompressed data)
          (UINT16) Decompressed length
          (UINT16) Compressed length
          (VOID) Compressed data
     (UINT8) Remaining Packets

compressed data:
types:
    (uint32_t)'\0URL'
        (char*) realm_url
        (char*) profile_url
        (char*) turnament_url
        (char*) clan_url

    (uint32_t)'\0MAP'
        (uint8_t) total
        each:
            (char*) map_path

    (uint32_t)'TYPE'
        (uint8_t) total
        each:
            (uint8_t) index
            (uint8_t) total_2
            each:
                (uint8_t[5]) prefix_need_more_info
                (uint8_t) total_maps
                (uint8_t[total_maps]) maps_by_index_order
        notes:
            maps_by_index_order: this is the return from '\0MAP', 0=first map in that list.
            first occurrence of: total_maps< 12
            from every dump i have seen there is a spot in the second struct where the ending void*
            bytes has 3 extra bytes attached to the structure. not counted and is a continuation of
            the final byte of the counted struct {need_more_info[total_bytes]+1, 
            need_more_info[total_bytes]+2, need_more_info[total_bytes]+3}

    (uint32_t)'DESC'
        (uint8_t) total
        each:
            (uint8_t) index_enum_pg_at_ty
            (uint8_t) index_in_the_pg_at_ty_list
            (char*) short_description
            (char*) long_description

    (uint32_t)'LADR'
        (uint8_t) total
        each:
            (uint32_t) type
            (char*) category
            (char*) url
On a document ·

0x00000001: Blizzard Representative
0x00000002: Channel Operator
0x00000004: Channel Speaker
0x00000008: Battle.net Administrator
0x00000010: No UDP Support
0x00000020: Squelched

are looked for directly in the game clients them selves and are not likely to change ever with out hardcoded updates.

On a packet ·

0x01->0x13: Name "character_name" Rejected by server (client also disconnects mcp)

0x15->0x117 is the same message as ^

On a packet ·

The result values here are reversed.
BOOL Result, TRUE (Success), FALSE (Failure)

Clients, D2XP 1.14D, WAR2 (Latest) (have not tested anything else to lazy)

Show 3 older comments
On a packet ·

As a reminder, for the clients that have no cdkeys the (For each Key) feild is empty, and the Number of keys reflects this aswell.

On a packet ·
00000000   FF 1C 2C 00 01 00 00 00 - 00 00 00 00 08 00 00 00   ..,.............
00000010   00 00 00 00 00 00 00 00 - 41 73 64 66 00 41 73 64   ........Asdf.Asd
00000020   66 00 31 66 64 20 61 73 - 20 64 66 00               f.1fd as df.

Provider version on SSHR is 0x00000000

On a packet ·
pcid pkid length       uid                          reason
[01] [07] [09 00] [9F 03 00 00] - [06]

    switch (reason) {
        case 0x3: { s_reason = "[Kicked] By Admin"; break; }
        case 0x5: { s_reason = "[Kicked] For Protocol Violation"; break; }
        case 0x6: { s_reason = "[Connection Dropped] Network Error"; break; }
        case 0x7: { s_reason = "disconnected"; break; }
        default: { s_reason = "unknowen"; break; }
    }