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

Disassembly:
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0x100
mov rax, qword [0x14021d798]
xor rax, rsp
mov qword [rbp + 0x27], rax
xor r13d, r13d
mov dword [rbp - 0x61], 1
mov dword [rbp - 0x59], r13d
mov r14, rcx
mov r15d, r13d
mov r12d, r13d
test rcx, rcx
jne 0x1400ec817
xor eax, eax
jmp 0x1400ece09
xorps xmm0, xmm0
mov qword [rsp + 0x138], rbx
xor eax, eax
mov qword [rsp + 0x140], rsi
mov qword [rsp + 0x148], rdi
mov rdi, qword [rcx + 0x7d90]
movups xmmword [rbp - 0x49], xmm0
mov qword [rbp - 9], rax
movups xmmword [rbp - 0x39], xmm0
mov qword [rbp + 0x17], rax
movups xmmword [rbp - 0x29], xmm0
mov dword [rbp + 0x1f], eax
movups xmmword [rbp - 0x19], xmm0
mov dword [rbp - 0x79], 0x1c
movups xmmword [rbp + 7], xmm0
lea rsi, str.Out_of_memory
nop dword [rax + rax]
test rdi, rdi
je 0x1400ecdde
movzx eax, byte [rdi]
test al, al
je 0x1400ecdde
mov rbx, rdi
cmp al, 0x20
je 0x1400ec88f
cmp al, 9
jne 0x1400ec898
movzx eax, byte [rdi + 1]
inc rdi
jmp 0x1400ec884
mov edx, 0x2c
mov qword [rbp - 0x71], rdi
mov rcx, rdi
call fcn.140172574
mov rdi, rax
test rax, rax
je 0x1400ec8b9
inc rdi
sub rax, rbx
jmp 0x1400ec8cd
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rbx + rax], r13b
jne 0x1400ec8c0
lea rdi, [rax + rbx]
lea edx, [rax - 1]
test edx, edx
js 0x1400ec8eb
movsxd rcx, edx
movzx eax, byte [rbx + rcx]
cmp al, 0x20
je 0x1400ec8e3
cmp al, 9
jne 0x1400ec8eb
dec edx
sub rcx, 1
jns 0x1400ec8d7
movsxd rax, edx
add rax, 1
mov qword [rbp - 0x69], rax
je 0x1400ec870
test rdi, rdi
je 0x1400ecdde
lea r8, [rbp - 0x5d]
inc r15d
lea rdx, [rbp - 0x49]
lea rcx, [rbp - 0x71]
call fcn.1400e72d0
test eax, eax
jne 0x1400ec966
lea rax, str._IP_ADDRESS:_PORT_sr_
mov r9d, 0x3da7
mov qword [rsp + 0x40], rax
lea r8, str.set_ports_option
mov rax, qword [rbp - 0x71]
mov rdx, r14
mov dword [rsp + 0x38], r15d
xor ecx, ecx
mov qword [rsp + 0x30], rax
mov eax, dword [rbp - 0x69]
mov dword [rsp + 0x28], eax
lea rax, str._.s:_invalid_port_spec__entry__i_._Expecting_list_of:__s
mov qword [rsp + 0x20], rax
call fcn.1400e1360
jmp 0x1400ec870
mov ebx, dword [rbp - 0x5d]
mov r8d, 6
movzx ecx, word [rbp - 0x41]
cmp ebx, 0x63
mov edx, 1
cmove r8d, r13d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp - 0x49], rax
cmp rax, 0xffffffffffffffff
jne 0x1400ec9bc
lea rax, str.cannot_create_socket__entry__i_
mov dword [rsp + 0x28], r15d
mov r9d, 0x3dc0
mov qword [rsp + 0x20], rax
lea r8, str.set_ports_option
mov rdx, r14
xor ecx, ecx
call fcn.1400e1360
jmp 0x1400ec870
lea r9, [rbp - 0x61]
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 0x1400eca08
lea rax, str.cannot_set_socket_option_SO_EXCLUSIVEADDRUSE__entry__i_
mov dword [rsp + 0x28], r15d
mov r9d, 0x3dd9
mov qword [rsp + 0x20], rax
lea r8, str.set_ports_option
mov rdx, r14
xor ecx, ecx
call fcn.1400e1360
cmp ebx, 4
jle 0x1400ecaa5
cmp ebx, 6
jle 0x1400eca53
cmp word [rbp - 0x41], 0x17
jne 0x1400ecaa5
mov rcx, qword [rbp - 0x49]
lea r9, [rbp - 0x59]
mov edx, 0x29
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x1400ecaa5
lea rax, str.cannot_set_socket_option_IPV6_V6ONLYoff__entry__i_
mov r9d, 0x3e01
jmp 0x1400eca8a
cmp word [rbp - 0x41], 0x17
jne 0x1400ecaa5
mov rcx, qword [rbp - 0x49]
lea r9, [rbp - 0x61]
mov edx, 0x29
mov dword [rsp + 0x20], 4
lea r8d, [rdx - 0xe]
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x1400ecaa5
lea rax, str.cannot_set_socket_option_IPV6_V6ONLYon__entry__i_
mov r9d, 0x3e10
mov dword [rsp + 0x28], r15d
lea r8, str.set_ports_option
mov rdx, r14
mov qword [rsp + 0x20], rax
xor ecx, ecx
call fcn.1400e1360
cmp word [rbp - 0x41], 2
jne 0x1400ecb0f
mov rcx, qword [rbp - 0x49]
lea rdx, [rbp - 0x41]
mov r8d, reloc.WS2_32.dll_recv
mov dword [rbp - 0x79], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1400ecb79
call fcn.140180508
mov ecx, dword [rax]
call fcn.14018a088
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x40], rbx
mov r9d, 0x3e24
mov dword [rsp + 0x38], eax
mov rax, qword [rbp - 0x71]
mov qword [rsp + 0x30], rax
mov eax, dword [rbp - 0x69]
mov dword [rsp + 0x28], eax
lea rax, str.cannot_bind_to__.s:__d___s_
jmp 0x1400ecd73
cmp word [rbp - 0x41], 0x17
jne 0x1400ecdc7
mov rcx, qword [rbp - 0x49]
lea rdx, [rbp - 0x41]
mov r8d, 0x1c
mov dword [rbp - 0x79], 0x1c
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1400ecb79
call fcn.140180508
mov ecx, dword [rax]
call fcn.14018a088
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x40], rbx
mov r9d, 0x3e34
mov dword [rsp + 0x38], eax
mov rax, qword [rbp - 0x71]
mov qword [rsp + 0x30], rax
mov eax, dword [rbp - 0x69]
mov dword [rsp + 0x28], eax
lea rax, str.cannot_bind_to_IPv6__.s:__d___s_
jmp 0x1400ecd73
mov rbx, qword [r14 + 0x7dc8]
xor edx, edx
mov rcx, rbx
lea r8d, [rdx + 0xa]
call fcn.14017c9d0
cmp eax, 1
jl 0x1400ecd8e
mov rcx, qword [rbp - 0x49]
mov edx, eax
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1400ecbe7
call fcn.140180508
mov ecx, dword [rax]
call fcn.14018a088
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x40], rbx
mov r9d, 0x3e68
mov dword [rsp + 0x38], eax
mov rax, qword [rbp - 0x71]
mov qword [rsp + 0x30], rax
mov eax, dword [rbp - 0x69]
mov dword [rsp + 0x28], eax
lea rax, str.cannot_listen_to__.s:__d___s_
jmp 0x1400ecd73
mov rcx, qword [rbp - 0x49]
lea r8, [rbp - 0x79]
lea rdx, [rbp + 7]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1400ecd39
movzx eax, word [rbp - 0x41]
cmp word [rbp + 7], ax
jne 0x1400ecd39
movzx eax, word [rbp + 9]
mov rcx, qword [r14 + 8]
mov word [rbp - 0x3f], ax
mov eax, dword [r14 + 0x18]
inc eax
lea rdx, [rax + rax*8]
shl rdx, 3
call fcn.140185628
mov rbx, rax
test rax, rax
jne 0x1400ecc75
mov qword [rsp + 0x28], rsi
lea rax, [0x1401e16f8]
mov r9d, 0x3e8e
lea r8, str.set_ports_option
mov qword [rsp + 0x20], rax
mov rdx, r14
xor ecx, ecx
call fcn.1400e1360
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbp - 0x49], 0xffffffffffffffff
jmp 0x1400ec870
mov edx, dword [r14 + 0x18]
mov rcx, qword [r14 + 0x10]
inc edx
shl rdx, 4
call fcn.140185628
mov rsi, rax
test rax, rax
jne 0x1400eccde
lea rax, [0x1401e16f8]
mov r9d, 0x3e9b
lea rsi, str.Out_of_memory
mov rdx, r14
mov qword [rsp + 0x28], rsi
lea r8, str.set_ports_option
xor ecx, ecx
mov qword [rsp + 0x20], rax
call fcn.1400e1360
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rbx
mov qword [rbp - 0x49], 0xffffffffffffffff
call fcn.140180564
jmp 0x1400ec870
mov rcx, qword [rbp - 0x49]
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov eax, dword [r14 + 0x18]
movaps xmm0, xmmword [rbp - 0x49]
mov qword [r14 + 8], rbx
lea rcx, [rax + rax*8]
movups xmmword [rbx + rcx*8], xmm0
movaps xmm1, xmmword [rbp - 0x39]
movups xmmword [rbx + rcx*8 + 0x10], xmm1
movaps xmm0, xmmword [rbp - 0x29]
movups xmmword [rbx + rcx*8 + 0x20], xmm0
movaps xmm1, xmmword [rbp - 0x19]
movups xmmword [rbx + rcx*8 + 0x30], xmm1
movsd xmm0, qword [rbp - 9]
movsd qword [rbx + rcx*8 + 0x40], xmm0
inc dword [r14 + 0x18]
inc r12d
mov qword [r14 + 0x10], rsi
jmp 0x1400ec861
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.140180508
mov ecx, dword [rax]
call fcn.14018a088
mov qword [rsp + 0x40], rax
mov r9d, 0x3e77
mov rax, qword [rbp - 0x71]
mov dword [rsp + 0x38], ebx
mov qword [rsp + 0x30], rax
mov eax, dword [rbp - 0x69]
mov dword [rsp + 0x28], eax
lea rax, str.call_to_getsockname_failed__.s:__d___s_
lea r8, str.set_ports_option
mov qword [rsp + 0x20], rax
mov rdx, r14
xor ecx, ecx
call fcn.1400e1360
jmp 0x1400ecc5e
lea rax, str.listen_backlog
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
lea r8, str.set_ports_option
lea rax, str._s_value___s__is_invalid
mov r9d, 0x3e5b
mov rdx, r14
mov qword [rsp + 0x20], rax
xor ecx, ecx
call fcn.1400e1360
jmp 0x1400ecc5e
mov dword [rsp + 0x28], r15d
lea rax, str.cannot_bind:_address_family_not_supported__entry__i_
mov r9d, 0x3e4f
jmp 0x1400ecc48
mov rdi, qword [rsp + 0x148]
mov rsi, qword [rsp + 0x140]
mov rbx, qword [rsp + 0x138]
cmp r12d, r15d
je 0x1400ece06
mov rcx, r14
call fcn.1400d76c0
mov r12d, r13d
mov eax, r12d
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.1401702b0
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rbp
ret