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

Disassembly:
push rbp
push r12
push r13
push r14
lea rbp, [rsp - 0x3f]
sub rsp, 0xa8
mov rax, qword [0x1400d1608]
xor rax, rsp
mov qword [rbp + 0x27], rax
xor r13d, r13d
xor r14d, r14d
mov r12, rcx
mov dword [rbp - 0x1d], 1
test rcx, rcx
jne 0x14000fc7e
xor eax, eax
jmp 0x1400101be
xor eax, eax
mov qword [rsp + 0xd8], rbx
mov rbx, qword [rcx + 0xf8]
mov qword [rsp + 0xe0], rsi
mov qword [rsp + 0xe8], rdi
mov qword [rsp + 0xa0], r15
lea r15, str._IP_ADDRESS:_PORT_sr_
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
mov qword [rbp - 1], rax
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], rax
mov dword [rbp - 0x39], reloc.WS2_32.dll_recv
test rbx, rbx
je 0x14001018b
cmp byte [rbx], 0
je 0x14001018b
movzx eax, byte [rbx]
cmp al, 0x20
je 0x14000fcf2
cmp al, 9
jne 0x14000fcf7
inc rbx
jmp 0x14000fce7
mov edx, 0x2c
mov rcx, rbx
mov rsi, rbx
mov qword [rbp - 0x31], rbx
call fcn.14006fd18
mov rbx, rax
test rax, rax
je 0x14000fd1b
sub rax, rsi
inc rbx
jmp 0x14000fd34
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
dec rcx
lea rbx, [rsi + rcx]
mov rax, rbx
sub rax, rsi
lea edx, [rax - 1]
movsxd rax, edx
test edx, edx
js 0x14000fd55
nop
movzx ecx, byte [rax + rsi]
cmp cl, 0x20
je 0x14000fd4e
cmp cl, 9
jne 0x14000fd55
dec edx
dec rax
jns 0x14000fd40
lea eax, [rdx + 1]
movsxd rcx, eax
mov qword [rbp - 0x29], rcx
test eax, eax
je 0x14000fcd5
test rbx, rbx
je 0x14001018b
lea r8, [rbp - 0x21]
lea rdx, [rbp - 0x19]
lea rcx, [rbp - 0x31]
inc r13d
call fcn.14000d300
test eax, eax
jne 0x14000fdc8
mov r9, qword [rbp - 0x31]
mov r8d, dword [rbp - 0x29]
lea rax, [r12 + 0xf0]
lea rdx, str._.s:_invalid_port_spec__entry__i_._Expecting_list_of:__s
lea rcx, [0x140233740]
mov qword [rsp + 0x28], r15
mov qword [0x140234010], rax
mov qword [0x140234008], r12
mov dword [rsp + 0x20], r13d
call fcn.14000e440
jmp 0x14000fcd5
cmp byte [rbp + 0xf], 0
je 0x14000fe05
lea rax, [r12 + 0xf0]
cmp qword [rax], 0
jne 0x14000fe05
lea rdx, str.Cannot_add_SSL_socket__entry__i_
lea rcx, [0x140233740]
mov r8d, r13d
mov qword [0x140234008], r12
mov qword [0x140234010], rax
call fcn.14000e440
jmp 0x14000fcd5
movzx ecx, word [rbp - 0x11]
mov edx, 1
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbp - 0x19], rax
cmp rax, 0xffffffffffffffff
jne 0x14000fe53
lea rax, [r12 + 0xf0]
lea rdx, str.cannot_create_socket__entry__i_
lea rcx, [0x140233740]
mov r8d, r13d
mov qword [0x140234008], r12
mov qword [0x140234010], rax
call fcn.14000e440
jmp 0x14000fcd5
lea r9, [rbp - 0x1d]
mov edx, 0xffff
mov r8d, 0xfffffffb
mov rcx, rax
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x14000fea3
lea rax, [r12 + 0xf0]
lea rdx, str.cannot_set_socket_option_SO_EXCLUSIVEADDRUSE__entry__i_
lea rcx, [0x140233740]
mov r8d, r13d
mov qword [0x140234008], r12
mov qword [0x140234010], rax
call fcn.14000e440
cmp dword [rbp - 0x21], 4
jle 0x14000feb5
lea r8, str.IPv6_not_available
jmp 0x14000fff2
cmp word [rbp - 0x11], 2
jne 0x14001015a
mov rcx, qword [rbp - 0x19]
lea rdx, [rbp - 0x11]
mov r8d, reloc.WS2_32.dll_recv
mov dword [rbp - 0x39], reloc.WS2_32.dll_recv
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14000ff33
lea rax, [r12 + 0xf0]
mov qword [0x140234008], r12
mov qword [0x140234010], rax
call fcn.140073298
mov ecx, dword [rax]
call fcn.140073314
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, qword [rbp - 0x31]
mov r8d, dword [rbp - 0x29]
lea rdx, str.cannot_bind_to__.s:__d___s_
lea rcx, [0x140233740]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
call fcn.14000e440
jmp 0x14001001b
mov rcx, qword [rbp - 0x19]
mov edx, 0x7fffffff
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x14000ff9a
lea rax, [r12 + 0xf0]
mov qword [0x140234008], r12
mov qword [0x140234010], rax
call fcn.140073298
mov ecx, dword [rax]
call fcn.140073314
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9, qword [rbp - 0x31]
mov r8d, dword [rbp - 0x29]
lea rdx, str.cannot_listen_to__.s:__d___s_
lea rcx, [0x140233740]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], eax
call fcn.14000e440
jmp 0x14001001b
mov rcx, qword [rbp - 0x19]
lea r8, [rbp - 0x39]
lea rdx, [rbp + 0x17]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x140010107
movzx eax, word [rbp - 0x11]
cmp word [rbp + 0x17], ax
jne 0x140010107
movzx eax, word [rbp + 0x19]
mov rcx, qword [r12 + 8]
mov word [rbp - 0xf], ax
mov eax, dword [r12 + 0x18]
inc eax
lea rdx, [rax + rax*2]
shl rdx, 4
call fcn.140074c20
mov rdi, rax
test rax, rax
jne 0x140010032
lea r8, str.Out_of_memory
lea rax, [r12 + 0xf0]
lea rdx, [0x1400a24e0]
lea rcx, [0x140233740]
mov qword [0x140234010], rax
mov qword [0x140234008], r12
call fcn.14000e440
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbp - 0x19], 0xffffffffffffffff
jmp 0x14000fcd5
mov edx, dword [r12 + 0x18]
mov rcx, qword [r12 + 0x10]
inc edx
shl rdx, 4
call fcn.140074c20
mov qword [0x140234008], r12
mov rsi, rax
test rax, rax
lea rax, [r12 + 0xf0]
mov qword [0x140234010], rax
jne 0x14001009e
lea r8, str.Out_of_memory
lea rdx, [0x1400a24e0]
lea rcx, [0x140233740]
call fcn.14000e440
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, rdi
mov qword [rbp - 0x19], 0xffffffffffffffff
call fcn.1400733f0
jmp 0x14000fcd5
mov rcx, qword [rbp - 0x19]
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov eax, dword [r12 + 0x18]
mov qword [r12 + 8], rdi
lea rcx, [rax + rax*2]
mov rax, qword [rbp - 0x19]
add rcx, rcx
mov qword [rdi + rcx*8], rax
mov rax, qword [rbp - 0x11]
mov qword [rdi + rcx*8 + 8], rax
mov rax, qword [rbp - 9]
mov qword [rdi + rcx*8 + 0x10], rax
mov rax, qword [rbp - 1]
mov qword [rdi + rcx*8 + 0x18], rax
mov rax, qword [rbp + 7]
mov qword [rdi + rcx*8 + 0x20], rax
mov rax, qword [rbp + 0xf]
mov qword [rdi + rcx*8 + 0x28], rax
inc dword [r12 + 0x18]
inc r14d
mov qword [r12 + 0x10], rsi
jmp 0x14000fcd5
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, [r12 + 0xf0]
mov qword [0x140234008], r12
mov edi, eax
mov qword [0x140234010], rcx
call fcn.140073298
mov ecx, dword [rax]
call fcn.140073314
mov r9, qword [rbp - 0x31]
mov r8d, dword [rbp - 0x29]
mov qword [rsp + 0x28], rax
lea rdx, str.call_to_getsockname_failed__.s:__d___s_
lea rcx, [0x140233740]
mov dword [rsp + 0x20], edi
call fcn.14000e440
jmp 0x14001001b
lea rax, [r12 + 0xf0]
lea rdx, str.cannot_bind:_address_family_not_supported__entry__i_
lea rcx, [0x140233740]
mov r8d, r13d
mov qword [0x140234008], r12
mov qword [0x140234010], rax
call fcn.14000e440
jmp 0x14001001b
mov r15, qword [rsp + 0xa0]
mov rdi, qword [rsp + 0xe8]
mov rsi, qword [rsp + 0xe0]
mov rbx, qword [rsp + 0xd8]
cmp r14d, r13d
je 0x1400101bb
mov rcx, r12
call fcn.14000d280
xor r14d, r14d
mov eax, r14d
mov rcx, qword [rbp + 0x27]
xor rcx, rsp
call fcn.14006f1f0
add rsp, 0xa8
pop r14
pop r13
pop r12
pop rbp
ret