Function at 0x402830
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, ecx
push edi
push esi
push ebx
sub esp, 0x14c
mov dword [esp + 0x24], 0xc8
jmp 0x4028d6
mov ecx, dword [ebp + 0xa8]
mov esi, dword [ecx]
mov edi, dword [ecx + 4]
mov eax, esi
mov edx, edi
not esi
not edi
add eax, 1
mov dword [esp + 0x28], esi
adc edx, 0
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov dword [esp + 0x2c], edi
mov dword [esp], esi
mov esi, dword [sym.imp.WS2_32.dll_htonl]
call esi
sub esp, 4
mov dword [ebx], eax
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call esi
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0xc8]
sub esp, 4
mov dword [esp + 0xc], 0
mov edx, dword [eax + 0x68]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xcc]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_send]
sub esp, 0x10
test eax, eax
js 0x402b00
sub dword [esp + 0x24], 1
je 0x402a9e
mov eax, dword [ebp + 0xcc]
lea edi, [esp + 0x34]
mov dword [esp + 0x3c], 1
mov dword [esp + 0x10], edi
lea edi, [esp + 0x3c]
mov dword [esp + 0x40], eax
add eax, 1
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0x2710
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
cmp eax, 0xffffffff
je 0x4029c0
mov edx, dword [ebp + 0xc8]
mov ebx, dword [edx + 0x2c]
test eax, eax
je 0x402850
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x5be
mov eax, dword [ebp + 0xc8]
mov eax, dword [eax + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xcc]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_recv]
sub esp, 0x10
cmp eax, 0x34
je 0x402b28
test eax, eax
js 0x4029f0
je 0x4028cb
lea esi, [esi]
nop
mov eax, dword [ebp + 0xc8]
cmp dword [eax + 0x88], 1
je 0x4029b1
mov ecx, dword [eax + 0x2c]
mov dword [esp], eax
lea edx, [ecx + 0x10]
mov dword [esp + 4], edx
call sym._InitServerRelayUDPReport
mov dword [esp], eax
call sym._PostReport
add esp, 0x14c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0x74a
mov dword [esp + 4], str.Client.cpp
mov dword [esp], str.select
call sym._warn_errno
mov eax, dword [ebp + 0xc8]
mov dword [esp], eax
call sym._thread_stop
jmp 0x402941
mov eax, dword [0x459004]
sub eax, 1
mov dword [0x459004], eax
test eax, eax
jle 0x4028cb
mov eax, dword [ebp + 0xc8]
mov eax, dword [eax + 0x28]
mov dword [esp + 8], str._sRead_UDP_fin
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__snprintf]
mov dword [esp], 1
mov esi, eax
lea eax, [eax + 2]
mov dword [esp + 4], eax
call sym._calloc
mov ebx, eax
test eax, eax
je 0x4028cb
mov eax, dword [ebp + 0xc8]
add esi, 1
mov eax, dword [eax + 0x28]
mov dword [esp + 8], str._sRead_UDP_fin
mov dword [esp + 4], esi
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__snprintf]
mov dword [esp + 8], 0x769
mov dword [esp + 4], str.Client.cpp
mov dword [esp], ebx
call sym._warn_errno
mov dword [esp], ebx
call sym._free
sub dword [esp + 0x24], 1
jne 0x4028d6
mov eax, dword [ebp + 0xc8]
cmp dword [eax + 0x88], 1
je 0x4029b1
mov eax, dword [eax + 0x78]
mov esi, dword [ebp + 0xcc]
mov dword [esp], 2
and eax, 0x1000
cmp eax, 1
sbb ebx, ebx
call dword [0x459154]
and ebx, 0xfffffff7
mov dword [esp + 8], esi
add ebx, 0xa
mov dword [esp + 4], str.__3d__WARNING:_did_not_receive_ack_of_last_datagram_after__d_tries._n
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call sym.fprintf__iobuf__char_const__..._
add esp, 0x14c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0x751
mov dword [esp + 4], str.Client.cpp
mov dword [esp], str.write_fin
call sym._warn_errno
jmp 0x4028cb
mov eax, dword [ebp + 0xc8]
mov eax, dword [eax + 0x2c]
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_ntohl]
sub esp, 4
cmp eax, 2
jne 0x402988
jmp 0x4028cb