Function at 0x14001d370
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x90
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov rax, qword [0x1400f4d50]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov r12, r8
mov rbx, rdx
mov rsi, rcx
cmp qword [rcx + 0x1a0], 0xffffffffffffffff
je 0x14001d3b6
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov r8d, 6
mov r14d, 1
mov edx, r14d
mov edi, 2
mov ecx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi + 0x1a0], rax
cmp rax, 0xffffffffffffffff
jne 0x14001d3ea
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x14001d68e
mov word [rsp + 0x78], di
mov rcx, rbx
call fcn.14001d080
xor r13d, r13d
test al, al
je 0x14001d418
lea rdx, [rsp + 0x7c]
mov rcx, rbx
call fcn.14001d210
test al, al
jne 0x14001d5bc
jmp 0x14001d689
mov qword [rsp + 0x40], r13
mov ecx, 0x38
call fcn.140095cd8
test rax, rax
je 0x14001d64f
mov qword [rsp + 0x38], rax
mov qword [rax], rax
mov qword [rax + 8], rax
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.14001cbb0
mov ebp, eax
test eax, eax
je 0x14001d4a6
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rdi]
mov qword [rdi], rdi
mov qword [rdi + 8], rdi
cmp rbx, rdi
je 0x14001d497
mov rsi, qword [rbx]
cmp qword [rbx + 0x28], 8
jb 0x14001d476
mov rcx, qword [rbx + 0x10]
call fcn.140095520
mov qword [rbx + 0x28], 7
mov qword [rbx + 0x20], r13
mov word [rbx + 0x10], r13w
mov rcx, rbx
call fcn.140095520
mov rbx, rsi
cmp rsi, rdi
jne 0x14001d463
mov rcx, rdi
call fcn.140095520
mov eax, ebp
jmp 0x14001d68e
cmp qword [rsp + 0x40], 0
jne 0x14001d4ff
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rdi]
mov qword [rdi], rdi
mov qword [rdi + 8], rdi
cmp rbx, rdi
je 0x14001d681
mov rsi, qword [rbx]
cmp qword [rbx + 0x28], 8
jb 0x14001d4d9
mov rcx, qword [rbx + 0x10]
call fcn.140095520
mov qword [rbx + 0x28], 7
mov qword [rbx + 0x20], r13
mov word [rbx + 0x10], r13w
mov rcx, rbx
call fcn.140095520
mov rbx, rsi
cmp rsi, rdi
jne 0x14001d4c6
jmp 0x14001d681
mov rdi, qword [rsp + 0x38]
mov rcx, qword [rdi]
add rcx, 0x10
lea rdx, [rsp + 0x7c]
call fcn.14001d210
test al, al
jne 0x14001d569
mov rbx, qword [rdi]
mov qword [rdi], rdi
mov qword [rdi + 8], rdi
cmp rbx, rdi
je 0x14001d681
nop dword [rax]
mov rsi, qword [rbx]
cmp qword [rbx + 0x28], 8
jb 0x14001d543
mov rcx, qword [rbx + 0x10]
call fcn.140095520
mov qword [rbx + 0x28], 7
mov qword [rbx + 0x20], r13
mov word [rbx + 0x10], r13w
mov rcx, rbx
call fcn.140095520
mov rbx, rsi
cmp rsi, rdi
jne 0x14001d530
jmp 0x14001d681
mov rbx, qword [rdi]
mov qword [rdi], rdi
mov qword [rdi + 8], rdi
cmp rbx, rdi
je 0x14001d5b4
nop dword [rax + rax]
mov rbp, qword [rbx]
cmp qword [rbx + 0x28], 8
jb 0x14001d593
mov rcx, qword [rbx + 0x10]
call fcn.140095520
mov qword [rbx + 0x28], 7
mov qword [rbx + 0x20], r13
mov word [rbx + 0x10], r13w
mov rcx, rbx
call fcn.140095520
mov rbx, rbp
cmp rbp, rdi
jne 0x14001d580
mov rcx, rdi
call fcn.140095520
cmp qword [r12 + 0x18], 8
jb 0x14001d5c8
mov r12, qword [r12]
mov rcx, r12
call fcn.140097950
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x7a], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x78]
mov rcx, qword [rsi + 0x1a0]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14001d61e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov rcx, qword [rsi + 0x1a0]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rsi + 0x1a0], 0xffffffffffffffff
mov eax, ebx
jmp 0x14001d68e
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x80
mov rcx, qword [rsi + 0x1a0]
call qword [sym.imp.WS2_32.dll_setsockopt]
xor eax, eax
jmp 0x14001d68e
mov qword [rsp + 0x50], r13
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x60]
call fcn.140095a74
lea r11, vtable.std::bad_alloc.0
mov qword [rsp + 0x60], r11
lea rdx, [0x1400ef048]
lea rcx, [rsp + 0x60]
call fcn.140095d7c
int3
mov rcx, rdi
call fcn.140095520
mov eax, ntohs
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.1400959a0
add rsp, 0x90
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret