Function at 0x474e50
Capabilities:
Get socket status

Disassembly:
mov eax, 0x301c
call fcn.0042b9c0
push ebx
push ebp
mov ebp, dword [esp + 0x302c]
push esi
cmp ebp, 0xffffffff
push edi
jne 0x474e8e
cmp dword [esp + 0x3038], ebp
jne 0x474e8e
mov eax, dword [esp + 0x303c]
push eax
call fcn.004750f0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x301c
ret
mov ebx, dword [esp + 0x303c]
mov esi, ebx
call fcn.00469d60
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
xor eax, eax
xor ecx, ecx
xor edi, edi
cmp ebp, 0xffffffff
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1024], eax
je 0x474ed7
mov ecx, 1
mov dword [esp + 0x1028], ebp
mov dword [esp + 0x1024], ecx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ecx
mov edi, ebp
mov edx, dword [esp + 0x3038]
mov dword [esp + 0x2028], eax
cmp edx, 0xffffffff
je 0x474f46
xor eax, eax
mov dword [esp + 0x202c], edx
test ecx, ecx
mov dword [esp + 0x2028], 1
jbe 0x474f27
lea edx, [esp + 0x24]
mov ebp, dword [esp + 0x3038]
cmp dword [edx], ebp
je 0x474f19
inc eax
add edx, 4
cmp eax, ecx
jb 0x474f06
mov ebp, dword [esp + 0x3034]
mov edx, dword [esp + 0x3038]
cmp eax, ecx
jne 0x474f40
cmp ecx, 0x400
jae 0x474f40
mov dword [esp + eax*4 + 0x24], edx
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
cmp edx, edi
jbe 0x474f46
mov edi, edx
xor ecx, ecx
lea edx, [esp + 0x18]
test ebx, ebx
setl cl
dec ecx
and ecx, edx
je 0x474f99
mov eax, 0x10624dd3
mov dword [esp + 0x18], 1
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jg 0x474f78
mov dword [esp + 0x18], edx
mov eax, esi
mov ebp, 0x3e8
cdq
idiv ebp
mov ebp, dword [esp + 0x3034]
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 3
mov dword [esp + 0x1c], edx
push ecx
lea eax, [esp + 0x24]
lea ecx, [esp + 0x202c]
push eax
lea edx, [esp + 0x102c]
push ecx
inc edi
push edx
push edi
call dword [sym.imp.WSOCK32.dll_select]
test eax, eax
jne 0x475007
test ebx, ebx
jl 0x474fe4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.00469d60
push edx
push eax
call fcn.00469d80
mov esi, ebx
add esp, 0x10
sub esi, eax
test esi, esi
jle 0x475066
mov eax, dword [esp + 0x3030]
test eax, eax
je 0x474ea4
mov edx, eax
push edx
call fcn.0046a080
add esp, 4
test eax, eax
jne 0x475066
jmp 0x474ea4
cmp eax, 0xffffffff
jne 0x475052
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
test eax, eax
je 0x475056
cmp eax, 0x2726
je 0x475056
cmp eax, 0x2719
je 0x475056
test ebx, ebx
jl 0x474ea4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.00469d60
push edx
push eax
call fcn.00469d80
mov esi, ebx
add esp, 0x10
sub esi, eax
test esi, esi
jle 0x475056
jmp 0x474ea4
test eax, eax
jge 0x475064
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x301c
ret
jne 0x475073
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x301c
ret
xor esi, esi
cmp ebp, 0xffffffff
je 0x4750a3
lea edx, [esp + 0x1024]
push edx
push ebp
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x475091
mov esi, 1
lea eax, [esp + 0x20]
push eax
push ebp
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4750a3
or esi, 4
mov edi, dword [esp + 0x3038]
cmp edi, 0xffffffff
je 0x4750d6
lea ecx, [esp + 0x2028]
push ecx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4750c4
or esi, 2
lea edx, [esp + 0x20]
push edx
push edi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4750d6
or esi, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x301c
ret