Function at 0x140039f40
Capabilities:
Connect socket

Disassembly:
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0x210
mov rax, qword [0x1400b6f80]
xor rax, rsp
mov qword [rsp + 0x1f0], rax
mov rbp, qword [rcx]
movsxd r13, r8d
lea r9, [rsp + 0x20]
lea r8, [rsp + 0x30]
mov rsi, rcx
xor r14d, r14d
mov qword [rcx + r13*8 + 0x4d0], 0xffffffffffffffff
call fcn.140039d60
mov edi, eax
test eax, eax
jne 0x14003a128
movzx ecx, word [rsp + 0x40]
mov qword [rsp + 0x208], rbx
cmp ecx, 2
je 0x140039fdd
cmp ecx, 0x17
jne 0x14003a296
lea r9d, [r14 + 0x2e]
lea r8, [rsp + 0xc0]
lea rdx, [rsp + 0x48]
call fcn.140060f30
test rax, rax
je 0x14003a296
movzx ecx, word [rsp + 0x42]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r9d, ax
jmp 0x14003a00d
lea r8, [rsp + 0xc0]
lea rdx, [rsp + 0x44]
mov r9d, reloc.WLDAP32.dll_Ordinal_46
call fcn.140060f30
test rax, rax
je 0x14003a296
movzx ecx, word [rsp + 0x42]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r9d, ax
lea r8, [rsp + 0xc0]
lea rdx, str.__Trying__s:_ld..._n
mov rcx, rbp
mov qword [rsp + 0x200], r12
call fcn.140037d10
mov eax, dword [rsp + 0x30]
mov rbx, qword [rsp + 0x20]
cmp eax, 2
je 0x14003a03f
cmp eax, 0x17
jne 0x14003a062
cmp dword [rsp + 0x34], 1
jne 0x14003a062
mov r12d, 1
cmp dword [rbp + 0x102c], r14d
je 0x14003a065
mov rdx, rbx
mov rcx, rsi
call fcn.140039b10
jmp 0x14003a065
xor r12d, r12d
mov rcx, rbx
call fcn.140039ba0
test r12d, r12d
je 0x14003a086
cmp dword [rbp + 0x1050], r14d
je 0x14003a086
mov rdx, rbx
mov rcx, rbp
call fcn.140038d10
cmp qword [rbp + 0x728], r14
je 0x14003a0cb
mov edx, 1
mov rcx, rbp
call fcn.140036f90
mov rcx, qword [rbp + 0x730]
xor r8d, r8d
mov rdx, rbx
call qword [rbp + 0x728]
xor edx, edx
mov rcx, rbp
mov r12d, eax
call fcn.140036f90
cmp r12d, 2
jne 0x14003a147
lea r14d, [r12 - 1]
mov eax, dword [rsp + 0x30]
cmp eax, 2
je 0x14003a0dd
cmp eax, 0x17
jne 0x14003a162
lea rcx, [rsp + 0x40]
call fcn.140060ae0
mov r8d, dword [rsp + 0x30]
mov rdx, rbx
mov r9d, eax
mov rcx, rsi
call fcn.140038f80
mov edi, eax
test eax, eax
je 0x14003a162
mov rdx, rbx
mov rcx, rsi
call fcn.140039cc0
mov eax, 7
cmp edi, 1
cmove edi, eax
mov eax, edi
mov r12, qword [rsp + 0x200]
mov rbx, qword [rsp + 0x208]
mov rcx, qword [rsp + 0x1f0]
xor rcx, rsp
call fcn.14006d1b0
add rsp, 0x210
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret
test r12d, r12d
je 0x14003a0cb
mov rdx, rbx
mov rcx, rsi
call fcn.140039cc0
mov eax, Ordinal_45
jmp 0x14003a118
mov edx, 1
mov rcx, rbx
call fcn.140060f80
lea rcx, [rsp + 0x20]
call fcn.1400530c0
cmp dword [rsi + 0x708], 1
mov rcx, qword [rax]
mov qword [rsi + 0x6f8], rcx
mov rax, qword [rax + 8]
mov qword [rsi + 0x700], rax
jle 0x14003a1c1
mov rdx, qword [rsi + 0x710]
mov r8d, 3
mov rcx, rbp
call fcn.140036cd0
mov rdx, qword [rsi + 0x718]
mov r8d, 4
mov rcx, rbp
call fcn.140036cd0
test r14d, r14d
jne 0x14003a287
cmp dword [rsi + 0x32c], 4
je 0x14003a287
cmp dword [rsi + 0x6d4], r14d
jne 0x14003a20f
mov r8d, dword [rsp + 0x3c]
lea rdx, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x14003a20f
test edi, edi
jne 0x14003a280
mov qword [rsi + r13*8 + 0x4d0], rbx
mov eax, edi
jmp 0x14003a118
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp eax, 0xb
je 0x14003a276
cmp eax, 0x2732
jle 0x14003a22a
cmp eax, 0x2734
jle 0x14003a276
lea rdx, [rsp + 0xf0]
mov r8d, pe_nt_image_headers64
mov ecx, eax
call fcn.140034b60
lea r8, [rsp + 0xc0]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov r9, rax
mov rcx, rbp
call fcn.140037d10
mov rdx, rbx
mov rcx, rsi
mov dword [rbp + 0x1350], edi
call fcn.140039cc0
mov edi, 7
mov eax, edi
jmp 0x14003a118
xor edi, edi
mov qword [rsi + r13*8 + 0x4d0], rbx
mov eax, edi
jmp 0x14003a118
mov qword [rsi + r13*8 + 0x4d0], rbx
xor eax, eax
jmp 0x14003a118
mov byte [rsp + 0xc0], r14b
call fcn.14007044c
mov dword [rax], 0x273f
call fcn.14007044c
mov rbx, rax
call fcn.14007044c
mov ecx, dword [rbx]
lea rdx, [rsp + 0xf0]
mov r8d, pe_nt_image_headers64
mov rdi, rax
call fcn.140034b60
mov r8d, dword [rdi]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rbp
call fcn.140037e70
mov rdx, qword [rsp + 0x20]
mov rcx, rsi
call fcn.140039cc0
xor eax, eax
jmp 0x14003a120