Function at 0x180017930
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.18001b470
sub rsp, rax
mov rax, qword [0x180057090]
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 0x1800179ee
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.18001dbc0
call fcn.18001f048
mov ebx, dword [rax]
call fcn.18001f048
mov ecx, dword [rax]
call fcn.1800271fc
mov r8, rax
lea rdx, str.create_socket_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.180013f50
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x1800179d0
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.180001d00
xor eax, eax
jmp 0x180017c29
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 0x180017aa8
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.18001dbc0
call fcn.18001f048
mov ebx, dword [rax]
call fcn.18001f048
mov ecx, dword [rax]
call fcn.1800271fc
mov r8, rax
lea rdx, str.connect_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.180013f50
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x180017a81
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.180001d00
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x180017c29
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 0x180017b12
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.18001dbc0
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.180013f50
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rax + r8], 0
jne 0x180017b03
jmp 0x180017a8b
cmp qword [rbx + 0x18], 0x10
mov rax, qword [rbx + 0x10]
jb 0x180017b20
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 0x180017b90
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
call fcn.18001dbc0
call fcn.18001f048
mov ebx, dword [rax]
call fcn.18001f048
mov ecx, dword [rax]
call fcn.1800271fc
mov r8, rax
lea rdx, str.socket_send_error:__s_errno:__d__n
mov r9d, ebx
lea rcx, [rsp + 0x50]
call fcn.180013f50
lea rax, [rsp + 0x50]
or r8, 0xffffffffffffffff
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180017b80
jmp 0x180017a8b
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 0x180017bcd
mov r8, rbx
lea rdx, [rbp + 0x350]
mov rcx, rsi
call fcn.1800094a0
cmp ebx, 0x1000
jge 0x180017b90
jmp 0x180017c1b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x400
mov ebx, eax
call fcn.18001dbc0
mov r8d, ebx
lea rdx, str.socket_recv_timeout__errno:__d__n
lea rcx, [rsp + 0x50]
call fcn.180013f50
lea rcx, [rsp + 0x50]
or r8, 0xffffffffffffffff
inc r8
cmp byte [rcx + r8], 0
jne 0x180017c04
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.180001d00
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
mov rcx, qword [rbp + 0x1350]
xor rcx, rsp
call fcn.18001a580
add rsp, 0x1460
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret