Function at 0x180016dd0
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x13b0]
mov eax, 0x14b0
call fcn.18001a7e0
sub rsp, rax
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x180056090]
xor rax, rsp
mov qword [rbp + 0x13a0], rax
mov rdi, rdx
mov rbx, rcx
mov dword [rsp + 0x30], r8d
xor r8d, r8d
lea edx, [r8 + 1]
mov r14d, 2
mov ecx, r14d
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
test eax, eax
jns 0x180016f00
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001cf10
call fcn.18001e398
mov ebx, dword [rax]
call fcn.18001e398
mov ecx, dword [rax]
call fcn.18002654c
mov r8, rax
mov r9d, ebx
lea rdx, str.create_socket_error:__s_errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180013500
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], socket
mov byte [rsp + 0x48], r14b
lea rax, [rbp - 0x60]
or r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], r14b
jne 0x180016e90
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800145e0
mov rbx, rax
cmp rdi, rax
je 0x180016ee4
mov rcx, rdi
call fcn.180001c80
movups xmm0, xmmword [rbx]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rdi + 0x10], xmm1
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], send
mov byte [rbx], 0
lea rcx, [rsp + 0x68]
call fcn.180001c80
nop
lea rcx, [rsp + 0x48]
call fcn.180001c80
xor eax, eax
jmp 0x18001744c
xor eax, eax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov word [rbp - 0x78], r14w
mov ecx, 0xc2aa
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x76], ax
lea rcx, str.127.0.0.1
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp - 0x74], eax
movsxd rsi, esi
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x78]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x18001701d
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001cf10
call fcn.18001e398
mov ebx, dword [rax]
call fcn.18001e398
mov ecx, dword [rax]
call fcn.18002654c
mov r8, rax
mov r9d, ebx
lea rdx, str.connect_error:__s_errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180013500
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], socket
mov byte [rsp + 0x48], r14b
lea rax, [rbp - 0x60]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], r14b
jne 0x180016fa4
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800145e0
mov rbx, rax
cmp rdi, rax
je 0x180016ff8
mov rcx, rdi
call fcn.180001c80
movups xmm0, xmmword [rbx]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rdi + 0x10], xmm1
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], send
mov byte [rbx], 0
lea rcx, [rsp + 0x68]
call fcn.180001c80
nop
lea rcx, [rsp + 0x48]
call fcn.180001c80
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x18001744c
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1006
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x1800170e7
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001cf10
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, eax
lea rdx, str.set_socket_recv_timeout_error:__errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180013500
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], socket
mov byte [rsp + 0x48], r14b
lea rax, [rbp - 0x60]
or r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], r14b
jne 0x180017090
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800145e0
mov rdx, rax
mov rcx, rdi
call fcn.180008b60
lea rcx, [rsp + 0x68]
call fcn.180001c80
nop
lea rcx, [rsp + 0x48]
call fcn.180001c80
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x18001744c
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1005
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x1800171b7
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001cf10
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, eax
lea rdx, str.set_socket_send_timeout_error:__errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180013500
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], socket
mov byte [rsp + 0x48], r14b
lea rax, [rbp - 0x60]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], r14b
jne 0x180017160
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800145e0
mov rdx, rax
mov rcx, rdi
call fcn.180008b60
lea rcx, [rsp + 0x68]
call fcn.180001c80
nop
lea rcx, [rsp + 0x48]
call fcn.180001c80
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x18001744c
mov ecx, dword [rbx + 0x10]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsp + 0x38], eax
xor r9d, r9d
lea r8d, [r9 + 4]
lea rdx, [rsp + 0x38]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x180017297
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001cf10
call fcn.18001e398
mov ebx, dword [rax]
call fcn.18001e398
mov ecx, dword [rax]
call fcn.18002654c
mov r8, rax
mov r9d, ebx
lea rdx, str.socket_send_msg_length_error:__s_errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180013500
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], socket
mov byte [rsp + 0x48], r14b
lea rax, [rbp - 0x60]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], r14b
jne 0x180017240
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800145e0
mov rdx, rax
mov rcx, rdi
call fcn.180008b60
lea rcx, [rsp + 0x68]
call fcn.180001c80
nop
lea rcx, [rsp + 0x48]
call fcn.180001c80
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x18001744c
mov rax, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0x10
jb 0x1800172a5
mov rbx, qword [rbx]
xor r9d, r9d
mov r8d, eax
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x180017370
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001cf10
call fcn.18001e398
mov ebx, dword [rax]
call fcn.18001e398
mov ecx, dword [rax]
call fcn.18002654c
mov r8, rax
mov r9d, ebx
lea rdx, str.socket_send_msg_error:__s_errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180013500
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], socket
mov byte [rsp + 0x48], r14b
lea rax, [rbp - 0x60]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], r14b
jne 0x180017317
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800145e0
mov rdx, rax
mov rcx, rdi
call fcn.180008b60
lea rcx, [rsp + 0x68]
call fcn.180001c80
nop
lea rcx, [rsp + 0x48]
call fcn.180001c80
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x18001744c
xor r9d, r9d
mov r8d, 0x1000
lea rdx, [rbp + 0x3a0]
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_recv]
movsxd rbx, eax
cmp ebx, 0xffffffff
je 0x1800173ad
mov r8, rbx
lea rdx, [rbp + 0x3a0]
mov rcx, rdi
call fcn.180008a00
test ebx, ebx
jle 0x18001743e
jmp 0x180017370
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001cf10
mov r8d, ebx
lea rdx, str.socket_recv_timeout__errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180013500
xor r14d, r14d
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], socket
mov byte [rsp + 0x48], r14b
lea rax, [rbp - 0x60]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], r14b
jne 0x1800173f7
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800145e0
mov rdx, rax
mov rcx, rdi
call fcn.180008b60
lea rcx, [rsp + 0x68]
call fcn.180001c80
nop
lea rcx, [rsp + 0x48]
call fcn.180001c80
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
mov rcx, qword [rbp + 0x13a0]
xor rcx, rsp
call fcn.1800198f0
add rsp, 0x14b0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret