Function at 0x1006552d0
Capabilities:
Connect socket
Get socket status

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
lea r14, str.Connecting...
mov r13, rcx
mov rsi, rdx
mov ebp, r8d
mov rbx, r9
movzx ecx, word [rsi]
xor r8d, r8d
mov edx, 1
call sub.msys_2.0.dll_socket
mov r12d, eax
cmp eax, 0xffffffff
je 0x1006556b6
mov r9d, dword [rbx]
test r9d, r9d
js 0x100655334
mov r8d, 0x4000
mov edx, 4
mov ecx, eax
call sub.msys_2.0.dll_fcntl
test eax, eax
js 0x100655670
mov rdx, r14
mov rcx, r13
call sym.vim.exe_ch_log
mov r8d, ebp
mov rdx, rsi
mov ecx, r12d
call sub.msys_2.0.dll_connect
test eax, eax
je 0x100655640
mov r8d, dword [rbx]
test r8d, r8d
js 0x1006553c2
call sub.msys_2.0.dll___errno
cmp dword [rax], 0xb
je 0x100655371
call sub.msys_2.0.dll___errno
cmp dword [rax], 0x6f
jne 0x1006553b8
call sub.msys_2.0.dll___errno
cmp dword [rax], 0x6f
jne 0x100655418
lea rdx, str.channel_connect:_Connection_refused
mov rcx, r13
call fcn.1006549a0
mov ecx, r12d
call sub.msys_2.0.dll_close
mov r12d, 0xffffffff
mov eax, r12d
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
call sub.msys_2.0.dll___errno
cmp dword [rax], 0x77
je 0x100655371
call sub.msys_2.0.dll___errno
lea rdx, str.channel_connect:_Connect_failed_with_errno__d
mov rcx, r13
mov r8d, dword [rax]
call fcn.1006549a0
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
call sub.msys_2.0.dll_strerror
mov rcx, qword [sym.vim.exe_e_cannot_connect_to_port]
mov rbx, rax
call sub.msys_intl_8.dll_libintl_gettext
mov r8, rbx
lea rcx, [0x1006e9b1a]
mov rdx, rax
call sym.vim.exe_semsg
mov ecx, r12d
or r12d, 0xffffffff
call sub.msys_2.0.dll_close
jmp 0x10065539c
mov edi, dword [rbx]
mov eax, 0x32
lea r10d, [r12 + 0x3f]
mov ecx, r12d
mov dword [rsp + 0x48], 0
cmp edi, eax
mov dword [rsp + 0x4c], 4
cmovg edi, eax
test r12d, r12d
mov eax, r12d
cmovns r10d, r12d
and eax, 0x3f
mov dword [rsp + 0x3c], eax
mov eax, 1
mov edx, edi
sar r10d, 6
shl rax, cl
lea rcx, [rsp + 0x70]
movsxd r15, r10d
sar edx, 0x1f
mov qword [rsp + r15*8 + 0x50], rax
mov qword [rsp + r15*8 + 0x58], rax
movsxd rax, edi
imul rax, rax, 0x10624dd3
sar rax, 0x26
sub eax, edx
movsxd rdx, eax
imul eax, eax, 0x3e8
mov qword [rsp + 0x60], rdx
mov edx, edi
sub edx, eax
imul eax, edx, 0x3e8
xor edx, edx
cdqe
mov qword [rsp + 0x68], rax
call fcn.100672e40
mov r8d, edi
lea rdx, str.Waiting_for_connection__waiting__d_msec_...
mov rcx, r13
call sym.vim.exe_ch_log
lea rax, [rsp + 0x60]
xor r9d, r9d
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea ecx, [r12 + 1]
lea r8, [rsp + 0x58]
call sub.msys_2.0.dll_select
test eax, eax
js 0x1006556f7
mov rax, qword [rsp + r15*8 + 0x50]
mov edx, dword [rsp + 0x3c]
bt rax, rdx
jb 0x1006555c0
mov rax, qword [rsp + r15*8 + 0x58]
bt rax, rdx
jb 0x1006555c0
lea rcx, [rsp + 0x80]
xor edx, edx
call fcn.100672e40
mov r8, qword [rsp + 0x88]
movabs rax, 0x20c49ba5e353f7cf
sub r8, qword [rsp + 0x78]
imul r8
mov rcx, qword [rsp + 0x80]
sub rcx, qword [rsp + 0x70]
sar r8, 0x3f
imul rcx, rcx, 0x3e8
mov eax, dword [rbx]
sar rdx, 7
sub rdx, r8
add rcx, rdx
cmp eax, 1
jle 0x100655660
movsxd rdx, eax
cmp rdx, rcx
jle 0x100655660
sub eax, ecx
sub edi, ecx
mov dword [rbx], eax
test edi, edi
jle 0x100655583
movsxd rcx, edi
mov edx, 1
call sym.vim.exe_mch_delay
call sym.vim.exe_ui_breakcheck
sub dword [rbx], edi
mov rax, qword [sym.vim.exe_got_int]
mov eax, dword [rax]
test eax, eax
jne 0x100655660
mov edx, dword [rbx]
test edx, edx
jg 0x1006555a0
mov dword [rbx], 1
test r12d, r12d
js 0x1006552f6
mov ecx, r12d
call sub.msys_2.0.dll_close
jmp 0x1006552f6
lea rax, [rsp + 0x4c]
mov r8d, 0x1007
lea r9, [rsp + 0x48]
mov ecx, r12d
mov qword [rsp + 0x20], rax
mov edx, 0xffff
call sub.msys_2.0.dll_getsockopt
mov r8d, dword [rsp + 0x48]
test eax, eax
js 0x1006556ff
test r8d, r8d
setne dl
cmp r8d, 0xb
setne al
test dl, al
je 0x10065560d
lea eax, [r8 - 0x6f]
and eax, 0xfffffff7
jne 0x1006556ff
call sub.msys_2.0.dll___errno
cmp dword [rax], 0x6f
je 0x10065569a
mov rax, qword [rsp + r15*8 + 0x58]
mov ecx, dword [rsp + 0x3c]
bt rax, rcx
jae 0x100655503
mov ecx, dword [rsp + 0x48]
test ecx, ecx
jne 0x100655503
nop word [rax + rax]
mov eax, dword [rbx]
test eax, eax
js 0x10065539c
xor r8d, r8d
mov edx, 4
mov ecx, r12d
call sub.msys_2.0.dll_fcntl
jmp 0x10065539c
lea rdx, str.Connection_timed_out
jmp 0x100655386
call sub.msys_2.0.dll___errno
lea rdx, str.channel_connect:_Connect_failed_with_errno__d
mov rcx, r13
mov r8d, dword [rax]
call fcn.1006549a0
mov ecx, r12d
mov r12d, 0xffffffff
call sub.msys_2.0.dll_close
jmp 0x10065539c
mov rcx, r13
lea rdx, str.channel_connect:_Connection_refused
call fcn.1006549a0
mov ecx, r12d
call sub.msys_2.0.dll_close
jmp 0x100655396
lea rdx, str.in_socket___in_channel_connect__.
mov rcx, r13
call fcn.1006549a0
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
call sub.msys_2.0.dll_strerror
mov rcx, qword [sym.vim.exe_e_socket_in_channel_connect]
mov rbx, rax
call sub.msys_intl_8.dll_libintl_gettext
mov r8, rbx
lea rcx, [0x1006e9b1a]
mov rdx, rax
call sym.vim.exe_semsg
jmp 0x10065539c
call sub.msys_2.0.dll___errno
mov r8d, dword [rax]
lea rdx, str.channel_connect:_Connect_failed_with_errno__d
mov rcx, r13
call fcn.1006549a0
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
call sub.msys_2.0.dll_strerror
mov rcx, qword [sym.vim.exe_e_cannot_connect_to_port]
mov rbx, rax
call sub.msys_intl_8.dll_libintl_gettext
mov r8, rbx
lea rcx, [0x1006e9b1a]
mov rdx, rax
call sym.vim.exe_semsg
mov ecx, r12d
call sub.msys_2.0.dll_close
jmp 0x100655396