
I'm going to take an educated guess that there is probably more than one open connection when the game is running, maybe two since there are two functions that call WSASend.

There is a call to WSAAsyncSelect below the call to WSASend. If WSASend returns 0, meaning the packet was sent correctly, the game will jump and execute the code below.

If WSASend fails with a return value of -1 or 0xFFFFFFFF in hexadecimal, it will continue execution to WSAGetLastError and return from this function with a value of 0, meaning that the function returned false which will probably result in the game closing due to a packet error.
