Function at 0x140099fa8
Capabilities:
Get socket status

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rsp - 0x370]
sub rsp, 0x470
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x360], rax
xor edx, edx
xor r10d, r10d
lea rsi, [rcx + 8]
xor r11d, r11d
xor edi, edi
mov rbx, rcx
mov r8, rsi
mov dword [rsp + 0x40], edx
mov dword [rbp + 0x150], r10d
xor r14d, r14d
movzx ecx, byte [r8 - 8]
and dword [r8 + 0xc], 0
dec ecx
je 0x14009a0df
dec ecx
je 0x14009a06e
dec ecx
jne 0x14009a1de
xor r9d, r9d
test edx, edx
je 0x14009a03e
mov rax, qword [r8]
mov rcx, qword [rax + 0x18]
mov rcx, qword [rcx + 0x200]
cmp qword [rsp + r9*8 + 0x48], rcx
je 0x14009a03e
inc r9d
cmp r9d, edx
jb 0x14009a02f
cmp r9d, edx
jne 0x14009a065
cmp edx, 0x40
jae 0x14009a065
mov rax, qword [r8]
mov rax, qword [rax + 0x18]
mov rax, qword [rax + 0x200]
mov qword [rsp + r9*8 + 0x48], rax
mov edx, dword [rsp + 0x40]
inc edx
mov dword [rsp + 0x40], edx
mov rax, qword [r8]
mov rcx, qword [rax + 0x18]
jmp 0x14009a0c0
xor r9d, r9d
test edx, edx
je 0x14009a092
mov rax, qword [r8]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x200]
cmp qword [rsp + r9*8 + 0x48], rcx
je 0x14009a092
inc r9d
cmp r9d, edx
jb 0x14009a083
cmp r9d, edx
jne 0x14009a0b9
cmp edx, 0x40
jae 0x14009a0b9
mov rax, qword [r8]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x200]
mov qword [rsp + r9*8 + 0x48], rax
mov edx, dword [rsp + 0x40]
inc edx
mov dword [rsp + 0x40], edx
mov rax, qword [r8]
mov rcx, qword [rax + 0x60]
mov rax, qword [rcx + 0x200]
cmp rax, rdi
cmova rdi, rax
test r11, r11
jne 0x14009a17a
mov r11, rcx
jmp 0x14009a17a
test byte [r8 + 8], 1
je 0x14009a125
xor r9d, r9d
test edx, edx
je 0x14009a0ff
movsxd rcx, dword [r8]
cmp qword [rsp + r9*8 + 0x48], rcx
je 0x14009a0ff
inc r9d
cmp r9d, edx
jb 0x14009a0f0
cmp r9d, edx
jne 0x14009a11b
cmp edx, 0x40
jae 0x14009a11b
movsxd rcx, dword [r8]
mov qword [rsp + r9*8 + 0x48], rcx
mov edx, dword [rsp + 0x40]
inc edx
mov dword [rsp + 0x40], edx
movsxd rax, dword [r8]
cmp rax, rdi
cmova rdi, rax
test byte [r8 + 8], 4
je 0x14009a17a
xor r9d, r9d
test r10d, r10d
je 0x14009a149
movsxd rcx, dword [r8]
cmp qword [rbp + r9*8 + 0x158], rcx
je 0x14009a149
inc r9d
cmp r9d, r10d
jb 0x14009a137
cmp r9d, r10d
jne 0x14009a170
cmp r10d, 0x40
jae 0x14009a170
movsxd rcx, dword [r8]
mov qword [rbp + r9*8 + 0x158], rcx
mov r10d, dword [rbp + 0x150]
inc r10d
mov dword [rbp + 0x150], r10d
movsxd rax, dword [r8]
cmp rax, rdi
cmova rdi, rax
inc r14d
add r8, 0x18
cmp r14d, 1
jb 0x140099ffc
mov r14d, dword [rbx + 0x10]
xor r12d, r12d
mov r13d, 0xa
cmp r14d, dword [rbx + 0x14]
je 0x14009a28b
movzx ecx, byte [rbx]
sub ecx, 2
je 0x14009a204
dec ecx
jne 0x14009a28b
test r14b, 1
je 0x14009a1cb
test byte [rbx + 0x14], 1
jne 0x14009a1cb
mov rax, qword [rsi]
cmp qword [rax + 0x38], rcx
setne cl
or dword [rbx + 0x14], ecx
mov rax, qword [rsi]
mov rcx, qword [rax + 0x18]
cmp dword [rcx + 0x208], 0xffffffff
jmp 0x14009a282
test r11, r11
je 0x14009a1fc
lea rax, str.Invalid_descriptor_passed_to_libssh2_poll__
mov dword [r11 + 0x220], 0xffffffdd
mov qword [r11 + 0x218], rax
or eax, 0xffffffff
jmp 0x14009a399
test r14b, 1
je 0x14009a224
test byte [rbx + 0x14], 1
jne 0x14009a224
mov rcx, qword [rsi]
xor edx, edx
call fcn.140099f2c
xor ecx, ecx
test eax, eax
setne cl
or dword [rbx + 0x14], ecx
test r14b, 2
je 0x14009a247
test byte [rbx + 0x14], 2
jne 0x14009a247
mov rcx, qword [rsi]
mov edx, 1
call fcn.140099f2c
neg eax
sbb ecx, ecx
and ecx, 2
or dword [rbx + 0x14], ecx
test r14b, 4
je 0x14009a263
test byte [rbx + 0x14], 4
jne 0x14009a263
mov rax, qword [rsi]
mov ecx, dword [rax + 0x38]
neg ecx
sbb eax, eax
and eax, 4
or dword [rbx + 0x14], eax
mov rax, qword [rsi]
cmp byte [rax + 0x54], r12b
jne 0x14009a272
cmp byte [rax + 0x40], r12b
je 0x14009a277
bts dword [rbx + 0x14], 7
mov rax, qword [rax + 0x60]
cmp dword [rax + 0x208], 0xffffffff
jne 0x14009a28b
or dword [rbx + 0x14], 0x90
cmp dword [rbx + 0x14], r12d
je 0x14009a29a
mov r12d, 1
xor r13d, r13d
mov eax, 0x10624dd3
lea ecx, [rdi + 1]
lea r8, [rbp + 0x150]
xor r9d, r9d
imul r13d
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x30], edx
imul eax, edx, 0x3e8
sub r13d, eax
lea rdx, [rsp + 0x40]
imul eax, r13d, 0x3e8
mov dword [rsp + 0x34], eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x14009a396
movzx ecx, byte [rbx]
dec ecx
je 0x14009a35f
dec ecx
je 0x14009a330
dec ecx
jne 0x14009a396
mov rax, qword [rsi]
lea rdx, [rsp + 0x40]
mov rcx, qword [rax + 0x18]
mov rcx, qword [rcx + 0x200]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14009a396
mov rcx, qword [rsi]
mov rcx, qword [rcx + 0x18]
call fcn.14009d384
test eax, eax
jg 0x14009a31e
jmp 0x14009a396
mov rax, qword [rsi]
lea rdx, [rsp + 0x40]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x200]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14009a396
mov rcx, qword [rsi]
mov rcx, qword [rcx + 0x60]
call fcn.14009d384
test eax, eax
jg 0x14009a34d
jmp 0x14009a396
movsxd rcx, dword [rsi]
lea rdx, [rsp + 0x40]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14009a375
or dword [rbx + 0x14], 1
movsxd rcx, dword [rsi]
lea rdx, [rbp + 0x150]
call qword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x14009a38d
or dword [rbx + 0x14], 4
cmp dword [rbx + 0x14], 0
je 0x14009a396
inc r12d
mov eax, r12d
mov rcx, qword [rbp + 0x360]
xor rcx, rsp
call fcn.140001010
lea r11, [rsp + 0x470]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret