Function at 0x180066b70
Capabilities:
Connect socket

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
push r14
sub rsp, 0xf8
mov rax, qword [0x1800c34c8]
xor rax, rsp
mov qword [rsp + 0xe0], rax
mov rbp, qword [rcx]
mov qword [r8], 0xffffffffffffffff
mov eax, dword [rdx + 4]
mov rbx, qword [rcx]
mov dword [rsp + 0x20], eax
mov eax, dword [rcx + 0xa4]
xor r14d, r14d
mov r13, r8
mov rsi, rcx
mov dword [rsp + 0x24], eax
cmp eax, 2
jne 0x180066bc4
lea eax, [r14 + 0x11]
jmp 0x180066bc7
mov eax, dword [rdx + 0xc]
mov dword [rsp + 0x28], eax
mov eax, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
mov ecx, 0x80
cmp eax, ecx
cmova eax, ecx
lea rcx, [rsp + 0x30]
mov r8d, eax
mov dword [rsp + 0x2c], eax
call fcn.18003e480
mov r11, qword [rbx + 0x288]
test r11, r11
je 0x180066c0f
mov rcx, qword [rbx + 0x290]
lea r8, [rsp + 0x20]
xor edx, edx
call r11
mov rdi, rax
jmp 0x180066c25
mov r8d, dword [rsp + 0x28]
mov edx, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rdi, 0xffffffffffffffff
je 0x180066e6b
xor ebx, ebx
cmp word [rsp + 0x30], 2
jne 0x180066e32
lea r9d, [rbx + 0x2e]
lea r8, [rsp + 0xb0]
lea rdx, [rsp + 0x34]
lea ecx, [rbx + 2]
call fcn.18006df30
test rax, rax
je 0x180066e32
movzx ecx, word [rsp + 0x32]
mov qword [rsp + 0xf0], r12
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8, [rsp + 0xb0]
lea rdx, str.__Trying__s..._n
mov rcx, rbp
call fcn.180063c80
cmp dword [rsp + 0x20], 2
jne 0x180066cb0
cmp dword [rsp + 0x24], 1
jne 0x180066cb0
lea r12d, [rbx + 1]
cmp dword [rbp + 0x4d4], ebx
je 0x180066cb3
mov rdx, rdi
mov rcx, rsi
call fcn.180066740
jmp 0x180066cb3
xor r12d, r12d
mov rcx, rdi
call fcn.1800667d0
test r12d, r12d
mov r12, qword [rsp + 0xf0]
je 0x180066cdb
cmp dword [rbp + 0x6c4], ebx
je 0x180066cdb
mov rdx, rdi
mov rcx, rbp
call fcn.180065cc0
mov rax, qword [rbp + 0x278]
test rax, rax
je 0x180066cff
mov rcx, qword [rbp + 0x280]
xor r8d, r8d
mov rdx, rdi
call rax
cmp eax, 2
jne 0x180066d46
lea r14d, [rax - 1]
cmp dword [rsp + 0x20], 2
jne 0x180066d5f
lea rcx, [rsp + 0x30]
call fcn.18008a2d0
mov r8d, dword [rsp + 0x20]
mov rdx, rdi
mov r9d, eax
mov rcx, rsi
call fcn.180065ec0
mov ebx, eax
test eax, eax
je 0x180066d5f
mov rdx, rdi
mov rcx, rsi
call fcn.180066a30
mov eax, 7
cmp ebx, 1
cmove ebx, eax
mov eax, ebx
jmp 0x180066e6d
test eax, eax
je 0x180066cff
mov rdx, rdi
mov rcx, rsi
call fcn.180066a30
mov eax, Ordinal_46
jmp 0x180066e6d
mov edx, 1
mov rcx, rdi
call fcn.18008a2e0
call fcn.1800636f0
cmp dword [rsi + 0x3d8], 1
mov qword [rsi + 0x3d0], rax
jle 0x180066d8f
mov edx, dword [rsi + 0x3dc]
mov rcx, rbp
call fcn.180061a70
test r14d, r14d
jne 0x180066e2c
cmp dword [rsi + 0xa4], 1
jne 0x180066e2c
mov r8d, dword [rsp + 0x2c]
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x180066e20
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0xb
je 0x180066e16
cmp eax, 0x2732
jle 0x180066dd8
cmp eax, 0x2734
jle 0x180066e16
mov edx, eax
mov rcx, rsi
call fcn.180069aa0
lea r8, [rsp + 0xb0]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov r9, rax
mov rcx, rbp
call fcn.180063c80
mov rdx, rdi
mov rcx, rsi
mov dword [rbp + 0x88cc], ebx
call fcn.180066a30
mov ebx, 7
mov eax, ebx
jmp 0x180066e6d
xor ebx, ebx
mov qword [r13], rdi
mov eax, ebx
jmp 0x180066e6d
test ebx, ebx
jne 0x180066e28
mov qword [r13], rdi
mov eax, ebx
jmp 0x180066e6d
mov qword [r13], rdi
jmp 0x180066e6b
mov byte [rsp + 0xb0], bl
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
mov edx, eax
mov ebx, eax
call fcn.180069aa0
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r8d, ebx
mov r9, rax
mov rcx, rbp
call fcn.180063d30
mov rdx, rdi
mov rcx, rsi
call fcn.180066a30
xor eax, eax
mov rcx, qword [rsp + 0xe0]
xor rcx, rsp
call fcn.18003c690
add rsp, 0xf8
pop r14
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret