Function at 0x140018ac0
Capabilities:
Connect socket

Disassembly:
push rbp
push rbx
push rsi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x100
mov rax, qword [0x1400a45d0]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov r15, qword [rcx]
mov qword [r8], 0xffffffffffffffff
mov eax, dword [rdx + 4]
mov rbx, qword [rcx]
mov dword [rsp + 0x30], eax
mov eax, dword [rcx + 0xbc]
xor r13d, r13d
mov dword [rsp + 0x34], eax
cmp eax, 2
mov r12, r8
mov r14, rcx
lea eax, [r13 + 0x11]
je 0x140018b19
mov eax, dword [rdx + 0xc]
mov dword [rsp + 0x38], eax
mov eax, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
mov ecx, 0x80
cmp eax, ecx
cmova eax, ecx
lea rcx, [rsp + 0x40]
mov r8d, eax
mov dword [rsp + 0x3c], eax
call fcn.140049a70
mov rax, qword [rbx + 0x2e8]
test rax, rax
je 0x140018b5d
mov rcx, qword [rbx + 0x2f0]
lea r8, [rsp + 0x30]
xor edx, edx
call rax
jmp 0x140018b70
mov r8d, dword [rsp + 0x38]
mov edx, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140018e37
mov ecx, dword [r14 + 0xb8]
test ecx, ecx
je 0x140018b98
mov eax, dword [rsp + 0x58]
cmp dword [rsp + 0x30], 0x17
cmove eax, ecx
mov dword [rsp + 0x58], eax
movzx ecx, word [rsp + 0x40]
xor ebx, ebx
mov qword [rsp + 0x158], rdi
cmp ecx, 2
je 0x140018bbc
cmp ecx, 0x17
jne 0x140018ded
lea rdx, [rsp + 0x48]
jmp 0x140018bc1
lea rdx, [rsp + 0x44]
lea r8, [rbp - 0x19]
mov r9d, reloc.WLDAP32.dll_Ordinal_46
call fcn.140029420
test rax, rax
je 0x140018ded
movzx ecx, word [rsp + 0x42]
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8, [rbp - 0x19]
lea rdx, str.__Trying__s..._n
mov rcx, r15
call fcn.140016ce0
mov eax, dword [rsp + 0x30]
cmp eax, 2
je 0x140018c05
cmp eax, 0x17
jne 0x140018c27
cmp dword [rsp + 0x34], 1
jne 0x140018c27
mov edi, 1
cmp dword [r15 + 0x7e8], ebx
je 0x140018c29
mov rdx, rsi
mov rcx, r14
call fcn.140018190
jmp 0x140018c29
xor edi, edi
mov rcx, rsi
call fcn.140017ff0
test edi, edi
je 0x140018c49
cmp dword [r15 + 0xa2c], ebx
je 0x140018c49
mov rdx, rsi
mov rcx, r15
call fcn.140018e40
mov rax, qword [r15 + 0x2d8]
test rax, rax
je 0x140018c6d
mov rcx, qword [r15 + 0x2e0]
xor r8d, r8d
mov rdx, rsi
call rax
cmp eax, 2
jne 0x140018cbb
lea r13d, [rax - 1]
mov eax, dword [rsp + 0x30]
cmp eax, 2
je 0x140018c7b
cmp eax, 0x17
jne 0x140018cd4
lea rcx, [rsp + 0x40]
call fcn.14003fc00
mov r8d, dword [rsp + 0x30]
mov rdx, rsi
mov r9d, eax
mov rcx, r14
call fcn.140018560
mov ebx, eax
test eax, eax
je 0x140018cd4
mov rdx, rsi
mov rcx, r14
call fcn.1400176a0
mov eax, 7
cmp ebx, 1
cmove ebx, eax
mov eax, ebx
jmp 0x140018dc6
test eax, eax
je 0x140018c6d
mov rdx, rsi
mov rcx, r14
call fcn.1400176a0
mov eax, Ordinal_46
jmp 0x140018dc6
mov edx, 1
mov rcx, rsi
call fcn.14003fc90
lea rcx, [rsp + 0x20]
call fcn.14000dd80
cmp dword [r14 + 0x450], 1
mov rcx, qword [rax]
mov qword [r14 + 0x440], rcx
mov rax, qword [rax + 8]
mov qword [r14 + 0x448], rax
jle 0x140018d1f
mov rdx, qword [r14 + 0x458]
mov r8d, 3
mov rcx, r15
call fcn.140009110
test r13d, r13d
jne 0x140018dc0
cmp dword [r14 + 0xbc], 1
jne 0x140018dc0
cmp dword [r14 + 0x428], r13d
jne 0x140018d63
mov r8d, dword [rsp + 0x3c]
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140018d63
test ebx, ebx
jne 0x140018dbc
mov qword [r12], rsi
mov eax, ebx
jmp 0x140018dc6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0xb
je 0x140018db6
lea ecx, [rax - 0x2733]
cmp ecx, 1
jbe 0x140018db6
mov edx, eax
mov rcx, r14
call fcn.1400289e0
lea r8, [rbp - 0x19]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov r9, rax
mov rcx, r15
call fcn.140016ce0
mov rdx, rsi
mov rcx, r14
mov dword [r15 + 0x4d1c], ebx
call fcn.1400176a0
mov ebx, 7
mov eax, ebx
jmp 0x140018dc6
xor ebx, ebx
mov qword [r12], rsi
mov eax, ebx
jmp 0x140018dc6
mov qword [r12], rsi
xor eax, eax
mov rdi, qword [rsp + 0x158]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140049680
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rsi
pop rbx
pop rbp
ret
mov byte [rbp - 0x19], bl
call fcn.14004e100
mov dword [rax], 0x273f
call fcn.14004e100
mov rbx, rax
call fcn.14004e100
mov edx, dword [rbx]
mov rcx, r14
mov rdi, rax
call fcn.1400289e0
mov r8d, dword [rdi]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, r15
call fcn.140016bd0
mov rdx, rsi
mov rcx, r14
call fcn.1400176a0
jmp 0x140018dc4
xor eax, eax
jmp 0x140018dce