Function at 0x180013080
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.180015d40
sub rsp, rax
mov rax, qword [0x18004f088]
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 0x18001315e
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.180018710
call fcn.180019570
mov ebx, dword [rax]
call fcn.180019570
mov ecx, dword [rax]
call fcn.1800213d8
mov r8, rax
lea rdx, str.create_socket_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.180011a00
cmp byte [rsp + 0x50], 0
jne 0x180013133
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.180007400
xor eax, eax
jmp 0x1800133d5
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180013140
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.180007400
xor eax, eax
jmp 0x1800133d5
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 0x180013227
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.180018710
call fcn.180019570
mov ebx, dword [rax]
call fcn.180019570
mov ecx, dword [rax]
call fcn.1800213d8
mov r8, rax
lea rdx, str.connect_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.180011a00
cmp byte [rsp + 0x50], 0
jne 0x1800131f4
xor r8d, r8d
jmp 0x18001320a
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180013200
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.180007400
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x1800133d5
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 0x18001329f
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.180018710
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.180011a00
cmp byte [rsp + 0x50], 0
je 0x1800131ef
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180013290
jmp 0x18001320a
cmp qword [rbx + 0x18], 0x10
mov rax, qword [rbx + 0x10]
jb 0x1800132ad
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 0x180013330
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.180018710
call fcn.180019570
mov ebx, dword [rax]
call fcn.180019570
mov ecx, dword [rax]
call fcn.1800213d8
mov r8, rax
lea rdx, str.socket_send_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.180011a00
cmp byte [rsp + 0x50], 0
je 0x1800131ef
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x180013313
jmp 0x18001320a
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 0x18001336d
mov r8, rbx
lea rdx, [rbp + 0x350]
mov rcx, rsi
call fcn.180006960
cmp ebx, 0x1000
jge 0x180013330
jmp 0x1800133c7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
mov ebx, eax
call fcn.180018710
mov r8d, ebx
lea rdx, str.socket_recv_timeout__errno:__d__n
lea rcx, [rsp + 0x50]
call fcn.180011a00
cmp byte [rsp + 0x50], 0
jne 0x1800133a7
xor r8d, r8d
jmp 0x1800133ba
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x1800133b0
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.180007400
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
mov rcx, qword [rbp + 0x1350]
xor rcx, rsp
call fcn.180015110
add rsp, 0x1460
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret