Function at 0x14014a4b0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x488
mov rax, qword [0x1403bfb80]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov r12, rdx
mov qword [rsp + 0x48], 0
mov r15, r8
mov r14, rcx
mov rcx, r12
lea r8, [rsp + 0x48]
mov edx, r9d
mov r13d, r9d
mov rdi, 0xffffffffffffffff
call fcn.14014a350
test eax, eax
je 0x14014a55f
mov qword [rsp + 0x30], 0
lea rbx, [0x1403c2260]
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov r8d, eax
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
lea r9, str.Failed_to_resolve_hostname__s___s_
mov qword [rsp + 0x28], rbx
lea r8, str.ssh_connect_host_nonblocking
mov qword [rsp + 0x20], r12
lea edx, [rdi + 3]
mov rcx, r14
call fcn.14012c070
jmp 0x14014a832
mov qword [rsp + 0x480], rbp
mov rbp, qword [rsp + 0x48]
test rbp, rbp
je 0x14014a805
mov qword [rsp + 0x478], rsi
nop dword [rax]
xor edx, edx
lea rcx, [rsp + 0x60]
mov r8d, 0x400
call sub.VCRUNTIME140.dll_memset
mov r8d, dword [rbp + 0xc]
mov edx, dword [rbp + 8]
mov ecx, dword [rbp + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
test r15, r15
je 0x14014a673
mov r9, r15
lea r8, str.Resolving__s
lea rdx, str.ssh_connect_host_nonblocking
mov ecx, 3
call fcn.14012ef50
lea r8, [rsp + 0x50]
xor edx, edx
mov rcx, r15
call fcn.14014a350
test eax, eax
jne 0x14014a795
mov rsi, qword [rsp + 0x50]
mov rbx, rsi
test rsi, rsi
je 0x14014a64a
nop dword [rax]
mov r8d, dword [rbx + 0x10]
mov rcx, rdi
mov rdx, qword [rbx + 0x20]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x14014a645
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x400
lea rdx, [rsp + 0x60]
mov ecx, dword [rax]
call fcn.1401379a0
lea r9, str.Binding_local_address:__s
mov qword [rsp + 0x20], rax
lea r8, str.ssh_connect_host_nonblocking
mov edx, 2
mov rcx, r14
call fcn.14012c070
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x14014a5f0
mov rsi, qword [rsp + 0x50]
mov rax, qword [0x1403bfc50]
test rax, rax
jne 0x14014a665
lea ecx, [rax + 2]
call fcn.140149d70
mov qword [0x1403bfc50], rax
mov rcx, rsi
call rax
test rbx, rbx
je 0x14014a776
mov rcx, rdi
call fcn.14013a890
test eax, eax
jns 0x14014a6a9
mov dword [rsp + 0x28], r13d
lea r9, str.Failed_to_set_socket_non_blocking_for__s:_d
lea r8, str.ssh_connect_host_nonblocking
mov qword [rsp + 0x20], r12
mov edx, 2
mov rcx, r14
call fcn.14012c070
jmp 0x14014a776
cmp dword [r14 + 0x6c4], 0
je 0x14014a6fe
mov edx, 6
mov dword [rsp + 0x40], 1
lea r9, [rsp + 0x40]
mov dword [rsp + 0x20], 4
mov rcx, rdi
lea r8d, [rdx - 5]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14014a6fe
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x400
lea rdx, [rsp + 0x60]
mov ecx, dword [rax]
call fcn.1401379a0
lea r9, str.Failed_to_set_TCP_NODELAY_on_socket:__s
jmp 0x14014a75d
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov rcx, rdi
mov dword [rax], 0
mov r8d, dword [rbp + 0x10]
mov rdx, qword [rbp + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14014a7fd
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
cmp dword [rax], 0
je 0x14014a7fd
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
cmp dword [rax], 0x70
je 0x14014a7fd
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x400
lea rdx, [rsp + 0x60]
mov ecx, dword [rax]
call fcn.1401379a0
lea r9, str.Failed_to_connect:__s
lea r8, str.ssh_connect_host_nonblocking
mov qword [rsp + 0x20], rax
mov edx, 2
mov rcx, r14
call fcn.14012c070
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rbp, qword [rbp + 0x28]
mov rdi, 0xffffffffffffffff
test rbp, rbp
jne 0x14014a580
jmp 0x14014a7fd
mov qword [rsp + 0x30], 0
lea rbx, [0x1403c2260]
mov dword [rsp + 0x28], 0x400
mov r9d, 0x400
mov r8d, eax
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0x12ff
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
lea r9, str.Failed_to_resolve_bind_address__s___s_
mov qword [rsp + 0x28], rbx
lea r8, str.ssh_connect_host_nonblocking
mov qword [rsp + 0x20], r15
mov edx, 2
mov rcx, r14
call fcn.14012c070
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rdi, 0xffffffffffffffff
mov rsi, qword [rsp + 0x478]
mov rax, qword [0x1403bfc50]
mov rbx, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x480]
test rax, rax
jne 0x14014a82d
lea ecx, [rax + 2]
call fcn.140149d70
mov qword [0x1403bfc50], rax
mov rcx, rbx
call rax
mov rax, rdi
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.1402d88b0
add rsp, 0x488
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret