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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r15
sub rsp, 0xa0
mov rax, qword [0x1400cb008]
xor rax, rsp
mov qword [rsp + 0x98], rax
xor edi, edi
mov rsi, r8
mov qword [rsp + 0x40], rdi
mov rbp, rdx
mov rbx, rcx
mov r15d, edi
test rcx, rcx
je 0x14006611d
test r8, r8
je 0x140066136
mov eax, dword [r8]
test eax, eax
je 0x140065b72
mov r15d, dword [r8]
mov dword [r8], edi
add rcx, 0x40
xor r9d, r9d
xor r8d, r8d
call fcn.140085f50
xor r9d, r9d
lea rcx, [rbx + 0xc8]
mov rdx, rbp
lea r8d, [r9 + 1]
call fcn.140085f50
mov rax, qword [rbx + 0x60]
mov qword [rbx + 0x150], rax
mov rax, qword [rbx + 0xe8]
mov qword [rbx + 0x158], rax
mov eax, dword [rbx + 0x24]
cmp eax, 4
ja 0x140066104
cmp eax, 1
je 0x140065c8b
movups xmm0, xmmword [rbx + 0x98]
movups xmmword [rbx + 0x1d0], xmm0
movsd xmm1, qword [rbx + 0xa8]
movsd qword [rbx + 0x1e0], xmm1
movsxd rax, dword [rbx + 0x1d8]
mov dword [rbx + 0x200], eax
mov rdx, rax
mov dword [rbx + 0x1d8], edi
cmp rax, 0xf4240
jae 0x14006614f
mov ecx, 1
mov dword [rsp + 0x48], eax
mov qword [rsp + 0x4c], rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov qword [rsp + 0x58], rax
test rax, rax
je 0x140066158
movups xmm0, xmmword [rsp + 0x48]
mov byte [rbx + 0x23c], dil
movsd xmm1, qword [rsp + 0x58]
movups xmmword [rbx + 0x1e8], xmm0
mov byte [rbx + 0x204], dil
movups xmm0, xmmword [rbx + 0x1d0]
mov dword [rbx + 0x238], 0xffffffff
movsd qword [rbx + 0x1f8], xmm1
movsd xmm1, qword [rbx + 0x1e0]
movups xmmword [rbx + 0x208], xmm0
movsd qword [rbx + 0x218], xmm1
mov qword [rbx + 0x220], rdi
mov dword [rbx + 0x228], edi
mov qword [rbx + 0x230], rdi
cmp dword [rbx + 0x1ac], edi
je 0x140065ca1
mov rbp, qword [rbx + 0x178]
mov qword [rsp + 0x40], rbp
jmp 0x140065ca6
mov rbp, qword [rsp + 0x40]
cmp dword [rbx + 0x1a4], edi
je 0x140065ddc
cmp dword [rbx + 0x24], 3
jne 0x140065f98
mov rax, qword [rbx]
lea r8, [rsp + 0x70]
mov edx, 2
mov dword [rsp + 0x70], 0x1c
mov word [rax + 0x18], dx
lea rdx, [rsp + 0x78]
mov rcx, qword [rbx + 0x30]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x140065d2b
mov rcx, qword [rbx]
movzx eax, word [rsp + 0x78]
mov word [rcx + 0x18], ax
mov r9, qword [rbx]
mov r8, rbp
cmp dword [rbx + 0x1a4], 2
mov rcx, qword [rbx + 0x30]
sete al
mov qword [rsp + 0x30], rsi
lea rdx, [r9 + 0x18]
mov byte [rsp + 0x28], al
mov r9, qword [r9]
mov byte [rsp + 0x20], 0
call fcn.140064240
mov qword [rbx + 0x30], rax
jmp 0x140065f98
mov qword [rsp + 0xe8], r14
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov ecx, 0x140
mov r14d, dword [rax]
call fcn.14000ec70
test al, al
je 0x140065d89
movzx edx, word [rbx + 0x28]
lea rcx, [0x140097384]
cmp word [rcx - 4], dx
jne 0x140065d62
mov eax, dword [rbx + 0x24]
cmp dword [rcx], eax
je 0x140065dc9
inc edi
add rcx, 0x18
cmp edi, 0xd
jb 0x140065d55
lea r8, str._unknown_protocol_
mov r9d, dword [rbx + 0x30]
lea rdx, str.inetd__s_:_getsockname__d__failed__using_AF_INET
mov ecx, 0x140
call fcn.14000e820
cmp r14d, 0x80
mov r14, qword [rsp + 0xe8]
jne 0x140065cf4
mov ecx, reloc.WS2_32.dll_recv
call fcn.14000ec70
test al, al
je 0x140065dbd
lea rdx, str.ERROR:_socket_required_for___inetd_operation
mov ecx, reloc.WS2_32.dll_recv
call fcn.14000e820
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
mov eax, edi
lea r8, str.proto_uninitialized
lea rcx, [rax + rax*2]
mov r8, qword [r8 + rcx*8]
jmp 0x140065d74
mov r9, rsi
lea r8, [rsp + 0x40]
mov edx, 2
mov rcx, rbx
call fcn.140064b00
mov rax, qword [rbx]
mov rdx, qword [rax + 0x10]
test rdx, rdx
je 0x140065e05
mov rcx, rbx
call fcn.140063d90
cmp qword [rbx + 0x30], 0xffffffffffffffff
jne 0x140065ec8
cmp byte [rbx + 0x1a0], dil
je 0x140065e97
cmp qword [rbx + 0x178], rdi
jne 0x140065e97
mov rax, qword [rbx]
mov rdx, qword [rax]
test rdx, rdx
je 0x140065e97
cmp word [rbx + 0x28], di
jne 0x140065e8f
mov ecx, 0x40
call fcn.14000ec70
test al, al
je 0x140065e7e
mov rax, qword [rbx]
mov rcx, qword [rax]
mov eax, dword [rcx + 4]
cmp eax, 2
je 0x140065e66
cmp eax, 0x17
lea r8, str.AF_UNSPEC
lea rcx, str.AF_INET6
cmove r8, rcx
jmp 0x140065e6d
lea r8, str.AF_INET
lea rdx, str.Could_not_determine_IPv4_IPv6_protocol._Using__s
mov ecx, 0x40
call fcn.14000e820
mov rdx, qword [rbx]
mov rax, qword [rdx]
movzx ecx, word [rax + 4]
mov word [rbx + 0x28], cx
mov rdx, qword [rdx]
mov rcx, rbx
call fcn.140063d90
cmp qword [rbx + 0x30], 0xffffffffffffffff
jne 0x140065ec8
mov ecx, 0x40
call fcn.14000ec70
test al, al
je 0x140065ebd
lea rdx, str.Could_not_determine_IPv4_IPv6_protocol
mov ecx, 0x40
call fcn.14000e820
mov dword [rsi], 0xa
jmp 0x1400660d8
mov eax, dword [rsi]
test eax, eax
jne 0x1400660d8
mov eax, dword [rbx + 0x24]
cmp eax, 3
jne 0x140065f6d
mov ecx, dword [rbx + 0x1a8]
test ecx, ecx
je 0x140065f40
sub ecx, 1
je 0x140065f29
cmp ecx, 1
jne 0x14006615e
mov rdx, qword [rbx]
xor r8d, r8d
mov rcx, qword [rbx + 0x30]
add rdx, 0x18
call fcn.140064040
mov qword [rbx + 0x30], rax
cmp rax, 0xffffffffffffffff
jne 0x140065f1b
mov dword [rsi], reloc.WS2_32.dll_ntohs
jmp 0x140065f98
mov rcx, qword [rbx]
add rcx, 0x18
call fcn.140064170
jmp 0x140065f98
mov rdx, qword [rbx]
xor r9d, r9d
mov rcx, qword [rbx + 0x30]
mov r8b, 1
mov rdx, qword [rdx]
call fcn.140063ee0
jmp 0x140065f98
mov r9, qword [rbx]
mov r8, qword [rsp + 0x40]
mov rcx, qword [rbx + 0x30]
mov qword [rsp + 0x30], rsi
lea rdx, [r9 + 0x18]
mov byte [rsp + 0x28], dil
mov r9, qword [r9]
mov byte [rsp + 0x20], 1
call fcn.140064240
mov qword [rbx + 0x30], rax
jmp 0x140065f98
cmp eax, 4
jne 0x140065f7f
mov rdx, rsi
mov rcx, rbx
call fcn.140065680
jmp 0x140065f98
cmp eax, 1
jne 0x140065f98
cmp qword [rbx + 0x268], rdi
je 0x140065f98
mov rdx, rsi
mov rcx, rbx
call fcn.140065960
mov eax, dword [rsi]
test eax, eax
jne 0x1400660d8
test byte [rbx + 0x1c0], 2
je 0x140065ff9
movsxd rcx, dword [rbx + 0x30]
lea r9, [rsp + 0x68]
lea edx, [rax + 6]
mov dword [rsp + 0x68], 1
lea r8d, [rax + 1]
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x140065ff9
mov ecx, 0x40
call fcn.14000ec70
test al, al
je 0x140065ff9
mov r8d, dword [rsp + 0x68]
lea rdx, str.NOTE:_setsockopt_TCP_NODELAY_d_failed
mov ecx, 0x40
call fcn.14000e820
mov ecx, dword [rbx + 0x30]
call fcn.1400102c0
mov eax, dword [rbx + 0x1b0]
movsxd rcx, dword [rbx + 0x30]
mov dword [rsp + 0x60], eax
test eax, eax
js 0x1400660d0
movzx eax, word [rbx + 0x28]
cmp ax, 2
je 0x140066083
cmp ax, 0x17
je 0x14006604c
mov ecx, reloc.WS2_32.dll_recv
call fcn.14000ec70
test al, al
je 0x1400660c4
lea rdx, str.__mtu_disc_is_not_supported_on_this_OS
mov ecx, reloc.WS2_32.dll_recv
call fcn.14000e820
jmp 0x1400660c4
mov edx, 0x29
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x60]
lea r8d, [rdx + 0x1e]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x1400660d0
mov ecx, 0x110
call fcn.14000ec70
test al, al
je 0x1400660c4
lea rdx, str.Error_setting_IPV6_MTU_DISCOVER_type_d_on_TCP6_UDP6_socket
jmp 0x1400660b5
xor edx, edx
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x60]
lea r8d, [rdx + 0x47]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x1400660d0
mov ecx, 0x110
call fcn.14000ec70
test al, al
je 0x1400660c4
lea rdx, str.Error_setting_IP_MTU_DISCOVER_type_d_on_TCP_UDP_socket
mov r8d, dword [rsp + 0x60]
mov ecx, 0x110
call fcn.14000e820
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
mov rcx, rbx
call fcn.1400652a0
test r15d, r15d
je 0x1400660e6
mov eax, dword [rsi]
test eax, eax
jne 0x1400660e6
mov dword [rsi], r15d
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.14008aca0
add rsp, 0xa0
pop r15
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea r8, [0x14008d704]
mov edx, 0xc88
lea rcx, str.C:Users_vagrant_buildbotwindows_server_2019_static_msbuildopenvpn_srcopenvpn_socket.c
call fcn.14000ed60
int3
lea r8, str.sock
mov edx, 0x8dc
lea rcx, str.C:Users_vagrant_buildbotwindows_server_2019_static_msbuildopenvpn_srcopenvpn_socket.c
call fcn.14000ed60
int3
lea r8, str.sig_info
mov edx, 0x8dd
lea rcx, str.C:Users_vagrant_buildbotwindows_server_2019_static_msbuildopenvpn_srcopenvpn_socket.c
call fcn.14000ed60
int3
mov rcx, rdx
call fcn.140002fa0
int3
call fcn.14000ede0
int3
lea r8, [0x14008d704]
mov edx, 0x87c
lea rcx, str.C:Users_vagrant_buildbotwindows_server_2019_static_msbuildopenvpn_srcopenvpn_socket.c
call fcn.14000ed60
int3