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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov dword [ebp - 0x134], ecx
mov eax, dword [ebp - 0x134]
cmp dword [eax], 0xffffffff
jne 0x4020c2
mov eax, 0xfffffff7
jmp 0x402320
mov ecx, dword [ebp - 0x134]
call fcn.00405100
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x124], 0
jmp 0x4020f2
mov ecx, dword [ebp - 0x124]
add ecx, 1
mov dword [ebp - 0x124], ecx
mov edx, dword [ebp - 0x124]
cmp edx, dword [ebp - 0x114]
jae 0x40211b
mov eax, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x134]
mov edx, dword [ebp + eax*4 - 0x110]
cmp edx, dword [ecx]
jne 0x402119
jmp 0x40211b
jmp 0x4020e3
mov eax, dword [ebp - 0x124]
cmp eax, dword [ebp - 0x114]
jne 0x402156
cmp dword [ebp - 0x114], 0x40
jae 0x402156
mov ecx, dword [ebp - 0x124]
mov edx, dword [ebp - 0x134]
mov eax, dword [edx]
mov dword [ebp + ecx*4 - 0x110], eax
mov ecx, dword [ebp - 0x114]
add ecx, 1
mov dword [ebp - 0x114], ecx
xor edx, edx
test edx, edx
jne 0x4020d7
mov eax, dword [ebp + 0xc]
and eax, 0xffff
add eax, 0x10
push eax
call fcn.00405940
add esp, 4
mov dword [ebp - 0x12c], eax
mov ecx, dword [ebp - 0x12c]
mov dword [ebp - 0x118], ecx
cmp dword [ebp - 0x118], 0
jne 0x402199
mov eax, 0xfffffff8
jmp 0x402320
mov edx, dword [ebp + 0x10]
push edx
mov ax, word [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x134]
mov al, byte [edx + 0x34]
push eax
mov ecx, dword [ebp - 0x118]
push ecx
mov ecx, dword [ebp - 0x134]
call fcn.0040171e
push 0
mov edx, dword [ebp + 0xc]
and edx, 0xffff
add edx, 0x10
push edx
mov eax, dword [ebp - 0x118]
push eax
mov ecx, dword [ebp - 0x134]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp - 0x118]
mov dword [ebp - 0x130], eax
mov ecx, dword [ebp - 0x130]
push ecx
call fcn.00405935
add esp, 4
cmp dword [ebp - 0x11c], 0xffffffff
jne 0x402219
or eax, 0xffffffff
jmp 0x402320
mov edx, dword [ebp - 0x134]
add edx, 0x18
push edx
push 0
push 0
lea eax, [ebp - 0x114]
push eax
mov ecx, dword [ebp - 0x134]
mov edx, dword [ecx]
add edx, 1
push edx
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x40224e
mov eax, 0xfffffffe
jmp 0x402320
push 0
push 0xc
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x134]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 0xc
je 0x40227e
mov eax, 0xfffffffa
jmp 0x402320
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x120]
push ecx
lea edx, [ebp - 0x10]
push edx
mov ecx, dword [ebp - 0x134]
call fcn.00401a14
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 1
jne 0x4022d4
mov eax, dword [ebp - 4]
and eax, 0xff
test eax, eax
jne 0x4022d4
mov ecx, dword [ebp - 0x134]
xor edx, edx
mov dl, byte [ecx + 0x34]
mov eax, dword [ebp - 0x120]
and eax, 0xff
cmp edx, eax
jne 0x4022d4
mov eax, 1
jmp 0x402320
cmp dword [ebp - 0x11c], 1
jne 0x40231b
mov ecx, dword [ebp - 4]
and ecx, 0xff
test ecx, ecx
je 0x40231b
lea edx, [ebp - 0x128]
push edx
mov ecx, dword [ebp - 0x134]
call fcn.004039e1
mov dword [ebp - 0x11c], eax
cmp dword [ebp - 0x11c], 1
jne 0x402313
mov eax, dword [ebp - 0x128]
jmp 0x402320
mov eax, dword [ebp - 0x11c]
jmp 0x402320
mov eax, 0xfffffffa
mov esp, ebp
pop ebp
ret 0xc