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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf]
sub rsp, 0xc0
mov rax, qword [0x140518628]
xor rax, rsp
mov qword [rbp + 7], rax
mov rbx, rcx
mov r15, qword [rbp + 0x77]
mov qword [rbp - 0x61], r15
mov r13, qword [rbp + 0x7f]
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x49], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x39], xmm1
mov dword [rbp - 0x55], r8d
mov qword [rbp - 0x51], 1
xor esi, esi
mov dword [rbp - 0x59], esi
lea rcx, [rbp - 0x29]
call fcn.14003e0e0
nop
lea rdx, [rbp - 0x29]
cmp qword [rbp - 0x11], 0x10
cmovae rdx, qword [rbp - 0x29]
lea r9, [rbp - 0x69]
lea r8, [rbp - 0x59]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x14019d41d
mov rdx, qword [rbp - 0x11]
cmp rdx, 0x10
jb 0x14019d3c6
inc rdx
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14019d3c1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14019d75f
call fcn.14036115c
mov byte [rbp - 0x29], 0
mov qword [rbp - 0x11], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x19], rsi
mov rcx, qword [r15 + 0x38]
test rcx, rcx
je 0x14019d3ef
cmp rcx, r15
mov rax, qword [rcx]
setne dl
call qword [rax + 0x20]
mov qword [r15 + 0x38], rsi
mov rax, 0xffffffffffffffff
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.140361100
mov rbx, qword [rsp + 0x108]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rbx, qword [rbp - 0x69]
test rbx, rbx
je 0x14019d717
mov r14d, 0x310
movzx r12d, byte [rbp + 0x6f]
nop word [rax + rax]
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], esi
xor r9d, r9d
mov r8d, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x14019d485
mov r8d, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14019d706
test r12b, r12b
je 0x14019d4b1
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
mov edx, 6
lea r8d, [rdx - 5]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [r15 + 0x38]
test rcx, rcx
je 0x14019d4c8
mov qword [rbp - 0x79], rdi
mov rax, qword [rcx]
lea rdx, [rbp - 0x79]
call qword [rax + reloc.WS2_32.dll_recv]
cmp dword [rbx + 4], 0x17
jne 0x14019d4f1
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
mov edx, 0x29
lea r8d, [rdx - 0xe]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x30], 1
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov r8d, dword [rbx + 0x10]
mov rdx, qword [rbx + 0x20]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x14019d5fb
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x14019d6f3
mov rax, qword [r13 + 0x10]
mov rcx, qword [rax]
mov rax, qword [r13 + 8]
mov r8, qword [rax]
mov qword [rbp - 9], rdi
mov word [rbp - 1], r14w
movabs rax, 0x20c49ba5e353f7cf
imul rcx
mov r14, rdx
sar r14, 7
mov rax, r14
shr rax, 0x3f
add r14, rax
imul eax, r8d, 0x3e8
add r14d, eax
nop word [rax + rax]
mov r8d, r14d
mov edx, 1
lea rcx, [rbp - 9]
call qword [sym.imp.WS2_32.dll_WSAPoll]
movsxd rsi, eax
test eax, eax
jns 0x14019d5a3
call fcn.14036c850
cmp dword [rax], 4
je 0x14019d580
mov r14d, 0x310
test rsi, rsi
jle 0x14019d6f1
xor esi, esi
test word [rbp + 1], r14w
je 0x14019d6f3
mov dword [rbp - 0x7d], esi
mov dword [rbp - 0x71], 4
lea rax, [rbp - 0x71]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x7d]
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
js 0x14019d6f3
cmp dword [rbp - 0x7d], esi
jne 0x14019d6f3
mov dword [rbp - 0x6d], esi
lea r8, [rbp - 0x6d]
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rax, qword [r13 + 0x20]
mov ecx, dword [rax]
mov dword [rbp - 0x61], ecx
mov rax, qword [r13 + 0x28]
mov ecx, dword [rax]
mov dword [rbp - 0x5d], ecx
mov dword [rsp + 0x20], 8
lea r9, [rbp - 0x61]
mov edx, 0xffff
mov r8d, 0x1006
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [r13 + 0x30]
mov ecx, dword [rax]
mov dword [rbp - 0x79], ecx
mov rax, qword [r13 + 0x38]
mov ecx, dword [rax]
mov dword [rbp - 0x75], ecx
mov dword [rsp + 0x20], 8
lea r9, [rbp - 0x79]
mov edx, 0xffff
mov r8d, 0x1005
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [r13 + 0x18]
mov dword [rax], esi
mov rcx, qword [rbp - 0x69]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
nop
mov rdx, qword [rbp - 0x11]
cmp rdx, 0x10
jb 0x14019d6c0
inc rdx
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14019d6bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14019d75f
call fcn.14036115c
mov qword [rbp - 0x19], rsi
mov qword [rbp - 0x11], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x29], 0
mov rcx, qword [r15 + 0x38]
test rcx, rcx
je 0x14019d6e9
mov rax, qword [rcx]
cmp rcx, r15
setne dl
call qword [rax + 0x20]
mov qword [r15 + 0x38], rsi
mov rax, rdi
jmp 0x14019d3f6
xor esi, esi
mov rax, qword [r13 + 0x18]
mov dword [rax], 2
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x14019d440
mov rbx, qword [rbp - 0x69]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
nop
mov rdx, qword [rbp - 0x11]
cmp rdx, 0x10
jb 0x14019d3c6
inc rdx
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14019d3c1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14019d3c1
call fcn.140367fdc
int3