benilla-re systems structs docs

NetClient::GetSessionKey

function · net · orchestration

Address
0x537a50 · 4 bytes, up to 0x537a53
Signature
uint8_t * __thiscall (NetClient *this)
Meaning
Returns the address of the 40-byte session key at +0x48
Confidence
verified, proof one
Finding
net/wire#arming-the-cipher

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 2

Callees 0

None by a direct call or jump.

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