Function at 0x140013670
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x3f]
sub rsp, 0x90
mov rdi, qword [rbp + 0x77]
xor r12d, r12d
xorps xmm0, xmm0
xorps xmm1, xmm1
mov ebx, r12d
movdqu xmmword [rbp - 0x11], xmm0
lea r13d, [r12 + 1]
mov qword [rbp - 0x19], r13
movdqu xmmword [rbp - 1], xmm1
cmp qword [rdx + 0x10], r12
je 0x1400136d3
cmp qword [rdx + 0x18], 0xf
mov rbx, rdx
jbe 0x1400136c9
mov rbx, qword [rdx]
mov qword [rbp - 0x21], 4
jmp 0x1400136ee
cmp qword [rcx + 0x10], r12
je 0x1400136e6
cmp qword [rcx + 0x18], 0xf
mov rbx, rcx
jbe 0x1400136e6
mov rbx, qword [rcx]
mov dword [rbp - 0x1d], r9d
mov dword [rbp - 0x21], r12d
mov edx, r8d
lea rcx, [rbp - 0x41]
call fcn.140002394
cmp qword [rbp - 0x29], 0xf
lea rdx, [rbp - 0x41]
lea r9, [rbp + 0x4f]
mov rcx, rbx
cmova rdx, qword [rbp - 0x41]
lea r8, [rbp - 0x21]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x140013787
mov rdx, qword [rbp - 0x29]
cmp rdx, 0xf
jbe 0x140013758
mov rcx, qword [rbp - 0x41]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140013753
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140013aa2
call fcn.14006f96c
mov rcx, qword [rdi + 0x38]
movdqa xmm0, xmmword [0x1400aa000]
mov byte [rbp - 0x41], r12b
movdqu xmmword [rbp - 0x31], xmm0
test rcx, rcx
je 0x140013940
mov rax, qword [rcx]
cmp rcx, rdi
setne dl
call qword [rax + 0x20]
jmp 0x14001393c
mov rbx, qword [rbp + 0x4f]
test rbx, rbx
je 0x1400138d1
mov r15, qword [rbp + 0x7f]
mov r8d, dword [rbx + 0xc]
xor r9d, r9d
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], r12d
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400137de
mov r8d, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400138c0
cmp byte [rbp + 0x6f], r12b
je 0x140013805
lea r9, [rbp + 0x67]
mov dword [rbp + 0x67], r13d
mov r8d, r13d
mov dword [rsp + 0x20], 4
mov edx, 6
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
lea r14, [rdi + 0x38]
mov rcx, qword [r14]
test rcx, rcx
je 0x14001381f
mov qword [rbp - 0x49], rsi
lea rdx, [rbp - 0x49]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
cmp dword [rbx + 4], 0x17
jne 0x14001384b
mov edx, 0x29
mov dword [rbp + 0x67], r12d
lea r9, [rbp + 0x67]
mov dword [rsp + 0x20], 4
mov rcx, rsi
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
lea r14, [rdi + 0x38]
lea r8, [rbp + 0x67]
mov dword [rbp + 0x67], r13d
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r8d, dword [rbx + 0x10]
mov rcx, rsi
mov rdx, qword [rbx + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x14001396b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140013893
mov rax, qword [r15 + 8]
mov dword [rax], 2
jmp 0x1400138b7
mov r8, qword [r15 + 0x18]
mov rcx, rsi
mov rdx, qword [r15 + 0x10]
mov r8, qword [r8]
mov rdx, qword [rdx]
call fcn.1400033f4
mov rcx, qword [r15 + 8]
mov dword [rcx], eax
test eax, eax
je 0x140013965
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140013798
mov rbx, qword [rbp + 0x4f]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rdx, qword [rbp - 0x29]
cmp rdx, 0xf
jbe 0x140013915
mov rcx, qword [rbp - 0x41]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140013910
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140013aa2
call fcn.14006f96c
mov rcx, qword [rdi + 0x38]
movdqa xmm0, xmmword [0x1400aa000]
mov byte [rbp - 0x41], r12b
movdqu xmmword [rbp - 0x31], xmm0
test rcx, rcx
je 0x140013940
mov r8, qword [rcx]
cmp rcx, rdi
setne dl
call qword [r8 + 0x20]
mov qword [rdi + 0x38], r12
or rax, 0xffffffffffffffff
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lea rbx, [rdi + 0x38]
jmp 0x14001396e
mov rbx, r14
lea r8, [rbp + 0x67]
mov dword [rbp + 0x67], r12d
mov edx, 0x8004667e
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rax, qword [r15 + 0x28]
lea r9, [rbp + 0x67]
movabs r13, 0x20c49ba5e353f7cf
mov dword [rsp + 0x20], 4
mov r12d, 0xffff
mov rcx, qword [rax]
mov rax, r13
imul rcx
mov rcx, qword [r15 + 0x20]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
imul r8d, dword [rcx], 0x3e8
add rdx, rax
mov rcx, rsi
add edx, r8d
mov r8d, 0x1006
mov dword [rbp + 0x67], edx
mov edx, r12d
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [r15 + 0x38]
lea r9, [rbp + 0x67]
mov rax, r13
mov dword [rsp + 0x20], 4
mov r8d, 0x1005
imul qword [rcx]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov rax, qword [r15 + 0x30]
imul ecx, dword [rax], 0x3e8
add edx, ecx
mov rcx, rsi
mov dword [rbp + 0x67], edx
mov edx, r12d
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [r15 + 8]
xor r15d, r15d
mov dword [rax], r15d
mov rcx, qword [rbp + 0x4f]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
mov rdx, qword [rbp - 0x29]
cmp rdx, 0xf
jbe 0x140013a71
mov rcx, qword [rbp - 0x41]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140013a69
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140013aa2
call fcn.14006f96c
mov r14, rbx
mov rcx, qword [rdi + 0x38]
movdqa xmm0, xmmword [0x1400aa000]
mov byte [rbp - 0x41], r15b
movdqu xmmword [rbp - 0x31], xmm0
test rcx, rcx
je 0x140013a9a
mov rax, qword [rcx]
cmp rcx, rdi
setne dl
call qword [rax + 0x20]
mov qword [r14], r15
mov rax, rsi
jmp 0x140013944
call fcn.140075b5c
int3