Function at 0x4b4872
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x350
mov eax, dword [0x5cb074]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
xorps xmm0, xmm0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x328], ecx
mov dword [ebp - 0x324], ebx
movlpd qword [ebp - 0x340], xmm0
mov dword [ebp - 0x338], edi
mov dword [ebp - 0x320], edi
test ecx, ecx
je 0x4b48cb
mov edx, dword [ebp + 0xc]
mov eax, edi
test edx, edx
je 0x4b48cb
cmp dword [ecx + eax*8], 0xffffffff
jne 0x4b48e3
inc eax
cmp eax, edx
jb 0x4b48c0
push ebx
call fcn.004b4f8f
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0049fa97
mov esp, ebp
pop ebp
ret
test ebx, ebx
jle 0x4b4908
lea eax, [ebp - 0x350]
mov dword [ebp - 0x320], ebx
push eax
call fcn.004b7acc
mov esi, eax
lea edi, [ebp - 0x340]
pop ecx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edi, edi
mov ebx, dword [ebp - 0x328]
xor ecx, ecx
or eax, 0xffffffff
mov dword [ebp - 0x20c], edi
mov esi, edi
mov dword [ebp - 0x310], ecx
xor edx, edx
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x318], eax
mov dword [ebp - 0x314], edx
xor eax, eax
cmp dword [ebx + edx*8], 0xffffffff
mov word [ebx + edx*8 + 6], ax
je 0x4b4a30
movzx eax, word [ebx + edx*8 + 4]
mov dword [ebp - 0x31c], eax
test eax, 0x710
mov eax, dword [ebx + edx*8]
je 0x4b4a30
mov edx, dword [ebp - 0x318]
cmp eax, edx
cmova edx, eax
mov dword [ebp - 0x318], edx
mov edx, dword [ebp - 0x31c]
test edx, 0x300
je 0x4b49b5
xor edx, edx
test esi, esi
je 0x4b4992
cmp dword [ebp + edx*4 - 0x104], eax
je 0x4b4992
inc edx
cmp edx, esi
jb 0x4b4984
cmp edx, esi
jne 0x4b49af
cmp esi, 0x40
jae 0x4b49af
mov dword [ebp + edx*4 - 0x104], eax
mov esi, dword [ebp - 0x108]
inc esi
mov dword [ebp - 0x108], esi
mov edx, dword [ebp - 0x31c]
test dl, 0x10
je 0x4b49f1
xor edx, edx
test edi, edi
je 0x4b49ce
cmp dword [ebp + edx*4 - 0x208], eax
je 0x4b49ce
inc edx
cmp edx, edi
jb 0x4b49c0
cmp edx, edi
jne 0x4b49eb
cmp edi, 0x40
jae 0x4b49eb
mov dword [ebp + edx*4 - 0x208], eax
mov edi, dword [ebp - 0x20c]
inc edi
mov dword [ebp - 0x20c], edi
mov edx, dword [ebp - 0x31c]
test edx, 0x600
je 0x4b4a2a
xor edx, edx
test ecx, ecx
je 0x4b4a0d
cmp dword [ebp + edx*4 - 0x30c], eax
je 0x4b4a0d
inc edx
cmp edx, ecx
jb 0x4b49ff
cmp edx, ecx
jne 0x4b4a2a
cmp ecx, 0x40
jae 0x4b4a2a
mov dword [ebp + edx*4 - 0x30c], eax
mov ecx, dword [ebp - 0x310]
inc ecx
mov dword [ebp - 0x310], ecx
mov edx, dword [ebp - 0x314]
inc edx
mov dword [ebp - 0x314], edx
cmp edx, dword [ebp + 0xc]
jb 0x4b4935
mov ebx, dword [ebp - 0x324]
test esi, esi
jne 0x4b4a56
test edi, edi
jne 0x4b4a56
test ecx, ecx
je 0x4b48cb
xor edx, edx
lea eax, [ebp - 0x330]
test ebx, ebx
cmovs eax, edx
mov dword [ebp - 0x314], eax
mov eax, dword [ebp - 0x318]
inc eax
mov dword [ebp - 0x318], eax
test ebx, ebx
jle 0x4b4aa5
mov eax, dword [ebp - 0x320]
cdq
mov dword [ebp - 0x324], 0x3e8
idiv dword [ebp - 0x324]
mov dword [ebp - 0x330], eax
imul eax, edx, 0x3e8
mov dword [ebp - 0x32c], eax
jmp 0x4b4ab5
jne 0x4b4ab5
and dword [ebp - 0x330], 0
and dword [ebp - 0x32c], 0
push dword [ebp - 0x314]
xor edx, edx
lea eax, [ebp - 0x310]
test ecx, ecx
cmove eax, edx
xor ecx, ecx
push eax
test edi, edi
lea eax, [ebp - 0x20c]
cmove eax, ecx
test esi, esi
push eax
lea eax, [ebp - 0x108]
cmove eax, ecx
push eax
push dword [ebp - 0x318]
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
jne 0x4b4b6b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x4b4b0e
cmp dword [0x742acc], 0
jne 0x4b4b71
cmp eax, 0x2714
jne 0x4b4b71
test ebx, ebx
jle 0x4b4b4e
lea eax, [ebp - 0x350]
push eax
call fcn.004b7acc
sub esp, 0xc
lea esi, [ebp - 0x340]
mov edi, esp
sub esp, 0x10
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, eax
mov edi, esp
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.004b7b58
mov ecx, ebx
add esp, 0x20
sub ecx, eax
mov dword [ebp - 0x320], ecx
test ecx, ecx
jle 0x4b4b65
mov esi, dword [ebp - 0x108]
mov edi, dword [ebp - 0x20c]
mov ecx, dword [ebp - 0x310]
jmp 0x4b4a76
xor ebx, ebx
mov eax, ebx
jmp 0x4b4b6d
xor ebx, ebx
test eax, eax
jns 0x4b4b79
or eax, 0xffffffff
jmp 0x4b48d2
jne 0x4b4b82
xor eax, eax
jmp 0x4b48d2
mov esi, dword [ebp - 0x328]
mov edi, ebx
mov eax, dword [ebp + 0xc]
add esi, 6
xor ecx, ecx
cmp dword [esi - 6], 0xffffffff
mov word [esi], cx
je 0x4b4bf1
lea eax, [ebp - 0x108]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4b4bb6
mov eax, 0x300
or word [esi], ax
lea eax, [ebp - 0x20c]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4b4bcd
or word [esi], 0x10
lea eax, [ebp - 0x310]
push eax
push dword [esi - 6]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4b4be8
mov eax, 0x400
or word [esi], ax
mov eax, dword [ebp + 0xc]
cmp word [esi], bx
je 0x4b4bf1
inc edi
add esi, 8
sub eax, 1
mov dword [ebp + 0xc], eax
jne 0x4b4b90
mov eax, edi
jmp 0x4b48d2