Function at 0x140138360
Capabilities:
Connect socket

Disassembly:
push rbp
push rsi
push rdi
push r12
push r15
sub rsp, 0x220
mov rax, qword [0x1403749c0]
xor rax, rsp
mov qword [rsp + 0x200], rax
mov rbp, qword [rcx]
lea r9, [rsp + 0x28]
movsxd rax, r8d
mov rsi, rcx
lea r8, [rsp + 0x40]
xor r12b, r12b
lea r15, [rcx + rax*8]
mov qword [r15 + 0x4d0], 0xffffffffffffffff
call fcn.140137820
mov edi, eax
test eax, eax
je 0x1401383b8
xor eax, eax
jmp 0x140138661
mov edx, dword [rsp + 0x4c]
lea r9, [rsp + 0x20]
lea r8, [rsp + 0xd0]
mov qword [rsp + 0x218], rbx
lea rcx, [rsp + 0x50]
call fcn.140136de0
test al, al
jne 0x14013842c
call fcn.140164a54
mov ebx, dword [rax]
call fcn.140164a54
mov r8d, 0x100
lea rdx, [rsp + 0x100]
mov ecx, ebx
mov rdi, rax
call fcn.1401238a0
mov r8d, dword [rdi]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rbp
call fcn.1401363b0
mov rdx, qword [rsp + 0x28]
mov rcx, rsi
call fcn.140136e80
xor eax, eax
jmp 0x140138659
mov r9d, dword [rsp + 0x20]
lea r8, [rsp + 0xd0]
lea rdx, str.__Trying__s:_ld..._n
mov rcx, rbp
call fcn.1401364c0
mov eax, dword [rsp + 0x40]
cmp eax, 2
je 0x140138456
cmp eax, 0x17
jne 0x14013845d
cmp dword [rsp + 0x44], 1
je 0x14013846c
mov rbx, qword [rsp + 0x28]
mov rcx, rbx
call fcn.140137760
jmp 0x1401384a1
mov rbx, qword [rsp + 0x28]
cmp byte [rbp + 0xf16], r12b
je 0x140138485
mov rdx, rbx
mov rcx, rsi
call fcn.1401387a0
mov rcx, rbx
call fcn.140137760
cmp byte [rbp + 0xf1f], r12b
je 0x1401384a1
mov rdx, rbx
mov rcx, rbp
call fcn.140138680
cmp qword [rbp + 0x728], 0
mov qword [rsp + 0x210], r14
je 0x1401384ed
mov dl, 1
mov rcx, rbp
call fcn.1401288e0
mov rcx, qword [rbp + 0x730]
xor r8d, r8d
mov rax, qword [rbp + 0x728]
mov rdx, rbx
call qword [case.0x1401289aa.0]
xor edx, edx
mov rcx, rbp
mov r14d, eax
call fcn.1401288e0
cmp r14d, 2
jne 0x14013853b
mov r12b, 1
mov eax, dword [rsp + 0x40]
cmp eax, 2
je 0x1401384fb
cmp eax, 0x17
jne 0x140138555
lea rcx, [rsp + 0x50]
call fcn.14014ee60
mov r8d, dword [rsp + 0x40]
mov r9d, eax
mov rdx, rbx
mov rcx, rsi
call fcn.140137cc0
mov edi, eax
test eax, eax
je 0x140138555
mov rdx, rbx
mov rcx, rsi
call fcn.140136e80
mov eax, 7
cmp edi, 1
cmove edi, eax
mov eax, edi
jmp 0x140138651
test r14d, r14d
je 0x1401384ed
mov rdx, rbx
mov rcx, rsi
call fcn.140136e80
mov eax, 0x2a
jmp 0x140138651
mov edx, 1
mov rcx, rbx
call fcn.140147e40
lea rcx, [rsp + 0x28]
call fcn.14013f660
cmp dword [rsi + 0x678], 1
movups xmm0, xmmword [rax]
movups xmmword [rsi + 0x668], xmm0
jle 0x140138594
mov rdx, qword [rsi + 0x680]
mov r8d, 3
mov rcx, rbp
call fcn.140127f20
test r12b, r12b
jne 0x140138648
cmp dword [rsi + 0x32c], 4
je 0x140138648
cmp byte [rsi + 0x664], r12b
jne 0x1401385da
mov r8d, dword [rsp + 0x4c]
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1401385da
test edi, edi
jne 0x140138644
mov qword [r15 + 0x4d0], rbx
mov eax, edi
jmp 0x140138651
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
cmp eax, 0xb
je 0x14013863b
lea ecx, [rax - 0x2733]
cmp ecx, 1
jbe 0x14013863b
mov r8d, 0x100
lea rdx, [rsp + 0x100]
mov ecx, eax
call fcn.1401238a0
mov r9, rax
lea r8, [rsp + 0xd0]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov rcx, rbp
call fcn.1401364c0
mov rdx, rbx
mov dword [rbp + 0x11a0], edi
mov rcx, rsi
call fcn.140136e80
mov edi, 7
mov eax, edi
jmp 0x140138651
xor edi, edi
mov qword [r15 + 0x4d0], rbx
mov eax, edi
jmp 0x140138651
mov qword [r15 + 0x4d0], rbx
xor eax, eax
mov r14, qword [rsp + 0x210]
mov rbx, qword [rsp + 0x218]
mov rcx, qword [rsp + 0x200]
xor rcx, rsp
call fcn.140158fa0
add rsp, 0x220
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret