Function at 0x140013714
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 0x140013777
cmp qword [rdx + 0x18], 0xf
mov rbx, rdx
jbe 0x14001376d
mov rbx, qword [rdx]
mov qword [rbp - 0x21], 4
jmp 0x140013792
cmp qword [rcx + 0x10], r12
je 0x14001378a
cmp qword [rcx + 0x18], 0xf
mov rbx, rcx
jbe 0x14001378a
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 0x14001382b
mov rdx, qword [rbp - 0x29]
cmp rdx, 0xf
jbe 0x1400137fc
mov rcx, qword [rbp - 0x41]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400137f7
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140013b46
call fcn.14006fa8c
mov rcx, qword [rdi + 0x38]
movdqa xmm0, xmmword [0x1400aa060]
mov byte [rbp - 0x41], r12b
movdqu xmmword [rbp - 0x31], xmm0
test rcx, rcx
je 0x1400139e4
mov rax, qword [rcx]
cmp rcx, rdi
setne dl
call qword [rax + 0x20]
jmp 0x1400139e0
mov rbx, qword [rbp + 0x4f]
test rbx, rbx
je 0x140013975
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 0x140013882
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 0x140013964
cmp byte [rbp + 0x6f], r12b
je 0x1400138a9
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 0x1400138c3
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 0x1400138ef
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 0x140013a0f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x140013937
mov rax, qword [r15 + 8]
mov dword [rax], 2
jmp 0x14001395b
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 0x140013a09
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x14001383c
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 0x1400139b9
mov rcx, qword [rbp - 0x41]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400139b4
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140013b46
call fcn.14006fa8c
mov rcx, qword [rdi + 0x38]
movdqa xmm0, xmmword [0x1400aa060]
mov byte [rbp - 0x41], r12b
movdqu xmmword [rbp - 0x31], xmm0
test rcx, rcx
je 0x1400139e4
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 0x140013a12
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 0x140013b15
mov rcx, qword [rbp - 0x41]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140013b0d
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140013b46
call fcn.14006fa8c
mov r14, rbx
mov rcx, qword [rdi + 0x38]
movdqa xmm0, xmmword [0x1400aa060]
mov byte [rbp - 0x41], r15b
movdqu xmmword [rbp - 0x31], xmm0
test rcx, rcx
je 0x140013b3e
mov rax, qword [rcx]
cmp rcx, rdi
setne dl
call qword [rax + 0x20]
mov qword [r14], r15
mov rax, rsi
jmp 0x1400139e8
call fcn.140075c7c
int3