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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x128
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov ebx, dword [sym.imp.WS2_32.dll_htonl]
xor esi, esi
mov dword [esp + 0x30], esi
mov eax, dword [ebp]
mov edi, dword [ebp + 4]
add esi, 1
cmp dword [eax + 0x34], 0x34
mov dword [esp + 0x24], esi
jle 0x406120
mov eax, dword [eax + 0x14]
push eax
call fcn.00405240
add esp, 4
push accept
mov esi, eax
call ebx
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
mov cl, 0x20
call fcn.0040aa90
push eax
call ebx
mov dword [edi + 0x10], eax
mov ecx, dword [esi + 0x18]
push ecx
call ebx
fnstcw word [esp + 0x16]
mov dword [edi + 0x14], eax
fld qword [esi + 0x30]
movzx eax, word [esp + 0x16]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov edx, dword [esp + 0x18]
push edx
fldcw word [esp + 0x1a]
call ebx
mov dword [edi + 0x18], eax
fld qword [esi + 0x30]
call fcn.004098e0
fnstcw word [esp + 0x16]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
movzx eax, word [esp + 0x16]
or eax, 0xc00
mov dword [esp + 0x18], eax
fsubr qword [esi + 0x30]
fmul qword [0x41d2b8]
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov eax, dword [esp + 0x18]
push eax
fldcw word [esp + 0x1a]
call ebx
mov dword [edi + 0x1c], eax
mov ecx, dword [esi + 0xc]
push ecx
call ebx
mov dword [edi + 0x20], eax
mov edx, dword [esi + 0x10]
push edx
call ebx
mov dword [edi + 0x24], eax
mov eax, dword [esi + 0x14]
push eax
call ebx
fnstcw word [esp + 0x16]
mov dword [edi + 0x28], eax
fld qword [esi + 0x20]
movzx eax, word [esp + 0x16]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov ecx, dword [esp + 0x18]
push ecx
fldcw word [esp + 0x1a]
call ebx
mov dword [edi + 0x2c], eax
fld qword [esi + 0x20]
call fcn.004098e0
fnstcw word [esp + 0x16]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
movzx eax, word [esp + 0x16]
or eax, 0xc00
fsubr qword [esi + 0x20]
fmul qword [0x41d2b8]
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov edx, dword [esp + 0x18]
push edx
fldcw word [esp + 0x1a]
call ebx
mov esi, dword [esp + 0x24]
mov dword [edi + 0x30], eax
mov eax, dword [ebp]
mov ecx, dword [eax + 0x34]
mov edx, dword [ebp + 4]
mov eax, dword [eax + 0x2c]
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ecx, dword [esp + 0x30]
xor eax, eax
test ecx, ecx
jbe 0x406154
mov edx, dword [ebp]
mov edx, dword [edx + 0x2c]
cmp dword [esp + eax*4 + 0x34], edx
je 0x406154
add eax, 1
cmp eax, ecx
jb 0x406147
cmp eax, ecx
jne 0x40616c
cmp ecx, 0x40
jae 0x40616c
mov ecx, dword [ebp]
mov edx, dword [ecx + 0x2c]
mov dword [esp + eax*4 + 0x34], edx
add dword [esp + 0x30], 1
mov edx, dword [ebp]
lea eax, [esp + 0x28]
push eax
push 0
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], 0
mov eax, dword [edx + 0x2c]
push 0
lea ecx, [esp + 0x3c]
push ecx
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x4061c1
push 0xd7
push 0x41f470
push str.select
call fcn.00401b20
mov ecx, dword [ebp]
push ecx
call fcn.004096f0
add esp, 0x10
jmp 0x4061c5
test eax, eax
je 0x406224
mov eax, dword [ebp]
mov edx, dword [eax + 0x34]
mov ecx, dword [ebp + 4]
push 0
push edx
mov edx, dword [eax + 0x2c]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
test edi, edi
jge 0x4061fb
push 0xdf
push 0x41f470
push str.read
call fcn.00401b20
add esp, 0xc
test edi, edi
jle 0x406224
cmp esi, 0xa
jl 0x405fde
mov eax, dword [ebp]
mov ecx, dword [eax + 0x2c]
push esi
push ecx
push str.__3d__WARNING:_ack_of_last_datagram_failed_after__d_tries._n
call fcn.00409f74
add eax, 0x40
push eax
call fcn.00409e25
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret