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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x221c
call fcn.0040c360
or dword [ebp - 8], 0xffffffff
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_time]
push esi
xor esi, esi
push edi
push esi
call ebx
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x114], esi
push eax
lea eax, [ebp - 0x114]
push eax
mov dword [ebp - 0x218], esi
push dword [edi + 0xc]
call fcn.00401f36
mov esi, dword [edi]
add esp, 0x10
test esi, esi
je 0x401982
mov eax, dword [esi]
test byte [esi + 0x54], 0x88
mov dword [ebp + 8], eax
jne 0x401922
lea eax, [ebp - 4]
push eax
push 0
push esi
call fcn.00401af3
add esp, 0xc
test byte [esi + 0x54], 0x40
jne 0x40193e
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x114]
push eax
push dword [esi + 0x10]
call fcn.00401f36
add esp, 0xc
mov eax, dword [esi + 0x54]
mov ecx, eax
and ecx, 8
je 0x40194c
test al, 0x20
je 0x40195a
cmp dword [esi + 0x34], 0
jbe 0x401970
test ecx, ecx
jne 0x401970
test al, 2
jne 0x401970
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x218]
push eax
push dword [esi + 0x10]
call fcn.00401f36
add esp, 0xc
test byte [esi + 0x54], 0x10
je 0x40197d
push esi
call fcn.00401c63
pop ecx
mov esi, dword [ebp + 8]
jmp 0x401904
mov eax, dword [ebp + 0xc]
mov ecx, 0x3e8
cdq
mov esi, ecx
idiv esi
xor esi, esi
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
cdq
idiv ecx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x218]
push esi
push eax
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebp - 8]
imul edx, edx, 0x3e8
inc eax
mov dword [ebp - 0xc], edx
push eax
call sub.WS2_32.dll_select
test eax, eax
jle 0x401ac6
push esi
call ebx
mov dword [ebp - 4], eax
mov eax, dword [edi + 0xc]
cmp eax, 0xffffffff
pop ecx
je 0x401a48
lea ecx, [ebp - 0x114]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x401a48
push esi
lea eax, [ebp - 0x221c]
push 0x2004
push eax
push dword [edi + 0xc]
call sub.WS2_32.dll_recv
mov ebx, eax
push esi
lea eax, [ebp - 0x2218]
push 1
push eax
push dword [edi + 0xc]
call sub.WS2_32.dll_send
cmp ebx, 4
jl 0x401a48
cmp dword [ebp - 0x221c], esi
je 0x401a48
push esi
push edi
call fcn.00402087
pop ecx
pop ecx
mov ebx, eax
cmp ebx, esi
je 0x401a48
lea eax, [ebp - 0x2218]
push eax
push esi
push ebx
call dword [ebp - 0x221c]
push ebx
push edi
call fcn.00402087
add esp, 0x14
jmp 0x401a27
mov esi, dword [edi]
test esi, esi
je 0x401ac4
mov ebx, dword [esi]
lea eax, [ebp - 0x114]
push eax
push dword [esi + 0x10]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x401a8b
mov eax, dword [esi + 0x54]
test al, 0x80
je 0x401a7e
test ah, 1
push esi
je 0x401a77
call fcn.00401ea1
jmp 0x401a8a
call fcn.00401cd7
jmp 0x401a8a
mov eax, dword [ebp - 4]
push esi
mov dword [esi + 0x4c], eax
call fcn.00401d42
pop ecx
lea eax, [ebp - 0x218]
push eax
push dword [esi + 0x10]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x401abe
mov eax, dword [esi + 0x54]
test al, 8
je 0x401aad
push esi
call fcn.00401d42
jmp 0x401abd
test al, 2
jne 0x401abe
mov eax, dword [ebp - 4]
push esi
mov dword [esi + 0x4c], eax
call fcn.00401e4a
pop ecx
test ebx, ebx
mov esi, ebx
jne 0x401a4e
xor esi, esi
mov edi, dword [edi]
cmp edi, esi
je 0x401aeb
mov eax, dword [edi + 0x54]
mov ebx, dword [edi]
test al, 0x10
jne 0x401ade
cmp dword [edi + 0x34], esi
jne 0x401ae5
test al, 1
je 0x401ae5
push edi
call fcn.00401c63
pop ecx
cmp ebx, esi
mov edi, ebx
jne 0x401acc
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret