Function at 0x140006670
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], r9
push rsi
push rdi
push r14
sub rsp, 0x260
xor r14d, r14d
mov esi, r8d
mov rbp, rdx
mov rbx, rcx
mov word [rcx + 0x22c], r14w
cmp byte [rcx + 0x449], r14b
jne 0x140006735
mov rcx, qword [rcx + 8]
cmp rcx, 0xffffffffffffffff
je 0x1400066d1
lea edx, [r14 + 2]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 8], 0xffffffffffffffff
xor eax, eax
mov dword [rsp + 0x28], 1
xorps xmm0, xmm0
mov dword [rsp + 0x20], r14d
movups xmmword [rbx + 0x10], xmm0
mov qword [rbx + 0x20], rax
xor r9d, r9d
mov dword [rbx + 0x28], eax
lea edx, [rax + 1]
mov qword [rbx + 0x488], r14
lea r8d, [rax + 6]
mov qword [rbx + 0x5b0], r14
movzx ecx, word [rbp]
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov qword [rbx + 8], rax
cmp rax, 0xffffffffffffffff
jne 0x14000673c
mov r9, rax
lea r8, str.socket_create_failed
mov edx, 0x100
lea rcx, [rbx + 0x22c]
call fcn.14003c218
xor al, al
jmp 0x140006964
lea r9, [rbx + 0x454]
cmp dword [r9], r14d
jbe 0x140006768
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1005
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [rbx + 8]
lea r9, [rbx + 0x458]
cmp dword [r9], r14d
jbe 0x140006790
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 0x1006
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x280]
mov edx, 0xffff
mov dword [rsp + 0x280], 1
mov r8d, 8
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [rbx]
mov dl, 1
mov rcx, rbx
call qword [rax + 0x38]
mov rcx, qword [rbx + 8]
lea r8, [rsp + 0x298]
mov edx, 0x8004667e
mov dword [rsp + 0x298], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x40], r14
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rsp + 0x40]
mov r8d, reloc.WS2_32.dll_recv
test eax, eax
mov qword [rsp + 0x30], r14
mov eax, 0x1c
mov qword [rsp + 0x28], r14
cmove rcx, r14
mov qword [rsp + 0x20], r14
mov qword [rbx + 0x488], rcx
mov rdx, rbp
cmp word [rbp], 0x17
mov rcx, qword [rbx + 8]
cmove r8d, eax
xor r9d, r9d
call qword [sym.imp.WS2_32.dll_WSAConnect]
cmp eax, 0xffffffff
jne 0x140006930
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x1400068ad
mov rax, qword [rbx + 8]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x58], rax
xor r9d, r9d
mov eax, 0x10624dd3
mov dword [rsp + 0x50], 1
mul esi
xor ecx, ecx
shr edx, 6
imul eax, edx, 0x3e8
mov dword [rsp + 0x40], edx
xor edx, edx
sub esi, eax
imul eax, esi, 0x3e8
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x140006930
mov rcx, qword [rbx + 8]
cmp rcx, 0xffffffffffffffff
je 0x1400068d4
mov edx, 2
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 8], 0xffffffffffffffff
xor eax, eax
lea r8, str.connect_failed
xorps xmm0, xmm0
lea rcx, [rbx + 0x22c]
movups xmmword [rbx + 0x10], xmm0
mov qword [rbx + 0x20], rax
mov edx, 0x100
mov dword [rbx + 0x28], eax
lea r9, [rax - 1]
mov qword [rbx + 0x5b0], r14
mov qword [rbx + 0x488], r14
call fcn.14003c218
lea r9, [rbx + 0x2c]
lea r8, str._s_direct_connect_failed
lea rdx, str.Socket
lea rcx, [0x14021a1b0]
call fcn.140064fb0
xor al, al
jmp 0x140006964
mov rcx, qword [rbx + 0x488]
call fcn.1400065c0
mov rcx, qword [rbx + 8]
lea r8, [rsp + 0x298]
mov edx, 0x8004667e
mov qword [rbx + 0x488], rax
mov dword [rsp + 0x298], r14d
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov al, 1
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret