Function at 0x180012170
Capabilities:
Query environment variable

Disassembly:
push rdi
sub rsp, 0x20
cmp dword [rcx + 0x670], 0
mov rdi, rcx
je 0x180012197
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
or eax, 0xffffffff
add rsp, 0x20
pop rdi
ret
mov qword [rsp + 0x38], rsi
lea rcx, str.HWLOC_XML_USERDATA_NOT_DECODED
mov qword [rsp + 0x40], r14
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x1800121bd
mov dword [rdi + 0x7d0], 1
lea rcx, str.HWLOC_FORCE_FSROOT
mov qword [rsp + 0x30], rbx
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
lea r14, str.linux
mov r11, rax
test rax, rax
je 0x180012287
cmp dword [rdi + 0x670], 0
je 0x1800121fc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x180012287
mov r10, qword [0x1800759d8]
test r10, r10
je 0x18001227b
cmp dword [r10], 1
jne 0x180012272
mov rdx, qword [r10 + 8]
xor ecx, ecx
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [r14 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x180012272
cmp rcx, 6
jne 0x180012220
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rbx, rax
test rax, rax
je 0x180012287
mov dword [rax + 0x10], 1
cmp qword [rdi + 0x7e8], 0
je 0x180012265
mov rcx, rdi
call fcn.1800192d0
mov rdx, rbx
mov rcx, rdi
call fcn.180019040
jmp 0x180012287
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x180012208
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
lea rcx, str.HWLOC_FORCE_XMLFILE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
lea rsi, [0x180063a44]
mov r11, rax
test rax, rax
je 0x180012346
cmp dword [rdi + 0x670], 0
je 0x1800122c1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x180012346
mov r10, qword [0x1800759d8]
test r10, r10
je 0x18001233a
nop dword [rax]
mov rdx, qword [r10 + 8]
xor ecx, ecx
nop word [rax + rax]
movzx eax, byte [rsi + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x180012331
cmp rcx, 4
jne 0x1800122e0
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rbx, rax
test rax, rax
je 0x180012346
mov dword [rax + 0x10], 1
cmp qword [rdi + 0x7e8], 0
je 0x180012324
mov rcx, rdi
call fcn.1800192d0
mov rdx, rbx
mov rcx, rdi
call fcn.180019040
jmp 0x180012346
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x1800122d0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rdi + 0x7e8], 0
jne 0x180012407
lea rcx, str.HWLOC_FSROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r11, rax
test rax, rax
je 0x180012407
cmp dword [rdi + 0x670], 0
je 0x180012387
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x180012407
mov r10, qword [0x1800759d8]
test r10, r10
je 0x1800123fb
cmp dword [r10], 1
jne 0x1800123f2
mov rdx, qword [r10 + 8]
xor ecx, ecx
nop
movzx eax, byte [r14 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1800123f2
cmp rcx, 6
jne 0x1800123a0
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rbx, rax
test rax, rax
je 0x180012407
mov dword [rax + 0x10], 1
cmp qword [rdi + 0x7e8], 0
je 0x1800123e5
mov rcx, rdi
call fcn.1800192d0
mov rdx, rbx
mov rcx, rdi
call fcn.180019040
jmp 0x180012407
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x180012393
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rdi + 0x7e8], 0
mov r14, qword [rsp + 0x40]
jne 0x1800124d6
lea rcx, str.HWLOC_XMLFILE
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r11, rax
test rax, rax
je 0x1800124d6
cmp dword [rdi + 0x670], 0
je 0x18001244d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x1800124d6
mov r10, qword [0x1800759d8]
test r10, r10
je 0x1800124ca
nop dword [rax]
mov rdx, qword [r10 + 8]
xor ecx, ecx
nop word [rax + rax]
movzx eax, byte [rsi + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1800124c1
cmp rcx, 4
jne 0x180012470
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rbx, rax
test rax, rax
je 0x1800124d6
mov dword [rax + 0x10], 1
cmp qword [rdi + 0x7e8], 0
je 0x1800124b4
mov rcx, rdi
call fcn.1800192d0
mov rdx, rbx
mov rcx, rdi
call fcn.180019040
jmp 0x1800124d6
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x180012460
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
mov rcx, rdi
call fcn.180018a80
mov rcx, rdi
call fcn.180019230
mov rcx, rdi
call fcn.180013ae0
mov rcx, rdi
call fcn.180016070
mov rcx, rdi
call fcn.1800118b0
mov rsi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
test eax, eax
jns 0x180012535
mov rcx, rdi
call fcn.180012050
mov rcx, rdi
call fcn.1800159b0
mov rcx, rdi
call fcn.180011d60
mov rcx, rdi
call fcn.1800192d0
or eax, 0xffffffff
add rsp, 0x20
pop rdi
ret
lea rcx, str.HWLOC_DEBUG_CHECK
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18001254f
mov rcx, rdi
call fcn.180012680
mov dword [rdi + 0x670], 1
xor eax, eax
add rsp, 0x20
pop rdi
ret