Function at 0x180017de0
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.18001bcc0
sub rsp, rax
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x180058090]
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 0x180017f10
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001e3f0
call fcn.18001f878
mov ebx, dword [rax]
call fcn.18001f878
mov ecx, dword [rax]
call fcn.180027a2c
mov r8, rax
mov r9d, ebx
lea rdx, str.create_socket_error:__s_errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180014400
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 0x180017ea0
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800154e0
mov rbx, rax
cmp rdi, rax
je 0x180017ef4
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 0x18001845c
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 0x18001802d
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001e3f0
call fcn.18001f878
mov ebx, dword [rax]
call fcn.18001f878
mov ecx, dword [rax]
call fcn.180027a2c
mov r8, rax
mov r9d, ebx
lea rdx, str.connect_error:__s_errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180014400
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 0x180017fb4
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800154e0
mov rbx, rax
cmp rdi, rax
je 0x180018008
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 0x18001845c
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 0x1800180f7
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001e3f0
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.180014400
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 0x1800180a0
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800154e0
mov rdx, rax
mov rcx, rdi
call fcn.180009a80
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 0x18001845c
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 0x1800181c7
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001e3f0
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.180014400
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 0x180018170
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800154e0
mov rdx, rax
mov rcx, rdi
call fcn.180009a80
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 0x18001845c
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 0x1800182a7
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001e3f0
call fcn.18001f878
mov ebx, dword [rax]
call fcn.18001f878
mov ecx, dword [rax]
call fcn.180027a2c
mov r8, rax
mov r9d, ebx
lea rdx, str.socket_send_msg_length_error:__s_errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180014400
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 0x180018250
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800154e0
mov rdx, rax
mov rcx, rdi
call fcn.180009a80
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 0x18001845c
mov rax, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 0x10
jb 0x1800182b5
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 0x180018380
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001e3f0
call fcn.18001f878
mov ebx, dword [rax]
call fcn.18001f878
mov ecx, dword [rax]
call fcn.180027a2c
mov r8, rax
mov r9d, ebx
lea rdx, str.socket_send_msg_error:__s_errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180014400
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 0x180018327
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800154e0
mov rdx, rax
mov rcx, rdi
call fcn.180009a80
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 0x18001845c
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 0x1800183bd
mov r8, rbx
lea rdx, [rbp + 0x3a0]
mov rcx, rdi
call fcn.180009920
test ebx, ebx
jle 0x18001844e
jmp 0x180018380
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call fcn.18001e3f0
mov r8d, ebx
lea rdx, str.socket_recv_timeout__errno:__d__n
lea rcx, [rbp - 0x60]
call fcn.180014400
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 0x180018407
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x48]
call fcn.180001d00
nop
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x68]
call fcn.1800154e0
mov rdx, rax
mov rcx, rdi
call fcn.180009a80
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.18001add0
add rsp, 0x14b0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret