Function at 0x47a56b
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, ecx
xor eax, eax
and dword [ebp - 0x21c], eax
xor ecx, ecx
push edi
xor edi, edi
mov dword [ebp - 0x224], eax
and dword [ebp - 0x230], eax
lea ebx, [esi + 4]
mov dword [ebp - 0x114], ecx
mov edx, ebx
movzx eax, byte [edx - 4]
and dword [edx + 8], 0
dec eax
je 0x47a6ff
dec eax
je 0x47a65d
dec eax
jne 0x47a82d
mov dword [ebp - 0x220], eax
test ecx, ecx
je 0x47a601
mov eax, dword [edx]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x11c]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x220]
mov ebx, dword [ebp - 0x228]
cmp dword [ebp + eax*4 - 0x110], ebx
je 0x47a5f8
inc eax
cmp eax, ecx
jb 0x47a5ea
mov dword [ebp - 0x220], eax
lea ebx, [esi + 4]
cmp eax, ecx
jne 0x47a62f
cmp ecx, 0x40
jae 0x47a62f
mov eax, dword [edx]
mov ecx, dword [ebp - 0x220]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x11c]
mov dword [ebp + ecx*4 - 0x110], eax
mov ecx, dword [ebp - 0x114]
inc ecx
mov dword [ebp - 0x114], ecx
mov eax, dword [edx]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x228], eax
mov eax, dword [eax + 0x11c]
cmp eax, edi
cmova edi, eax
cmp dword [ebp - 0x224], 0
jne 0x47a7b5
mov eax, dword [ebp - 0x228]
jmp 0x47a6f4
xor eax, eax
mov dword [ebp - 0x220], eax
test ecx, ecx
je 0x47a69d
mov eax, dword [edx]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 0x11c]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x220]
mov ebx, dword [ebp - 0x228]
cmp dword [ebp + eax*4 - 0x110], ebx
je 0x47a694
inc eax
cmp eax, ecx
jb 0x47a686
mov dword [ebp - 0x220], eax
lea ebx, [esi + 4]
cmp eax, ecx
jne 0x47a6cb
cmp ecx, 0x40
jae 0x47a6cb
mov eax, dword [edx]
mov ecx, dword [ebp - 0x220]
mov eax, dword [eax + 0x4c]
mov eax, dword [eax + 0x11c]
mov dword [ebp + ecx*4 - 0x110], eax
mov ecx, dword [ebp - 0x114]
inc ecx
mov dword [ebp - 0x114], ecx
mov eax, dword [edx]
mov eax, dword [eax + 0x4c]
mov dword [ebp - 0x228], eax
mov eax, dword [eax + 0x11c]
cmp eax, edi
cmova edi, eax
cmp dword [ebp - 0x224], 0
jne 0x47a7b5
mov eax, dword [ebp - 0x228]
mov dword [ebp - 0x224], eax
jmp 0x47a7b5
test byte [edx + 4], 1
je 0x47a754
xor eax, eax
mov dword [ebp - 0x220], eax
test ecx, ecx
je 0x47a72a
mov ebx, dword [edx]
cmp dword [ebp + eax*4 - 0x110], ebx
je 0x47a721
inc eax
cmp eax, ecx
jb 0x47a713
mov dword [ebp - 0x220], eax
lea ebx, [esi + 4]
cmp eax, ecx
jne 0x47a74f
cmp ecx, 0x40
jae 0x47a74f
mov ecx, dword [ebp - 0x220]
mov eax, dword [edx]
mov dword [ebp + ecx*4 - 0x110], eax
mov ecx, dword [ebp - 0x114]
inc ecx
mov dword [ebp - 0x114], ecx
cmp dword [edx], edi
cmova edi, dword [edx]
test byte [edx + 4], 4
je 0x47a7b5
xor eax, eax
mov dword [ebp - 0x220], eax
cmp eax, dword [ebp - 0x21c]
jae 0x47a78d
mov ebx, dword [edx]
cmp dword [ebp + eax*4 - 0x218], ebx
je 0x47a77e
inc eax
cmp eax, dword [ebp - 0x21c]
jb 0x47a76c
cmp eax, dword [ebp - 0x21c]
lea ebx, [esi + 4]
mov dword [ebp - 0x220], eax
jne 0x47a7b0
cmp dword [ebp - 0x21c], 0x40
jae 0x47a7b0
mov ebx, dword [ebp - 0x220]
mov eax, dword [edx]
mov dword [ebp + ebx*4 - 0x218], eax
lea ebx, [esi + 4]
inc dword [ebp - 0x21c]
cmp dword [edx], edi
cmova edi, dword [edx]
mov eax, dword [ebp - 0x230]
add edx, 0x10
inc eax
mov dword [ebp - 0x230], eax
cmp eax, 1
jb 0x47a5a6
and dword [ebp - 0x224], 0
mov edx, dword [esi + 0xc]
push 0xa
pop eax
cmp dword [esi + 8], edx
je 0x47a8cb
movzx eax, byte [esi]
dec eax
dec eax
je 0x47a853
dec eax
jne 0x47a8c8
test byte [esi + 8], 1
je 0x47a80c
test dl, 1
jne 0x47a80c
mov eax, dword [ebx]
xor ecx, ecx
cmp dword [eax + 0x1c], ecx
setne cl
or ecx, edx
mov dword [esi + 0xc], ecx
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
cmp dword [eax + 0x120], 0xffffffff
push 0xa
pop eax
jne 0x47a8cb
or dword [esi + 0xc], 0x90
jmp 0x47a8cb
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x47a84b
mov dword [eax + 0x12c], str.Invalid_descriptor_passed_to_libssh2_poll__
mov dword [eax + 0x130], 0xffffffdd
or eax, 0xffffffff
jmp 0x47a9c6
test byte [esi + 8], 1
je 0x47a870
test dl, 1
jne 0x47a870
mov ecx, dword [ebx]
xor edx, edx
call fcn.0047a50a
neg eax
sbb eax, eax
neg eax
or dword [esi + 0xc], eax
test byte [esi + 8], 2
je 0x47a890
test byte [esi + 0xc], 2
jne 0x47a890
mov ecx, dword [ebx]
xor edx, edx
inc edx
call fcn.0047a50a
neg eax
sbb eax, eax
and eax, 2
or dword [esi + 0xc], eax
test byte [esi + 8], 4
je 0x47a8ab
test byte [esi + 0xc], 4
jne 0x47a8ab
mov eax, dword [ebx]
mov eax, dword [eax + 0x24]
neg eax
sbb eax, eax
and eax, 4
or dword [esi + 0xc], eax
mov eax, dword [ebx]
cmp byte [eax + 0x40], 0
jne 0x47a8b9
cmp byte [eax + 0x2c], 0
je 0x47a8c0
or dword [esi + 0xc], 0x80
mov eax, dword [eax + 0x4c]
jmp 0x47a811
push 0xa
pop eax
cmp dword [esi + 0xc], 0
je 0x47a8dd
mov dword [ebp - 0x224], 1
xor eax, eax
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [ebp - 0x22c], eax
imul eax, edx, 0x3e8
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x22c]
push eax
push 0
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x114]
push eax
lea eax, [edi + 1]
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x47a9c0
movzx eax, byte [esi]
dec eax
je 0x47a988
dec eax
je 0x47a95c
dec eax
jne 0x47a9c0
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
push dword [eax + 0x11c]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x47a9c0
mov ecx, dword [ebx]
mov ecx, dword [ecx + 0xc]
call fcn.0047cdbf
test eax, eax
jg 0x47a94c
jmp 0x47a9c0
lea eax, [ebp - 0x114]
push eax
mov eax, dword [ebx]
mov eax, dword [eax + 0x4c]
push dword [eax + 0x11c]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x47a9c0
mov ecx, dword [ebx]
mov ecx, dword [ecx + 0x4c]
call fcn.0047cdbf
test eax, eax
jg 0x47a978
jmp 0x47a9c0
mov edi, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
lea eax, [ebp - 0x114]
push eax
push dword [ebx]
call edi
test eax, eax
je 0x47a9a1
or dword [esi + 0xc], 1
lea eax, [ebp - 0x21c]
push eax
push dword [ebx]
call edi
test eax, eax
je 0x47a9b4
or dword [esi + 0xc], 4
cmp dword [esi + 0xc], 0
je 0x47a9c0
inc dword [ebp - 0x224]
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401000
mov esp, ebp
pop ebp
ret