Function at 0x180014160
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 - 0x1360]
mov eax, 0x1460
call fcn.180016e20
sub rsp, rax
mov rax, qword [0x180051088]
xor rax, rsp
mov qword [rbp + 0x1350], rax
mov dword [rsp + 0x30], r8d
mov rsi, rdx
xor r8d, r8d
mov rbx, rcx
mov r14d, 2
mov ecx, r14d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
test eax, eax
jns 0x18001423e
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.180019810
call fcn.18001a670
mov ebx, dword [rax]
call fcn.18001a670
mov ecx, dword [rax]
call fcn.1800224c8
mov r8, rax
lea rdx, str.create_socket_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.1800125a0
cmp byte [rsp + 0x50], 0
jne 0x180014213
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.1800087f0
xor eax, eax
jmp 0x1800144b5
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180014220
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.1800087f0
xor eax, eax
jmp 0x1800144b5
xor eax, eax
mov ecx, 0xc2aa
mov qword [rsp + 0x38], rax
mov word [rsp + 0x38], r14w
mov qword [rsp + 0x40], rax
call qword [sym.imp.WS2_32.dll_htons]
lea rcx, str.127.0.0.1
mov word [rsp + 0x3a], ax
call qword [sym.imp.WS2_32.dll_inet_addr]
movsxd rdi, edi
lea rdx, [rsp + 0x38]
mov rcx, rdi
mov dword [rsp + 0x3c], eax
mov r8d, reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x180014307
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.180019810
call fcn.18001a670
mov ebx, dword [rax]
call fcn.18001a670
mov ecx, dword [rax]
call fcn.1800224c8
mov r8, rax
lea rdx, str.connect_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.1800125a0
cmp byte [rsp + 0x50], 0
jne 0x1800142d4
xor r8d, r8d
jmp 0x1800142ea
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x1800142e0
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.1800087f0
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x1800144b5
lea r9, [rsp + 0x30]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x1006
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x18001437f
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.180019810
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, eax
lea rdx, str.set_socket_timeout_error:__errno:__d__n
lea rcx, [rsp + 0x50]
call fcn.1800125a0
cmp byte [rsp + 0x50], 0
je 0x1800142cf
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180014370
jmp 0x1800142ea
cmp qword [rbx + 0x18], 0x10
mov rax, qword [rbx + 0x10]
jb 0x18001438d
mov rbx, qword [rbx]
xor r9d, r9d
mov r8d, eax
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x180014410
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.180019810
call fcn.18001a670
mov ebx, dword [rax]
call fcn.18001a670
mov ecx, dword [rax]
call fcn.1800224c8
mov r8, rax
lea rdx, str.socket_send_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.1800125a0
cmp byte [rsp + 0x50], 0
je 0x1800142cf
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x1800143f3
jmp 0x1800142ea
xor r9d, r9d
lea rdx, [rbp + 0x350]
mov r8d, 0x1000
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_recv]
movsxd rbx, eax
cmp ebx, 0xffffffff
je 0x18001444d
mov r8, rbx
lea rdx, [rbp + 0x350]
mov rcx, rsi
call fcn.180007610
cmp ebx, 0x1000
jge 0x180014410
jmp 0x1800144a7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
mov ebx, eax
call fcn.180019810
mov r8d, ebx
lea rdx, str.socket_recv_timeout__errno:__d__n
lea rcx, [rsp + 0x50]
call fcn.1800125a0
cmp byte [rsp + 0x50], 0
jne 0x180014487
xor r8d, r8d
jmp 0x18001449a
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x180014490
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.1800087f0
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
mov rcx, qword [rbp + 0x1350]
xor rcx, rsp
call fcn.1800161f0
add rsp, 0x1460
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret