Function at 0x14017f6d0
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
lea r15, [0x1404777c0]
mov rdi, rcx
mov rcx, rdx
lea r13, [rsp + 0x54]
call qword [sym.imp.msvcrt.dll__strdup_1]
lea r12, [rsp + 0x50]
mov dword [rsp + 0x34], 0
lea rbp, [rsp + 0x5c]
mov qword [rsp + 0x48], rax
mov r14, rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x40], rax
jmp 0x14017f063
lea rsi, [r14 + rax + 1]
mov byte [rdx], 0
cmp byte [rsi], 0
je 0x14017f07b
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x28], rbp
mov r9, r13
mov r8, r12
lea rdx, str._x:_x__x__x
mov rcx, r14
mov ebx, dword [rdi + 0x32c]
mov qword [rsp + 0x20], rax
call sub.msvcrt.dll_sscanf
cmp eax, 4
je 0x14017efe3
mov qword [rsp + 0x20], rbp
mov r9, r13
mov r8, r12
mov rcx, r14
lea rdx, str._x:_x__x
call sub.msvcrt.dll_sscanf
cmp eax, 3
jne 0x14017f088
mov eax, dword [rsp + 0x54]
mov dword [rsp + 0x58], eax
mov edx, 0x20
mov rcx, r14
call sub.msvcrt.dll_strchr
test rax, rax
mov qword [rsp + 0x38], rax
je 0x14017f057
call fcn.14017c520
mov rdx, qword [rsp + 0x38]
mov rcx, rax
mov r14, rax
add rdx, 1
call fcn.14017cce0
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x14017f0c0
mov rcx, qword [rdi + 0x330]
cmp ebx, dword [rsp + 0x34]
jae 0x14017f0f0
mov edx, dword [rsp + 0x50]
lea rax, [rbx + rbx*2]
lea rax, [rcx + rax*8]
mov dword [rax], edx
mov edx, dword [rsp + 0x54]
mov qword [rax + 0x10], r14
mov dword [rax + 4], edx
mov edx, dword [rsp + 0x58]
mov dword [rax + 8], edx
add dword [rdi + 0x32c], 1
test rsi, rsi
je 0x14017f128
mov r14, rsi
mov rdx, r15
mov rcx, r14
call sub.msvcrt.dll_strcspn
lea rdx, [r14 + rax]
cmp byte [rdx], 0
jne 0x14017ef78
xor esi, esi
jmp 0x14017ef89
mov r9, rbp
mov r8, r12
lea rdx, str._x__x
mov rcx, r14
call sub.msvcrt.dll_sscanf
cmp eax, 2
jne 0x14017f057
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x58], 0xff
jmp 0x14017efe3
mov ecx, 0x18
call sub.msvcrt.dll_malloc
mov qword [rdi + 0x330], rax
mov rcx, rax
test rax, rax
je 0x14017f142
mov dword [rsp + 0x34], 1
jmp 0x14017f030
mov eax, dword [rsp + 0x34]
add eax, eax
lea rdx, [rax + rax*2]
mov dword [rsp + 0x38], eax
shl rdx, 3
call sub.msvcrt.dll_realloc
mov rcx, rax
test rax, rax
je 0x14017f142
mov r9d, dword [rsp + 0x38]
mov qword [rdi + 0x330], rax
mov dword [rsp + 0x34], r9d
jmp 0x14017f030
mov rcx, qword [rsp + 0x48]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.140225b60
mov rcx, r14
call fcn.14017c5b0
jmp 0x14017f057
push r14
push r13
push r12
push rbx
sub rsp, 0x68
mov r14, rcx
lea rcx, str.HWLOC_PCI_LOCALITY
call sub.msvcrt.dll_getenv
mov r12, rax
test rax, rax
je 0x14017f7a0
mov dword [r14 + 0x328], 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.msvcrt.dll__open]
mov r13d, eax
test eax, eax
js 0x14017f780
lea rdx, [rsp + 0x20]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__fstat64]
cmp eax, 0xffffffff
je 0x14017f764
mov rbx, qword [rsp + 0x38]
test eax, eax
jne 0x14017f764
cmp ebx, 0x10000
jg 0x14017f7b0
lea ecx, [rbx + 1]
movsxd rcx, ecx
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x14017f75c
mov r8d, ebx
mov rdx, rax
mov ecx, r13d
call qword [sym.imp.msvcrt.dll__read]
cmp eax, ebx
je 0x14017f7d8
mov rcx, r12
call fcn.140225b60
mov ecx, r13d
add rsp, 0x68
pop rbx
pop r12
pop r13
pop r14
jmp qword [sym.imp.msvcrt.dll__close]
mov rdx, r12
mov rcx, r14
add rsp, 0x68
pop rbx
pop r12
pop r13
pop r14
jmp 0x14017ef20
add rsp, 0x68
pop rbx
pop r12
pop r13
pop r14
ret
mov ecx, 2
call qword [fcn.140225420]
mov r9d, ebx
mov r8, r12
lea rdx, str.Ignoring_HWLOC_PCI_LOCALITY_file___s_too_large___lu_bytes__n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x14017f764
cdqe
mov rdx, r12
mov rcx, r14
mov byte [r12 + rax], 0
call 0x14017ef20
jmp 0x14017f75c