Function at 0x493480
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3030
call fcn.004739d0
mov eax, dword [0x4fb128]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x3014], ecx
mov dword [ebp - 0x3018], ebx
mov dword [ebp - 0x301c], 0xffffffff
jne 0x493500
mov ecx, dword [ebp + 0x18]
mov dword [ebx], 0
test ecx, ecx
jl 0x4934ed
mov eax, dword [ebp + 0x14]
jg 0x4934d0
test eax, eax
je 0x4934ed
push ecx
push eax
call fcn.0048b710
mov eax, 0x11177
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047232c
mov esp, ebp
pop ebp
ret 0x14
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047232c
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x14]
test eax, eax
jg 0x49351d
jl 0x493511
test esi, esi
jae 0x49351d
mov dword [ebp - 0x3024], 0
jmp 0x493551
push 0
push 0xf4240
push eax
push esi
call fcn.00474320
mov ecx, dword [ebp - 0x3014]
mov dword [ebp - 0x3030], eax
imul eax, eax, 0xf4240
sub esi, eax
lea eax, [ebp - 0x3030]
mov dword [ebp - 0x302c], esi
mov dword [ebp - 0x3024], eax
xor eax, eax
push edi
xor esi, esi
xor edi, edi
xor edx, edx
mov dword [ebp - 0x200c], esi
mov dword [ebp - 0x3010], edi
mov dword [ebp - 0x1008], edx
mov dword [ebp - 0x3028], eax
cmp dword [ebp + 0xc], eax
jle 0x4936b0
lea ebx, [ecx + 8]
mov dword [ebp - 0x3020], ebx
xor ecx, ecx
cmp dword [ebx - 4], 1
mov word [ebx + 2], cx
jne 0x493696
mov eax, dword [ebx + 4]
movzx ebx, word [ebx]
mov ecx, dword [eax + 4]
test bl, 1
je 0x4935de
xor eax, eax
test esi, esi
je 0x4935be
jmp 0x4935b0
cmp dword [ebp + eax*4 - 0x2008], ecx
je 0x4935be
inc eax
cmp eax, esi
jb 0x4935b0
cmp eax, esi
jne 0x4935de
cmp esi, 0x400
jae 0x4935de
mov dword [ebp + eax*4 - 0x2008], ecx
mov esi, dword [ebp - 0x200c]
inc esi
mov dword [ebp - 0x200c], esi
test bl, 4
je 0x49361e
xor eax, eax
test edi, edi
je 0x4935fe
lea esp, [esp]
cmp dword [ebp + eax*4 - 0x300c], ecx
je 0x4935fe
inc eax
cmp eax, edi
jb 0x4935f0
cmp eax, edi
jne 0x49361e
cmp edi, 0x400
jae 0x49361e
mov dword [ebp + eax*4 - 0x300c], ecx
mov edi, dword [ebp - 0x3010]
inc edi
mov dword [ebp - 0x3010], edi
test bl, 0x72
je 0x49365e
xor eax, eax
test edx, edx
je 0x49363e
lea esp, [esp]
cmp dword [ebp + eax*4 - 0x1004], ecx
je 0x49363e
inc eax
cmp eax, edx
jb 0x493630
cmp eax, edx
jne 0x49365e
cmp edx, 0x400
jae 0x49365e
mov dword [ebp + eax*4 - 0x1004], ecx
mov edx, dword [ebp - 0x1008]
inc edx
mov dword [ebp - 0x1008], edx
mov ebx, dword [ebp - 0x301c]
mov eax, dword [ebp - 0x3028]
cmp ecx, ebx
cmovg ebx, ecx
mov dword [ebp - 0x301c], ebx
mov ebx, dword [ebp - 0x3020]
inc eax
add ebx, 0x14
mov dword [ebp - 0x3028], eax
mov dword [ebp - 0x3020], ebx
cmp eax, dword [ebp + 0xc]
jl 0x493584
jmp 0x4936aa
mov ecx, dword [ebp - 0x3014]
lea eax, [eax + eax*4]
cmp dword [ecx + eax*4 + 4], 2
je 0x4937c7
mov ebx, dword [ebp - 0x3018]
push dword [ebp - 0x3024]
lea eax, [ebp - 0x1008]
push eax
lea eax, [ebp - 0x3010]
push eax
lea eax, [ebp - 0x200c]
push eax
mov eax, dword [ebp - 0x301c]
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebx], eax
test eax, eax
jne 0x4936f7
pop edi
pop esi
mov eax, 0x11177
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047232c
mov esp, ebp
pop ebp
ret 0x14
jns 0x493723
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
test eax, eax
je 0x4937a2
call esi
pop edi
pop esi
add eax, 0xafc80
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047232c
mov esp, ebp
pop ebp
ret 0x14
xor edi, edi
mov dword [ebx], 0
cmp dword [ebp + 0xc], edi
jle 0x4937a2
mov esi, dword [ebp - 0x3014]
add esi, 0xa
lea esp, [esp]
cmp dword [esi - 6], 1
jne 0x4937b7
mov eax, dword [esi + 2]
mov ebx, dword [eax + 4]
lea eax, [ebp - 0x200c]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x493761
or word [esi], 1
lea eax, [ebp - 0x3010]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x493776
or word [esi], 4
lea eax, [ebp - 0x1008]
push eax
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x49378b
or word [esi], 0x10
cmp word [esi], 0
je 0x493799
mov ebx, dword [ebp - 0x3018]
inc dword [ebx]
inc edi
add esi, 0x14
cmp edi, dword [ebp + 0xc]
jl 0x493740
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047232c
mov esp, ebp
pop ebp
ret 0x14
mov ecx, dword [ebp - 0x3014]
lea eax, [edi + edi*4]
cmp dword [ecx + eax*4 + 4], 2
jne 0x4937a2
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 9
pop ebx
call fcn.0047232c
mov esp, ebp
pop ebp
ret 0x14