Function at 0x1400186c0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push r12
push r14
push r15
lea rbp, [rsp - 0x208]
sub rsp, 0x308
mov r12, qword [rcx]
movsxd r15, r8d
lea r9, [rbp + 0x240]
lea r8, [rsp + 0x60]
xor r14d, r14d
mov rsi, rcx
mov dword [rbp + 0x250], r14d
mov qword [rcx + r15*8 + 0x4d0], 0xffffffffffffffff
call fcn.1400184e0
mov ebx, eax
test eax, eax
jne 0x1400188d3
movzx ecx, word [rsp + 0x70]
mov qword [rsp + 0x348], rdi
cmp ecx, 2
je 0x140018735
cmp ecx, 0x17
jne 0x140018a2b
lea rdx, [rsp + 0x78]
jmp 0x14001873a
lea rdx, [rsp + 0x74]
lea r8, [rsp + 0x30]
mov r9d, reloc.WLDAP32.dll_Ordinal_46
call fcn.140043bb0
test rax, rax
je 0x140018a2b
movzx ecx, word [rsp + 0x72]
call qword [sym.imp.WSOCK32.dll_ntohs]
lea r8, [rsp + 0x30]
lea rdx, str.__Trying__s:_ld..._n
mov rcx, r12
movzx r9d, ax
mov qword [rsp + 0x300], r13
call fcn.14000fe70
mov eax, dword [rsp + 0x60]
mov rdi, qword [rbp + 0x240]
cmp eax, 2
je 0x140018797
cmp eax, 0x17
jne 0x1400188e4
cmp dword [rsp + 0x64], 1
jne 0x1400188e4
mov r13d, 1
cmp dword [r12 + 0x1044], r14d
je 0x140018812
mov r14, qword [rsi]
lea r9, [rbp + 0x240]
lea edx, [r13 + 5]
mov r8d, r13d
mov rcx, rdi
mov dword [rbp + 0x240], r13d
mov dword [rsp + 0x20], 4
call qword [sym.imp.WSOCK32.dll_setsockopt]
test eax, eax
jns 0x14001880b
call qword [sym.imp.WSOCK32.dll_WSAGetLastError]
lea rdx, [rbp + 0x100]
mov r8d, 0x100
mov ecx, eax
call fcn.140004870
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, r14
mov r8, rax
call fcn.14000fe70
mov r14d, dword [rbp + 0x250]
mov rcx, rdi
call fcn.140018250
test r13d, r13d
je 0x140018835
cmp dword [r12 + 0x1068], 0
je 0x140018835
mov rdx, rdi
mov rcx, r12
call fcn.140017410
cmp qword [r12 + 0x730], 0
je 0x14001887a
mov edx, 1
mov rcx, r12
call fcn.14000d940
mov rcx, qword [r12 + 0x738]
xor r8d, r8d
mov rdx, rdi
call qword [r12 + 0x730]
xor edx, edx
mov rcx, r12
mov r13d, eax
call fcn.14000d940
cmp r13d, 2
jne 0x1400188ec
lea r14d, [r13 - 1]
mov eax, dword [rsp + 0x60]
cmp eax, 2
je 0x140018888
cmp eax, 0x17
jne 0x140018903
lea rcx, [rsp + 0x70]
call fcn.1400437a0
mov r8d, dword [rsp + 0x60]
mov rdx, rdi
mov r9d, eax
mov rcx, rsi
call fcn.140017640
mov ebx, eax
test eax, eax
je 0x140018903
mov rdx, rdi
mov rcx, rsi
call fcn.140018440
mov eax, 7
cmp ebx, 1
cmove ebx, eax
mov eax, ebx
mov r13, qword [rsp + 0x300]
mov rdi, qword [rsp + 0x348]
add rsp, 0x308
pop r15
pop r14
pop r12
pop rsi
pop rbx
pop rbp
ret
xor r13d, r13d
jmp 0x140018812
test r13d, r13d
je 0x14001887a
mov rdx, rdi
mov rcx, rsi
call fcn.140018440
mov eax, Ordinal_46
jmp 0x1400188c3
mov edx, 1
mov rcx, rdi
call fcn.1400402f0
lea rcx, [rbp - 0x10]
call fcn.14001c440
cmp dword [rsi + 0x730], 1
mov rcx, qword [rax]
mov qword [rsi + 0x720], rcx
mov rax, qword [rax + 8]
mov qword [rsi + 0x728], rax
jle 0x140018961
mov rdx, qword [rsi + 0x738]
mov r8d, 3
mov rcx, r12
call fcn.14000d660
mov rdx, qword [rsi + 0x740]
mov r8d, 4
mov rcx, r12
call fcn.14000d660
test r14d, r14d
jne 0x140018a1c
cmp dword [rsi + 0x32c], 4
je 0x140018a1c
cmp dword [rsi + 0x6f8], r14d
jne 0x1400189ad
mov r8d, dword [rsp + 0x6c]
lea rdx, [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
je 0x1400189ad
test ebx, ebx
jne 0x1400188c1
mov qword [rsi + r15*8 + 0x4d0], rdi
jmp 0x1400188c1
call qword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0xb
je 0x140018a0d
cmp eax, 0x2732
jle 0x1400189c8
cmp eax, 0x2734
jle 0x140018a0d
lea rdx, [rbp]
mov r8d, 0x100
mov ecx, eax
call fcn.140004870
lea r8, [rsp + 0x30]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov r9, rax
mov rcx, r12
call fcn.14000fe70
mov rdx, rdi
mov rcx, rsi
mov dword [r12 + 0x1378], ebx
call fcn.140018440
mov ebx, 7
jmp 0x1400188c1
xor ebx, ebx
mov qword [rsi + r15*8 + 0x4d0], rdi
jmp 0x1400188c1
mov qword [rsi + r15*8 + 0x4d0], rdi
xor eax, eax
jmp 0x1400188c3
mov byte [rsp + 0x30], r14b
call fcn.140180dcc
mov dword [rax], 0x273f
call fcn.140180dcc
mov rbx, rax
call fcn.140180dcc
mov ecx, dword [rbx]
lea rdx, [rbp]
mov r8d, 0x100
mov rdi, rax
call fcn.140004870
mov r8d, dword [rdi]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, r12
call fcn.14000ffd0
mov rdx, qword [rbp + 0x240]
mov rcx, rsi
call fcn.140018440
xor eax, eax
jmp 0x1400188cb