Function at 0x140174490
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
sub rsp, 0x40
mov r8d, dword [rcx + 0xc8]
mov r12, rcx
test r8d, r8d
jne 0x140174e90
call fcn.140177cb0
lea rcx, str.HWLOC_XML_USERDATA_NOT_DECODED
call sub.msvcrt.dll_getenv
test rax, rax
je 0x1401744d1
mov dword [r12 + 0x2b0], 1
lea rcx, [0x1404764df]
call sub.msvcrt.dll_getenv
test rax, rax
je 0x140174c00
mov qword [rsp + 0x38], 0
lea rcx, str.HWLOC_ALLOW
call sub.msvcrt.dll_getenv
mov rsi, rax
test rax, rax
je 0x14017451f
mov ecx, 4
lea rdi, [0x140476542]
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x14017451f
or dword [rsp + 0x3c], 2
mov rcx, r12
call fcn.14017a1f0
mov rcx, r12
call fcn.14017a650
mov rcx, r12
call fcn.14017a790
mov rcx, r12
call fcn.14017c0b0
mov rcx, r12
call fcn.14017f6d0
mov dword [r12 + 0xcc], 0
call fcn.14017c580
mov qword [r12 + 0x1b8], rax
call fcn.14017c580
mov esi, dword [r12 + 0x300]
mov qword [r12 + 0x1c0], rax
test sil, 1
jne 0x140174918
test sil, 2
jne 0x14017496e
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rax, qword [rax]
mov rcx, qword [rax + 0xb8]
test rcx, rcx
je 0x140174e58
call fcn.14017d980
test eax, eax
jne 0x140174e58
and esi, 4
jne 0x140174b20
mov rax, qword [r12 + 0x280]
test rax, rax
je 0x1401745f0
mov ecx, dword [r12 + 0xc4]
test ecx, ecx
je 0x1401745f0
test byte [rsp + 0x3c], 2
jne 0x1401745f0
test byte [r12 + 0x20], 4
je 0x140174de0
mov rcx, r12
call rax
or dword [rsp + 0x3c], 2
mov rax, qword [r12 + 0x18]
lea r13, [r12 + 0x310]
mov rax, qword [rax]
mov rax, qword [rax]
mov rcx, qword [rax + 0xd0]
call fcn.14017d980
test eax, eax
jne 0x140174998
mov rcx, qword [r12 + 0x320]
call fcn.140225b60
mov qword [r12 + 0x310], 0
mov qword [r12 + 0x318], 0
mov qword [r13 + 0x10], 0
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rax, qword [rax]
mov rcx, qword [rax + 0xb8]
mov r8, qword [rax + 0xc0]
mov rdx, rcx
call fcn.14017dea0
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rax, qword [rax]
mov rcx, qword [rax + 0xc8]
mov r8, qword [rax + 0xd0]
mov rdx, rcx
call fcn.14017dea0
mov rax, qword [r12 + 0x18]
mov rcx, qword [r12 + 0x1b8]
mov rax, qword [rax]
mov rdx, rcx
mov rax, qword [rax]
mov r8, qword [rax + 0xb8]
call fcn.14017dea0
mov rax, qword [r12 + 0x18]
mov rcx, qword [r12 + 0x1c0]
mov rax, qword [rax]
mov rdx, rcx
mov rax, qword [rax]
mov r8, qword [rax + 0xc8]
call fcn.14017dea0
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rcx, qword [rax]
call fcn.14016b820
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rcx, qword [rax]
call fcn.14016b960
test byte [r12 + 0x20], 1
je 0x140174b40
mov rax, qword [r12 + 0x18]
mov rcx, qword [rax]
mov r13, qword [rcx]
mov eax, dword [r13]
cmp eax, 0x13
ja 0x140174ed7
mov edx, eax
mov edx, dword [r12 + rdx*4 + 0x74]
cmp edx, 1
je 0x140174a60
cmp edx, 3
je 0x140174a38
mov edx, dword [r12 + 0xcc]
test edx, edx
je 0x14017476f
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rcx, qword [rax]
call fcn.14016b390
mov rcx, r12
call fcn.14016e1d0
test eax, eax
js 0x140174e64
mov rcx, r12
call fcn.14016b570
test eax, eax
js 0x140174e64
mov dword [r12 + 0xcc], 0
mov eax, dword [r12 + 0x300]
test al, 8
jne 0x140174b60
test al, 0x10
jne 0x140174b8a
test al, 0x20
jne 0x140174bb4
test al, 0x40
jne 0x140174bde
lea rcx, str.HWLOC_DEBUG_SORT_CHILDREN
call sub.msvcrt.dll_getenv
test rax, rax
je 0x1401747b8
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rcx, qword [rax]
call fcn.14016bfd0
mov rax, qword [r12 + 0x18]
mov rcx, r12
mov rax, qword [rax]
mov rdx, qword [rax]
call fcn.14016f550
mov rax, qword [r12 + 0x18]
mov rcx, r12
mov rdx, qword [rax]
call fcn.14016f6f0
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov r14, qword [rax]
test r14, r14
je 0x140174f1d
mov rcx, qword [r14 + 0xb8]
call fcn.14017d980
test eax, eax
jne 0x140174ef3
mov rcx, qword [r14 + 0xc8]
call fcn.14017d980
mov r13d, eax
test eax, eax
jne 0x140174eb0
mov eax, dword [r12 + 0xcc]
test eax, eax
je 0x14017485a
mov rcx, r14
call fcn.14016b390
mov rcx, r12
call fcn.14016e1d0
test eax, eax
js 0x140174e64
mov rcx, r12
call fcn.14016b570
test eax, eax
js 0x140174e64
mov dword [r12 + 0xcc], 0
mov rcx, r12
call fcn.14016e790
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rcx, qword [rax]
call fcn.14016baa0
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rcx, qword [rax]
call fcn.14016d570
mov rcx, r12
call fcn.14016adc0
mov rax, qword [r12 + 0x2f0]
test rax, rax
je 0x1401748b8
mov rax, qword [rax]
mov ecx, 4
lea rdi, [0x140475d8f]
mov rsi, qword [rax]
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x140174d30
mov rcx, r12
call fcn.14017f7f0
lea rcx, str.HWLOC_DEBUG_CHECK
call sub.msvcrt.dll_getenv
test rax, rax
je 0x1401748d9
mov rcx, r12
call fcn.1401731c0
mov rcx, r12
call fcn.140179180
mov rcx, r12
call fcn.140178ba0
mov dword [r12 + 0xc8], 1
test byte [r12 + 0x300], 0x80
jne 0x140174af0
mov eax, r13d
add rsp, 0x40
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov rsi, qword [r12 + 0x2f0]
test rsi, rsi
je 0x140174dc0
cmp dword [rsi + 0x20], 1
je 0x140174949
mov r8d, 0xcd4
lea rdx, str.topology.c
lea rcx, str.global_backend__phases__HWLOC_DISC_PHASE_GLOBAL
call qword [sym.imp.msvcrt.dll__assert]
mov rcx, rsi
mov dword [rsp + 0x34], 1
lea rdx, [rsp + 0x34]
call qword [rsi + 0x40]
mov esi, dword [r12 + 0x300]
test sil, 2
je 0x140174589
mov rcx, qword [r12 + 0x2f0]
lea rdx, [rsp + 0x34]
mov dword [rsp + 0x34], 2
call fcn.14016c440
mov esi, dword [r12 + 0x300]
jmp 0x140174589
xor r8d, r8d
mov edx, 0xd
mov rcx, r12
call fcn.1401709c0
mov rsi, rax
mov rax, qword [r12 + 0x18]
mov rax, qword [rax]
mov rax, qword [rax]
mov rcx, qword [rax + 0xb8]
call fcn.14017c6a0
mov qword [rsi + 0xb8], rax
call fcn.14017c520
xor edx, edx
mov qword [rsi + 0xc8], rax
mov rcx, rax
call fcn.14017d410
mov rax, qword [rsi + 0x28]
mov r8, rsi
mov rcx, r12
movdqu xmm0, xmmword [r12 + 0x310]
lea r9, [0x14016d8a0]
movups xmmword [rax], xmm0
mov rdx, qword [r13 + 0x10]
mov qword [rax + 0x10], rdx
xor edx, edx
mov qword [r12 + 0x310], 0
mov qword [r12 + 0x318], 0
mov qword [r13 + 0x10], 0
call fcn.1401713b0
jmp 0x140174644
cmp eax, 0xf
je 0x140174e18
cmp eax, 0x10
jne 0x140174727
mov rax, qword [r13 + 0x28]
cmp dword [rax], 4
jne 0x140174727
nop word [rax + rax]
mov r11, qword [r13 + 0x78]
test r11, r11
je 0x140174727
cmp qword [r11 + 0x58], 0
jne 0x140174727
mov qword [r11 + 0x48], 0
mov qword [rcx], r11
mov rdx, qword [r13 + 0x90]
test rdx, rdx
je 0x140174a9e
lea rcx, [r11 + 0x90]
mov r8, r11
call fcn.14016ad20
mov rdx, qword [r13 + 0xa0]
test rdx, rdx
je 0x140174ab9
lea rcx, [r11 + 0xa0]
mov r8, r11
call fcn.14016ad20
mov rdx, qword [r13 + 0xb0]
test rdx, rdx
je 0x140174ad4
lea rcx, [r11 + 0xb0]
mov r8, r11
call fcn.14016ad20
mov rcx, r13
call fcn.14016d690
mov rcx, r13
call fcn.140225b60
jmp 0x140174727
mov rcx, qword [r12 + 0x2f0]
lea rdx, [rsp + 0x34]
mov dword [rsp + 0x34], pe_nt_image_headers64
call fcn.14016c440
mov eax, r13d
add rsp, 0x40
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov rcx, qword [r12 + 0x2f0]
lea rdx, [rsp + 0x34]
mov dword [rsp + 0x34], 4
call fcn.14016c440
jmp 0x1401745ba
mov rax, qword [r12 + 0x18]
mov rcx, r12
mov rax, qword [rax]
mov rdx, qword [rax]
call fcn.14016b7a0
jmp 0x1401746f6
mov rcx, qword [r12 + 0x2f0]
lea rdx, [rsp + 0x34]
mov dword [rsp + 0x34], 8
call fcn.14016c440
mov eax, dword [r12 + 0x300]
test al, 0x10
je 0x140174787
mov rcx, qword [r12 + 0x2f0]
lea rdx, [rsp + 0x34]
mov dword [rsp + 0x34], 0x10
call fcn.14016c440
mov eax, dword [r12 + 0x300]
test al, 0x20
je 0x14017478f
mov rcx, qword [r12 + 0x2f0]
lea rdx, [rsp + 0x34]
mov dword [rsp + 0x34], 0x20
call fcn.14016c440
mov eax, dword [r12 + 0x300]
test al, 0x40
je 0x140174797
mov rcx, qword [r12 + 0x2f0]
lea rdx, [rsp + 0x34]
mov dword [rsp + 0x34], 0x40
call fcn.14016c440
jmp 0x140174797
cmp qword [r12 + 0x2f0], 0
jne 0x1401744e6
lea rcx, str.HWLOC_FSROOT
call sub.msvcrt.dll_getenv
test rax, rax
je 0x140174c49
mov qword [rsp + 0x28], 0
xor r9d, r9d
mov edx, 1
mov rcx, r12
mov qword [rsp + 0x20], 0
lea r8, [0x1404764fd]
call fcn.14017a880
cmp qword [r12 + 0x2f0], 0
jne 0x1401744e6
lea rcx, [0x140476503]
call sub.msvcrt.dll_getenv
test rax, rax
je 0x140174c92
mov qword [rsp + 0x28], 0
xor r9d, r9d
mov edx, 1
mov rcx, r12
mov qword [rsp + 0x20], 0
lea r8, [0x140476514]
call fcn.14017a880
cmp qword [r12 + 0x2f0], 0
jne 0x1401744e6
lea rcx, [0x140476518]
call sub.msvcrt.dll_getenv
mov r9, rax
test rax, rax
je 0x140174cdb
lea r8, [0x140475d85]
mov edx, 1
mov rcx, r12
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call fcn.14017a880
cmp qword [r12 + 0x2f0], 0
jne 0x1401744e6
lea rcx, [0x140476528]
call sub.msvcrt.dll_getenv
mov r9, rax
test rax, rax
je 0x1401744e6
lea r8, [0x140475d8f]
mov edx, 1
mov rcx, r12
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call fcn.14017a880
jmp 0x1401744e6
lea rcx, str.HWLOC_DONT_ADD_VERSION_INFO
call sub.msvcrt.dll_getenv
test rax, rax
jne 0x1401748b8
mov rax, qword [r12 + 0x18]
lea r9, [0x140475606]
lea r8, [0x140476678]
mov rax, qword [rax]
mov rcx, qword [rax]
lea rdx, [rcx + 0xe0]
add rcx, 0xd8
call fcn.14016f8f0
mov rcx, r12
call fcn.1401807c0
mov r14, rax
test rax, rax
je 0x1401748b8
mov rax, qword [r12 + 0x18]
mov r9, r14
lea r8, [0x140476685]
mov rax, qword [rax]
mov rcx, qword [rax]
lea rdx, [rcx + 0xe0]
add rcx, 0xd8
call fcn.14016f8f0
mov rcx, r14
call fcn.140225b60
jmp 0x1401748b8
mov r8d, 0xcd3
lea rdx, str.topology.c
lea rcx, str.global_backend
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140174929
lea rcx, str.HWLOC_THISSYSTEM_ALLOWED_RESOURCES
call sub.msvcrt.dll_getenv
mov rcx, rax
test rax, rax
je 0x1401745f0
call sub.msvcrt.dll_atoi
test eax, eax
je 0x1401745f0
mov rax, qword [r12 + 0x280]
jmp 0x1401745e6
mov rax, qword [r13 + 0x28]
movzx eax, word [rax + 6]
movzx edx, ah
cmp edx, 0x12
ja 0x140174e40
mov r8d, 0x4080e
bt r8, rdx
jb 0x140174727
nop dword [rax + rax]
and eax, 0xfffffffd
cmp ax, 0xc04
je 0x140174727
jmp 0x140174a60
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0x16
mov rcx, r12
mov r13d, 0xffffffff
call fcn.14017f7f0
mov rcx, r12
call fcn.140172d80
mov rcx, r12
call fcn.140172370
mov rcx, r12
call fcn.14017a7d0
jmp 0x140174904
call qword [sym.imp.msvcrt.dll__errno]
mov r13d, 0xffffffff
mov dword [rax], 0x10
jmp 0x140174904
mov ecx, 2
call qword [fcn.140225420]
mov r8d, 0x33
mov edx, 1
lea rcx, str.Topology_does_not_contain_any_NUMA_node__aborting__n
mov r9, rax
call sub.msvcrt.dll_fwrite
jmp 0x140174e64
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0x16
mov rax, qword [r12 + 0x18]
mov rcx, qword [rax]
mov r13, qword [rcx]
jmp 0x140174a60
mov ecx, 2
call qword [fcn.140225420]
mov r8d, 0x2c
mov edx, 1
lea rcx, str.Topology_does_not_contain_any_PU__aborting__n
mov r9, rax
call sub.msvcrt.dll_fwrite
jmp 0x140174e64
mov ecx, 2
call qword [fcn.140225420]
mov r8d, 0x21
mov edx, 1
lea rcx, str.Topology_became_empty__aborting__n
mov r9, rax
call sub.msvcrt.dll_fwrite
jmp 0x140174e64