BNETDocs
File Transfer Protocol Version 1

Battle.net's file transfer protocol (often abbreviated BNFTP or BNFTPv1) consists of two packets: the request and the response.

To initiate a BNFTPv1 connection, BNFTP's protocol ID, 0x02, must be sent to the server before sending a request packet. The response packet is likely to be split up among multiple TCP packets.

Request Packet Structure

Type Field Description
UINT16 Request Length
UINT16 Protocol Version 0x100 (256)
UINT32 Platform ID See Product Identification
UINT32 Product ID See Product Identification
UINT32 Ad Banner ID 0 unless downloading an ad banner
UINT32 Ad Banner File Extension 0 unless downloading an ad banner
UINT32 File start position For resuming an incomplete download
FILETIME Filetime
STRING Filename

Response Packet Structure

Type Field Description
UINT16 Header Length Does not include the file length
UINT16 Type
UINT32 File size
UINT32 Ad Banner ID 0 unless downloading an ad banner
UINT32 Ad Banner File Extension 0 unless downloading an ad banner
FILETIME Filetime
STRING Filename
VOID File data

The client terminates the connection after completely receiving the requested file.

| Edited: RealityRipple
Comments
Caaaaarrrrlll

Why would the unknown be padding and not part of the header length making it a DWORD? It makes no sense for it to be padding if this is a header.

Caaaaarrrrlll

Why would the protocol version be 0x100 (256)? They probably are using big endian instead of little endian, and the version is probably 0x01 (1).