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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
push esi
movzx eax, byte [ebp + 0x10]
test eax, eax
jne 0x41bbbe
mov dword [ebp - 0x118], 0
mov dword [ebp - 8], 5
mov dword [ebp - 4], 0
mov dword [ebp - 0x11c], 0
jmp 0x41bb39
mov ecx, dword [ebp - 0x11c]
add ecx, 1
mov dword [ebp - 0x11c], ecx
mov edx, dword [ebp - 0x11c]
cmp edx, dword [ebp - 0x118]
jae 0x41bb5d
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp + eax*4 - 0x114]
cmp ecx, dword [ebp + 8]
jne 0x41bb5b
jmp 0x41bb5d
jmp 0x41bb2a
mov edx, dword [ebp - 0x11c]
cmp edx, dword [ebp - 0x118]
jne 0x41bb93
cmp dword [ebp - 0x118], 0x40
jae 0x41bb93
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp + 8]
mov dword [ebp + eax*4 - 0x114], ecx
mov edx, dword [ebp - 0x118]
add edx, 1
mov dword [ebp - 0x118], edx
xor eax, eax
jne 0x41bb1e
lea ecx, [ebp - 8]
push ecx
push 0
push 0
lea edx, [ebp - 0x118]
push edx
mov eax, dword [ebp + 8]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x41bbbe
xor eax, eax
jmp 0x41bd5f
call fcn.00409828
mov dword [eax], 0
push 0
push 2
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov word [ebp - 0xc], ax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.00409828
mov dword [eax], esi
call fcn.00409828
cmp dword [eax], 0
je 0x41bbff
xor eax, eax
jmp 0x41bd5f
movzx eax, word [ebp - 0xc]
cmp eax, 2
jne 0x41bd5d
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.0041a120
add esp, 4
movzx edx, ax
movzx eax, word [ebp - 0xc]
add edx, eax
mov word [ebp - 0x124], dx
movzx ecx, word [ebp - 0xc]
movzx edx, word [ebp - 0x124]
cmp ecx, edx
jge 0x41bd57
mov dword [ebp - 0x118], 0
mov dword [ebp - 8], 5
mov dword [ebp - 4], 0
mov dword [ebp - 0x128], 0
jmp 0x41bc6e
mov eax, dword [ebp - 0x128]
add eax, 1
mov dword [ebp - 0x128], eax
mov ecx, dword [ebp - 0x128]
cmp ecx, dword [ebp - 0x118]
jae 0x41bc92
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp + edx*4 - 0x114]
cmp eax, dword [ebp + 8]
jne 0x41bc90
jmp 0x41bc92
jmp 0x41bc5f
mov ecx, dword [ebp - 0x128]
cmp ecx, dword [ebp - 0x118]
jne 0x41bcc8
cmp dword [ebp - 0x118], 0x40
jae 0x41bcc8
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp + 8]
mov dword [ebp + edx*4 - 0x114], eax
mov ecx, dword [ebp - 0x118]
add ecx, 1
mov dword [ebp - 0x118], ecx
xor edx, edx
jne 0x41bc53
movzx eax, word [ebp - 0xc]
add eax, dword [ebp + 0xc]
mov dword [ebp - 0x120], eax
lea ecx, [ebp - 8]
push ecx
push 0
push 0
lea edx, [ebp - 0x118]
push edx
mov eax, dword [ebp + 8]
add eax, 1
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
je 0x41bd4e
call fcn.00409828
mov dword [eax], 0
push 0
movzx ecx, word [ebp - 0x124]
movzx edx, word [ebp - 0xc]
sub ecx, edx
push ecx
mov eax, dword [ebp - 0x120]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
movzx edx, word [ebp - 0xc]
add edx, eax
mov word [ebp - 0xc], dx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
call fcn.00409828
mov dword [eax], esi
call fcn.00409828
cmp dword [eax], 0
je 0x41bd4c
xor eax, eax
jmp 0x41bd5f
jmp 0x41bd52
xor eax, eax
jmp 0x41bd5f
jmp 0x41bc28
mov ax, word [ebp - 0xc]
jmp 0x41bd5f
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret