Function at 0x1400230b0
Capabilities:
Connect socket
Get socket status
Resolve dns

Disassembly:
push rbp
push rdi
push r14
push r15
sub rsp, 0x2e8
mov rax, qword [0x140077020]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
cmp qword [rcx], 0xffffffffffffffff
mov r14, r9
mov r15, r8
mov qword [rsp + 0x30], 0
mov rbp, rdx
mov rdi, rcx
je 0x140023101
lea rdx, str.Trying_to_connect_but_already_connected.
call fcn.14001fe40
mov eax, 0xffffffff
jmp 0x14002339f
mov rcx, rbp
mov qword [rsp + 0x2e0], rsi
call fcn.1400155d0
mov rsi, rax
test rax, rax
jne 0x140023130
lea rdx, str.Out_of_memory:_Failed_to_strdup_server_address.
mov rcx, rdi
call fcn.14001fe40
lea eax, [rsi - 1]
jmp 0x140023397
cmp byte [rax], 0x5b
mov qword [rsp + 0x320], rbx
mov rbx, rsi
jne 0x14002317d
lea rbx, [rax + 1]
mov edx, 0x5d
mov rcx, rbx
call fcn.1400315cc
test rax, rax
jne 0x14002317a
mov rcx, rsi
call fcn.140015580
mov r8, rbp
lea rdx, str.Invalid_address:_s__Missing___in_IPv6_address
mov rcx, rdi
call fcn.14001fe40
mov eax, 0xffffffff
jmp 0x14002338f
mov byte [rax], 0
lea r9, [rsp + 0x30]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov rcx, rsi
mov ebx, eax
call fcn.140015580
test ebx, ebx
je 0x1400231ba
mov r8, rbp
lea rdx, str.Invalid_address:_s__Can_not_resolv_into_IPv4_v6.
mov rcx, rdi
call fcn.14001fe40
mov eax, 0xffffffff
jmp 0x14002338f
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x80
call fcn.140030e60
mov rax, qword [rsp + 0x30]
mov r8d, dword [rax + 4]
cmp r8d, 2
je 0x14002322a
cmp r8d, 0x17
je 0x140023205
lea rdx, str.Unknown_address_family_:_d._Only_IPv4_IPv6_supported_so_far.
mov rcx, rdi
call fcn.14001fe40
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov eax, 0xffffffff
jmp 0x14002338f
mov rax, qword [rax + 0x20]
mov esi, 0x1c
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x40], xmm0
movsd xmm1, qword [rax + 0x10]
movsd qword [rsp + 0x50], xmm1
mov eax, dword [rax + 0x18]
mov dword [rsp + 0x58], eax
jmp 0x14002323b
mov rax, qword [rax + 0x20]
mov esi, reloc.WS2_32.dll_recv
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x40], xmm0
mov ecx, 0x1bd
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0x30]
mov word [rsp + 0x42], ax
mov ebx, dword [rcx + 4]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
xor r8d, r8d
mov qword [rdi + 0x60], r15
mov ecx, ebx
mov qword [rdi + 0x68], r14
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rdi], rax
cmp rax, 0xffffffffffffffff
jne 0x1400232ab
call fcn.14003aa40
mov ebx, dword [rax]
call fcn.14003aa40
mov ecx, dword [rax]
call fcn.1400446a0
mov r8, rax
lea rdx, str.Failed_to_open_smb2_socket._Errno:_s__d_.
mov r9d, ebx
mov rcx, rdi
call fcn.14001fe40
mov eax, 0xffffffff
jmp 0x14002338f
mov rcx, rax
call fcn.140023020
mov rcx, qword [rdi]
mov edx, 1
mov r8d, edx
call fcn.140023050
mov rcx, qword [rdi]
lea rdx, [rsp + 0x40]
mov r8d, esi
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x1400232e5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14002334e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14002338d
xor edx, edx
lea rcx, [rsp + 0xc0]
mov r8d, 0x208
call fcn.140030e60
mov rax, qword [rdi]
lea r8, [rsp + 0xc0]
mov qword [rsp + 0xc8], rax
xor r9d, r9d
lea rax, [rsp + 0x38]
mov dword [rsp + 0xc0], 1
xor edx, edx
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov qword [rsp + 0x38], 2
call qword [sym.imp.WS2_32.dll_select]
cmp eax, 1
je 0x14002338d
call fcn.14003aa40
mov ebx, dword [rax]
call fcn.14003aa40
mov ecx, dword [rax]
call fcn.1400446a0
mov r8, rax
lea rdx, str.Connect_failed_with_errno_:__s__d_
mov r9d, ebx
mov rcx, rdi
call fcn.14001fe40
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
mov qword [rdi], 0xffffffffffffffff
jmp 0x14002338f
xor eax, eax
mov rbx, qword [rsp + 0x320]
mov rsi, qword [rsp + 0x2e0]
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.14001ec40
add rsp, 0x2e8
pop r15
pop r14
pop rdi
pop rbp
ret