benilla-re systems structs docs

NetClient::Send

function · net · primitive

Address
0x5379a0 · 139 bytes, up to 0x537a2a
Signature
void __thiscall (NetClient *this, CDataStore *msg)
Meaning
Sends a message when connected and non-empty, counts its bytes, and switches the header cipher on after the first send
Confidence
verified, proof one
Name from
the community database (idb)
Finding
net/wire#arming-the-cipher
Test
net::netclient_send

Finding: Arming the cipher in net: the wire

The cipher is armed by the first packet the client sends on a connection: after NetClient::Send passes a packet to the socket, if the connection is not armed, it sets the key to the NetClient's 40 bytes at +0x48, the send span to 4, the receive span to 2 and the key length to 40, then arms it. That packet and every one received before it are in clear. Connecting disarms the cipher. In the normal exchange the first packet is CMSG_AUTH_SESSION, sent in reply to the server's challenge (session), so the session key from the logon server is the key. With no challenge within 30 seconds of connecting, the keepalive sends CMSG_PING first, in clear, and arms the cipher.

The derivation is in the doc.

Callers 15

Callees 3

Calls and jumps by a bare address, from tables/calls.tsv.