Function at 0x180005010
Capabilities:
Query environment variable

Disassembly:
push rbx
sub rsp, 0x80
mov rax, qword [0x18006d210]
xor rax, rsp
mov qword [rsp + 0x60], rax
cmp dword [rcx + 0x670], 0
mov rbx, rcx
je 0x180005048
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
or eax, 0xffffffff
jmp 0x1800054c6
mov qword [rsp + 0x98], rsi
lea rcx, str.HWLOC_XML_USERDATA_NOT_DECODED
mov qword [rsp + 0x78], r14
mov qword [rsp + 0x70], r15
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x180005076
mov dword [rbx + 0x7d0], 1
lea rcx, str.HWLOC_FORCE_FSROOT
mov qword [rsp + 0xa0], rdi
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xor esi, esi
lea r15, str.linux
mov r11, rax
test rax, rax
je 0x180005138
cmp dword [rbx + 0x670], esi
je 0x1800050b9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x180005138
mov r10, qword [0x18006e318]
test r10, r10
je 0x18000512c
cmp dword [r10], 1
jne 0x180005123
mov rdx, qword [r10 + 8]
mov rcx, rsi
movzx eax, byte [r15 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x180005123
cmp rcx, 6
jne 0x1800050d2
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x180005138
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x7e8], rsi
je 0x180005116
mov rcx, rbx
call fcn.18000c230
mov rdx, rdi
mov rcx, rbx
call fcn.18000c040
jmp 0x180005138
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x1800050c5
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 r14, [0x180060a84]
mov r11, rax
test rax, rax
je 0x1800051f6
cmp dword [rbx + 0x670], esi
je 0x180005171
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x1800051f6
mov r10, qword [0x18006e318]
test r10, r10
je 0x1800051ea
nop dword [rax]
mov rdx, qword [r10 + 8]
mov rcx, rsi
nop word [rax + rax]
movzx eax, byte [r14 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1800051e1
cmp rcx, 4
jne 0x180005190
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x1800051f6
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x7e8], rsi
je 0x1800051d4
mov rcx, rbx
call fcn.18000c230
mov rdx, rdi
mov rcx, rbx
call fcn.18000c040
jmp 0x1800051f6
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x180005180
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x7e8], rsi
jne 0x1800052b6
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 0x1800052b6
cmp dword [rbx + 0x670], esi
je 0x180005235
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x1800052b6
mov r10, qword [0x18006e318]
test r10, r10
je 0x1800052aa
cmp dword [r10], 1
jne 0x1800052a1
mov rdx, qword [r10 + 8]
mov rcx, rsi
nop
movzx eax, byte [r15 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1800052a1
cmp rcx, 6
jne 0x180005250
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x1800052b6
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x7e8], rsi
je 0x180005294
mov rcx, rbx
call fcn.18000c230
mov rdx, rdi
mov rcx, rbx
call fcn.18000c040
jmp 0x1800052b6
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x180005241
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
mov r15, qword [rsp + 0x70]
cmp qword [rbx + 0x7e8], rsi
jne 0x180005386
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 0x180005386
cmp dword [rbx + 0x670], esi
je 0x1800052fa
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x180005386
mov r10, qword [0x18006e318]
test r10, r10
je 0x18000537a
nop word [rax + rax]
mov rdx, qword [r10 + 8]
mov rcx, rsi
nop word [rax + rax]
movzx eax, byte [r14 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x180005371
cmp rcx, 4
jne 0x180005320
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x180005386
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x7e8], rsi
je 0x180005364
mov rcx, rbx
call fcn.18000c230
mov rdx, rdi
mov rcx, rbx
call fcn.18000c040
jmp 0x180005386
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x180005310
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
mov rcx, rbx
call fcn.18000bb20
mov rax, qword [rbx + 0x7e8]
mov r14, qword [rsp + 0x78]
mov rcx, rax
mov rdi, qword [rsp + 0xa0]
mov dword [rbx + 0x66c], 1
test rax, rax
je 0x1800053ce
cmp dword [rcx + 0x10], esi
jne 0x1800053c5
cmp dword [rcx + 0x28], 0xffffffff
je 0x1800053c5
mov dword [rbx + 0x66c], esi
mov rcx, qword [rcx + 0x18]
test rcx, rcx
jne 0x1800053b4
test byte [rbx + 0x608], 2
je 0x1800053e1
mov dword [rbx + 0x66c], 1
test rax, rax
je 0x180005401
cmp dword [rax + 0x10], 1
jne 0x1800053f8
cmp dword [rax + 0x28], 0xffffffff
je 0x1800053f8
mov dword [rbx + 0x66c], esi
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x1800053e6
lea rcx, str.HWLOC_THISSYSTEM
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x180005422
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [rbx + 0x66c], eax
mov rcx, rbx
call fcn.180006740
nop word [rax + rax]
mov ecx, esi
call fcn.180005640
mov r9, rax
lea rcx, [rsp + 0x20]
mov edx, 0x40
lea r8, str.HWLOC__s_DISTANCES
call fcn.180001080
lea rcx, [rsp + 0x20]
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18000546d
mov r8, rax
mov edx, esi
mov rcx, rbx
call fcn.180008ab0
inc esi
cmp esi, 0xc
jl 0x180005430
mov rcx, rbx
call fcn.1800046b0
mov rsi, qword [rsp + 0x98]
test eax, eax
jns 0x1800054ad
mov rcx, rbx
call fcn.180004e50
mov rcx, rbx
call fcn.180008a20
mov rcx, rbx
call fcn.180004b60
mov rcx, rbx
call fcn.18000c230
or eax, 0xffffffff
jmp 0x1800054c6
lea rcx, str.HWLOC_DEBUG_CHECK
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xor eax, eax
mov dword [rbx + 0x670], 1
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.180043e10
add rsp, 0x80
pop rbx
ret