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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x25c
mov dword [esp], 0x4000
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [esp + 0x3c], eax
je 0x411a17
mov edx, dword [esp + 0x270]
mov eax, dword [esp + 0x274]
cmp eax, edx
jge 0x4117a6
mov eax, edx
inc eax
lea edi, [esp + 0x14c]
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x274]
mov eax, dword [esp + 0x270]
mov dword [esp + 0x40], 0x1e
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 1
cmp edx, eax
mov dword [esp + 0x4c], edx
jne 0x4119ef
cmp edx, eax
mov dword [esp + 0x150], edx
mov dword [esp + 0x14c], 1
jne 0x411a00
lea eax, [esp + 0x40]
lea ebp, [esp + 0x48]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], ebp
mov dword [esp], eax
call sub.WS2_32.dll_select
sub esp, 0x14
test eax, eax
je 0x4117b2
jns 0x41185e
lea eax, [esp + 0x3c]
mov dword [esp], eax
call fcn.00407f59
lea eax, [esp + 0x270]
mov dword [esp], eax
call fcn.00405999
lea eax, [esp + 0x274]
mov dword [esp], eax
call fcn.00405999
jmp 0x411a17
mov eax, dword [esp + 0x270]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push esi
push esi
jne 0x41182f
mov eax, dword [esp + 0x274]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push ebx
push ebx
jne 0x41182f
mov eax, dword [esp + 0x274]
mov dword [esp + 4], ebp
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push ecx
push ecx
jne 0x4118cb
mov eax, dword [esp + 0x270]
mov dword [esp + 4], ebp
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push edx
push edx
je 0x4117b2
jmp 0x41195d
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4000
mov dword [esp + 4], eax
mov eax, dword [esp + 0x274]
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
test eax, eax
mov ebx, eax
jle 0x41182f
xor esi, esi
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
add eax, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x270]
mov dword [esp], eax
call sub.WS2_32.dll_send
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x411948
call fcn.004051b0
cmp eax, 0x2733
jne 0x411950
mov dword [esp], 1
call fcn.00407ef4
jmp 0x41194c
sub ebx, eax
add esi, eax
cmp esi, ebx
jl 0x411901
test ebx, ebx
je 0x4118a9
jmp 0x41182f
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4000
mov dword [esp + 4], eax
mov eax, dword [esp + 0x270]
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
test eax, eax
mov ebx, eax
jle 0x41182f
xor esi, esi
mov eax, dword [esp + 0x3c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], ebx
add eax, esi
mov dword [esp + 4], eax
mov eax, dword [esp + 0x274]
mov dword [esp], eax
call sub.WS2_32.dll_send
sub esp, 0x10
cmp eax, 0xffffffff
jne 0x4119da
call fcn.004051b0
cmp eax, 0x2733
jne 0x4119e2
mov dword [esp], 1
call fcn.00407ef4
jmp 0x4119de
sub ebx, eax
add esi, eax
cmp ebx, esi
jg 0x411993
test ebx, ebx
je 0x4117b2
jmp 0x41182f
mov dword [esp + 0x50], eax
mov dword [esp + 0x48], 2
jmp 0x4117e4
mov dword [esp + 0x154], eax
mov dword [esp + 0x14c], 2
jmp 0x4117fe
add esp, 0x25c
pop ebx
pop esi
pop edi
pop ebp
ret