Function at 0x4019a0
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x128
push ebx
push ebp
mov ebp, dword [esp + 0x134]
push esi
push edi
mov ebx, eax
lea eax, [esp + 0x28]
push eax
mov ecx, 0x41
mov esi, ebx
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x148]
mov edx, dword [esi]
push 0
push 0
lea ecx, [esp + 0x3c]
push ecx
inc edx
push edx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0xf4240
call dword [sym.imp.WS2_32.dll_select]
mov dword [esp + 0x10], eax
test eax, eax
jg 0x401a18
je 0x401c2a
push str.Error_select_on_socket._n
call fcn.00402be4
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
mov edi, dword [esp + 0x140]
lea eax, [esp + 0x30]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x401a3d
push esi
push edi
push ebp
call fcn.00401730
add esp, 0xc
dec dword [esp + 0x10]
cmp dword [esp + 0x10], 0
je 0x401c2a
mov eax, dword [ebp]
mov edi, dword [sym.imp.WS2_32.dll_ntohl]
test eax, eax
jl 0x401b36
lea ecx, [esp + 0x30]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x401b36
mov eax, dword [ebp]
push 0
push 4
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x401add
mov eax, dword [esp + 0x20]
push eax
call edi
mov ecx, dword [esp + 0x24]
push ecx
mov dword [esp + 0x24], eax
call edi
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x28], eax
call edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
push eax
call edi
mov ecx, dword [esp + 0x14]
push ecx
mov dword [esp + 0x1c], eax
call edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
cmp eax, 0x8000
ja 0x401add
push eax
call fcn.0040286b
add esp, 4
test eax, eax
je 0x401b29
push eax
call fcn.0040278e
add esp, 4
jmp 0x401b29
mov edx, dword [ebp]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebx]
xor eax, eax
test edx, edx
jbe 0x401b22
mov esi, dword [ebp]
lea ecx, [ebx + 4]
cmp dword [ecx], esi
je 0x401b03
inc eax
add ecx, 4
cmp eax, edx
jb 0x401af5
jmp 0x401b22
dec edx
cmp eax, edx
jae 0x401b20
lea ecx, [ebx + eax*4 + 4]
lea esp, [esp]
mov edx, dword [ecx + 4]
mov dword [ecx], edx
mov edx, dword [ebx]
inc eax
dec edx
add ecx, 4
cmp eax, edx
jb 0x401b10
dec dword [ebx]
mov dword [ebp], 0xffffffff
mov eax, dword [esp + 0x10]
add eax, 0xffffffff
je 0x401c2a
mov eax, dword [ebp + 4]
test eax, eax
jl 0x401c2a
lea ecx, [esp + 0x30]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x401c2a
mov eax, dword [ebp + 4]
push 0
push 4
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x401bd0
mov eax, dword [esp + 0x20]
push eax
call edi
mov ecx, dword [esp + 0x24]
push ecx
mov dword [esp + 0x24], eax
call edi
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x28], eax
call edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
push eax
call edi
mov ecx, dword [esp + 0x14]
push ecx
mov dword [esp + 0x1c], eax
call edi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
cmp eax, 0x8000
ja 0x401bd0
push eax
call fcn.0040286b
add esp, 4
test eax, eax
je 0x401c2a
push eax
call fcn.0040278e
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
mov edx, dword [ebp + 4]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebx]
xor eax, eax
test edx, edx
jbe 0x401c23
mov esi, dword [ebp + 4]
lea ecx, [ebx + 4]
cmp dword [ecx], esi
je 0x401c08
inc eax
add ecx, 4
cmp eax, edx
jb 0x401be8
mov dword [ebp + 4], 0xffffffff
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret
dec edx
cmp eax, edx
jae 0x401c21
lea ecx, [ebx + eax*4 + 4]
mov edx, dword [ecx + 4]
mov dword [ecx], edx
mov edx, dword [ebx]
inc eax
dec edx
add ecx, 4
cmp eax, edx
jb 0x401c11
dec dword [ebx]
mov dword [ebp + 4], 0xffffffff
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret