Function at 0x1400e2ae0
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, [0x1402a3f10]
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 0x1400e2443
lea rsi, [r14 + rax + 1]
mov byte [rdx], 0
cmp byte [rsi], 0
je 0x1400e245b
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 + 0x354]
mov qword [rsp + 0x20], rax
call fcn.1400e22d0
cmp eax, 4
je 0x1400e23c3
mov qword [rsp + 0x20], rbp
mov r9, r13
mov r8, r12
mov rcx, r14
lea rdx, str._x:_x__x
call fcn.1400e22d0
cmp eax, 3
jne 0x1400e2468
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 0x1400e2437
call fcn.1400df8b0
mov rdx, qword [rsp + 0x38]
mov rcx, rax
mov r14, rax
add rdx, 1
call fcn.1400e0070
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x1400e24a0
mov rcx, qword [rdi + 0x358]
cmp ebx, dword [rsp + 0x34]
jae 0x1400e24d0
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 + 0x354], 1
test rsi, rsi
je 0x1400e2510
mov r14, rsi
mov rdx, r15
mov rcx, r14
call sub.msvcrt.dll_strcspn
lea rdx, [r14 + rax]
cmp byte [rdx], 0
jne 0x1400e2358
xor esi, esi
jmp 0x1400e2369
mov r9, rbp
mov r8, r12
lea rdx, str._x__x
mov rcx, r14
call fcn.1400e22d0
cmp eax, 2
jne 0x1400e2437
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x58], 0xff
jmp 0x1400e23c3
mov ecx, 0x18
call sub.msvcrt.dll_malloc
mov qword [rdi + 0x358], rax
mov rcx, rax
test rax, rax
je 0x1400e252a
mov dword [rsp + 0x34], 1
jmp 0x1400e2410
mov eax, dword [rsp + 0x34]
add eax, eax
mov 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 0x1400e252a
mov r9d, dword [rsp + 0x38]
mov qword [rdi + 0x358], rax
mov dword [rsp + 0x34], r9d
jmp 0x1400e2410
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.140124a98
mov rcx, r14
call fcn.1400df940
jmp 0x1400e2437
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 0x1400e2bb0
mov dword [r14 + 0x350], 1
xor edx, edx
mov rcx, rax
call qword [sym.imp.msvcrt.dll__open]
mov r13d, eax
test eax, eax
js 0x1400e2b90
lea rdx, [rsp + 0x20]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__fstat64]
cmp eax, 0xffffffff
je 0x1400e2b78
mov rbx, qword [rsp + 0x38]
test eax, eax
jne 0x1400e2b78
cmp ebx, 0x10000
jg 0x1400e2bc0
lea ecx, [rbx + 1]
movsxd rcx, ecx
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x1400e2b70
mov r8d, ebx
mov rdx, rax
mov ecx, r13d
call qword [sym.imp.msvcrt.dll__read]
cmp eax, ebx
je 0x1400e2bf0
mov rcx, r12
call fcn.140124a98
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 0x1400e2300
add rsp, 0x68
pop rbx
pop r12
pop r13
pop r14
ret
call fcn.1400ce690
cmp eax, 1
jg 0x1400e2b78
mov ecx, 2
call qword [fcn.140124330]
mov r9d, ebx
mov r8, r12
lea rdx, str.hwloc_pci:_Ignoring_HWLOC_PCI_LOCALITY_file___s_too_large___lu_bytes__n
mov rcx, rax
call fcn.1400e22a0
jmp 0x1400e2b78
cdqe
mov rdx, r12
mov rcx, r14
mov byte [r12 + rax], 0
call 0x1400e2300
jmp 0x1400e2b70