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

Disassembly:
push rbp
push r12
push r13
push r15
lea rbp, [rsp - 0x3f]
sub rsp, 0xb8
mov rax, qword [0x140067008]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xor r12d, r12d
mov dword [rbp + 0x17], 1
xor r13d, r13d
mov r15, rcx
test rcx, rcx
jne 0x14001242e
xor eax, eax
jmp 0x140012980
mov qword [rsp + 0xe8], rbx
xorps xmm0, xmm0
mov rbx, qword [rcx + 0x90]
mov qword [rsp + 0xf0], rsi
mov qword [rsp + 0xf8], rdi
mov qword [rsp + 0xb0], r14
movups xmmword [rbp - 0x29], xmm0
mov dword [rbp - 0x31], reloc.WS2_32.dll_recv
movups xmmword [rbp - 0x19], xmm0
movups xmmword [rbp - 9], xmm0
movups xmmword [rbp + 0x1f], xmm0
nop
test rbx, rbx
je 0x14001294d
movzx eax, byte [rbx]
test al, al
je 0x14001294d
mov rdi, rbx
cmp al, 0x20
je 0x14001248f
cmp al, 9
jne 0x140012498
movzx eax, byte [rbx + 1]
inc rbx
jmp 0x140012484
mov edx, 0x2c
mov rcx, rbx
mov r14, rbx
call fcn.14002c2d0
mov rbx, rax
test rax, rax
je 0x1400124b8
inc rbx
sub rax, rdi
jmp 0x1400124cd
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rdi + rax], 0
jne 0x1400124c0
lea rbx, [rax + rdi]
lea edx, [rax - 1]
test edx, edx
js 0x1400124ed
movsxd rax, edx
movzx ecx, byte [rdi + rax]
cmp cl, 0x20
je 0x1400124e5
cmp cl, 9
jne 0x1400124ed
dec edx
sub rax, 1
jns 0x1400124d7
lea eax, [rdx + 1]
movsxd rsi, eax
test eax, eax
je 0x140012470
test rbx, rbx
je 0x14001294d
xorps xmm0, xmm0
lea r9, [rbp + 0xb]
mov eax, 2
lea r8, [rbp + 7]
movups xmmword [rbp - 0x29], xmm0
mov word [rbp - 0x21], ax
lea rdx, str._u._u._u._u:_u_n
lea rax, [rbp - 0x39]
mov rcx, r14
mov qword [rsp + 0x38], rax
inc r12d
lea rax, [rbp - 0x35]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x13]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xf]
mov qword [rsp + 0x20], rax
movups xmmword [rbp - 0x19], xmm0
movups xmmword [rbp - 9], xmm0
call fcn.140006980
cmp eax, 5
jne 0x14001257f
mov ecx, dword [rbp + 7]
shl ecx, 8
or ecx, dword [rbp + 0xb]
shl ecx, 8
or ecx, dword [rbp + 0xf]
shl ecx, 8
or ecx, dword [rbp + 0x13]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp - 0x1d], eax
jmp 0x14001259b
lea r9, [rbp - 0x39]
mov rcx, r14
lea r8, [rbp - 0x35]
lea rdx, str._u_n
call fcn.140006980
cmp eax, 1
jne 0x1400125bd
movzx ecx, word [rbp - 0x35]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x1f], ax
mov eax, dword [rbp - 0x39]
test eax, eax
jns 0x1400125b8
cmp eax, esi
ja 0x140012917
mov edx, dword [rbp - 0x35]
jmp 0x1400125c7
xor edx, edx
xor eax, eax
mov dword [rbp - 0x35], edx
mov dword [rbp - 0x39], eax
cdqe
movzx ecx, byte [rax + r14]
cmp cl, 0x73
sete r8b
cmp cl, 0x72
mov byte [rbp - 1], r8b
sete byte [rbp]
cmp edx, 0xffff
jae 0x140012917
test cl, cl
je 0x140012600
lea eax, [rcx - 0x72]
cmp al, 1
jbe 0x140012600
cmp cl, 0x2c
jne 0x140012917
test r8b, r8b
je 0x14001262e
cmp qword [r15 + 8], 0
jne 0x14001262e
mov r8d, r12d
mov qword [0x14006ade0], r15
lea rdx, str.Cannot_add_SSL_socket__entry__i_._Is__ssl_certificate_option_set_
lea rcx, [0x14006a950]
call fcn.1400079a0
jmp 0x140012470
movzx ecx, word [rbp - 0x21]
mov edx, 1
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp - 0x29], rax
cmp rax, 0xffffffffffffffff
jne 0x14001266d
mov r8d, r12d
mov qword [0x14006ade0], r15
lea rdx, str.cannot_create_socket__entry__i_
lea rcx, [0x14006a950]
call fcn.1400079a0
jmp 0x140012470
lea r9, [rbp + 0x17]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0xfffffffb
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x1400126ae
mov r8d, r12d
mov qword [0x14006ade0], r15
lea rdx, str.cannot_set_socket_option_SO_EXCLUSIVEADDRUSE__entry__i_
lea rcx, [0x14006a950]
call fcn.1400079a0
cmp word [rbp - 0x21], 2
jne 0x1400128f5
mov rcx, qword [rbp - 0x29]
lea rdx, [rbp - 0x21]
mov r8d, reloc.WS2_32.dll_recv
mov dword [rbp - 0x31], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14001271b
mov qword [0x14006ade0], r15
call fcn.140036b5c
mov ecx, dword [rax]
call fcn.14003d3fc
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, r14
mov qword [rsp + 0x28], rdi
mov r8d, esi
mov dword [rsp + 0x20], eax
lea rdx, str.cannot_bind_to__.s:__d___s_
lea rcx, [0x14006a950]
call fcn.1400079a0
jmp 0x14001280c
mov rcx, qword [rbp - 0x29]
mov edx, 0x7fffffff
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140012771
mov qword [0x14006ade0], r15
call fcn.140036b5c
mov ecx, dword [rax]
call fcn.14003d3fc
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, r14
mov qword [rsp + 0x28], rdi
mov r8d, esi
mov dword [rsp + 0x20], eax
lea rdx, str.cannot_listen_to__.s:__d___s_
lea rcx, [0x14006a950]
call fcn.1400079a0
jmp 0x14001280c
mov rcx, qword [rbp - 0x29]
lea r8, [rbp - 0x31]
lea rdx, [rbp + 0x1f]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1400127c6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov qword [0x14006ade0], r15
call fcn.140036b5c
mov ecx, dword [rax]
call fcn.14003d3fc
mov qword [rsp + 0x28], rax
lea rdx, str.call_to_getsockname_failed__.s:__d___s_
mov r9, r14
mov dword [rsp + 0x20], edi
mov r8d, esi
lea rcx, [0x14006a950]
call fcn.1400079a0
jmp 0x14001280c
mov eax, dword [r15 + 0x1b8]
mov rcx, qword [r15 + 0x1a8]
inc eax
lea rdx, [rax + rax*2]
shl rdx, 4
call fcn.14003382c
mov rdi, rax
test rax, rax
jne 0x140012823
lea r8, str.Out_of_memory
mov qword [0x14006ade0], r15
lea rdx, [0x140059f14]
lea rcx, [0x14006a950]
call fcn.1400079a0
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbp - 0x29], 0xffffffffffffffff
jmp 0x140012470
mov edx, dword [r15 + 0x1b8]
mov rcx, qword [r15 + 0x1b0]
inc edx
add rdx, rdx
call fcn.14003382c
mov qword [0x14006ade0], r15
mov rsi, rax
test rax, rax
jne 0x140012883
lea r8, str.Out_of_memory
lea rdx, [0x140059f14]
lea rcx, [0x14006a950]
call fcn.1400079a0
mov rcx, qword [rbp - 0x29]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rdi
mov qword [rbp - 0x29], 0xffffffffffffffff
call fcn.14002da28
jmp 0x140012470
mov rcx, qword [rbp - 0x29]
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov eax, dword [r15 + 0x1b8]
movups xmm0, xmmword [rbp - 0x29]
mov qword [r15 + 0x1a8], rdi
lea rcx, [rax + rax*2]
add rcx, rcx
movups xmmword [rdi + rcx*8], xmm0
movups xmm1, xmmword [rbp - 0x19]
movups xmmword [rdi + rcx*8 + 0x10], xmm1
movups xmm0, xmmword [rbp - 9]
movups xmmword [rdi + rcx*8 + 0x20], xmm0
movzx ecx, word [rbp + 0x21]
mov qword [r15 + 0x1b0], rsi
call qword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [r15 + 0x1b8]
mov rcx, qword [r15 + 0x1b0]
mov word [rcx + rdx*2], ax
inc dword [r15 + 0x1b8]
inc r13d
jmp 0x140012470
mov r8d, r12d
mov qword [0x14006ade0], r15
lea rdx, str.cannot_bind:_address_family_not_supported__entry__i_
lea rcx, [0x14006a950]
call fcn.1400079a0
jmp 0x140012470
lea rax, str._IP_ADDRESS:_PORT_sr_
mov qword [0x14006ade0], r15
mov qword [rsp + 0x28], rax
lea rdx, str._.s:_invalid_port_spec__entry__i_._Expecting_list_of:__s
mov r9, r14
mov dword [rsp + 0x20], r12d
mov r8d, esi
lea rcx, [0x14006a950]
call fcn.1400079a0
jmp 0x140012470
mov r14, qword [rsp + 0xb0]
mov rdi, qword [rsp + 0xf8]
mov rsi, qword [rsp + 0xf0]
mov rbx, qword [rsp + 0xe8]
cmp r13d, r12d
je 0x14001297d
mov rcx, r15
call fcn.140012350
xor r13d, r13d
mov eax, r13d
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.14002b5c0
add rsp, 0xb8
pop r15
pop r13
pop r12
pop rbp
ret