Function at 0x1801e1040
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x18049d0e0]
xor rax, rsp
mov qword [rbp - 8], rax
mov edx, 1
mov dword [rbp - 0x40], reloc.WS2_32.dll_recv
mov esi, 2
mov dword [rbp - 0x3c], 1
mov ecx, esi
mov rdi, r9
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x1801e1094
or eax, eax
jmp 0x1801e1261
xor eax, eax
mov qword [rsp + 0x90], r14
mov qword [rbp - 0x38], rax
mov ecx, 0x7f000001
mov word [rbp - 0x38], si
mov qword [rbp - 0x30], rax
call qword [sym.imp.WS2_32.dll_htonl]
xor r14d, r14d
mov qword [rdi + 8], 0xffffffffffffffff
lea r9, [rbp - 0x3c]
mov dword [rbp - 0x34], eax
mov edx, 0xffff
mov word [rbp - 0x36], r14w
mov rcx, rbx
mov qword [rdi], 0xffffffffffffffff
lea r8d, [r14 + 4]
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1801e123a
lea r8d, [r14 + 0x10]
mov rcx, rbx
lea rdx, [rbp - 0x38]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x1801e123a
lea r8, [rbp - 0x40]
mov rcx, rbx
lea rdx, [rbp - 0x38]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x1801e123a
cmp dword [rbp - 0x40], 0x10
jl 0x1801e123a
lea edx, [r14 + 1]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x1801e123a
xor r8d, r8d
lea edx, [r14 + 1]
mov ecx, esi
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rdi], rax
cmp rax, 0xffffffffffffffff
je 0x1801e123a
lea r8d, [r14 + 0x10]
mov rcx, rax
lea rdx, [rbp - 0x38]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1801e123a
lea edx, [r14 + 1]
mov rcx, rbx
call fcn.1801fee40
test eax, eax
js 0x1801e123a
lea edx, [r14 + 1]
mov qword [rbp - 0x18], rbx
mov r8d, 0x2710
mov dword [rbp - 0x10], 0x300
lea rcx, [rbp - 0x18]
call fcn.1801dfd80
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_accept]
mov qword [rdi + 8], rax
cmp rax, 0xffffffffffffffff
je 0x1801e123a
mov rcx, qword [rdi]
lea r8, [rbp - 0x40]
lea rdx, [rbp - 0x38]
mov dword [rbp - 0x40], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x1801e123a
cmp dword [rbp - 0x40], 0x10
jl 0x1801e123a
mov rcx, qword [rdi + 8]
lea r8, [rbp - 0x40]
lea rdx, [rbp - 0x28]
mov dword [rbp - 0x40], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
je 0x1801e123a
cmp dword [rbp - 0x40], 0x10
jl 0x1801e123a
movzx eax, word [rbp - 0x28]
cmp word [rbp - 0x38], ax
jne 0x1801e123a
mov eax, dword [rbp - 0x24]
cmp dword [rbp - 0x34], eax
jne 0x1801e123a
movzx eax, word [rbp - 0x26]
cmp word [rbp - 0x36], ax
jne 0x1801e123a
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x1801e1259
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
mov r14, qword [rsp + 0x90]
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.1800b80c0
mov rbx, qword [rsp + 0x98]
add rsp, 0x70
pop rdi
pop rsi
pop rbp
ret