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

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x1800aad48]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp dword [rcx + 0xb8], 0
mov rbx, rcx
je 0x18000b623
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
or eax, 0xffffffff
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.18005aca0
add rsp, 0x60
pop rbx
ret
mov dword [rcx + 0x29c], 1
mov eax, dword [rcx + 0x29c]
mov qword [rsp + 0x78], rbp
xor ebp, ebp
cmp dword [rcx + 0x9c], 1
mov qword [rsp + 0x88], rdi
cmove eax, ebp
mov dword [rcx + 0x29c], eax
lea rcx, str.HWLOC_GROUPING
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18000b677
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
test eax, eax
jne 0x18000b677
mov dword [rbx + 0x29c], ebp
cmp dword [rbx + 0x29c], ebp
je 0x18000b74f
mov qword [rbx + 0x2b8], 0x3dcccccd
lea rcx, str.HWLOC_GROUPING_ACCURACY
mov dword [rbx + 0x2a8], ebp
mov dword [rbx + 0x2ac], 0x3c23d70a
mov dword [rbx + 0x2b0], 0x3ca3d70a
mov dword [rbx + 0x2b4], 0x3d4ccccd
mov dword [rbx + 0x2a4], 5
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdx, rax
test rax, rax
jne 0x18000b6dd
mov dword [rbx + 0x2a4], 1
jmp 0x18000b728
mov rcx, rbp
lea r8, [0x1800934e0]
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x18000b706
cmp rcx, 4
jne 0x18000b6f0
jmp 0x18000b728
mov rcx, rdx
mov dword [rbx + 0x2a4], 1
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atof]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movss dword [rbx + 0x2a8], xmm1
lea rcx, str.HWLOC_GROUPING_VERBOSE
mov dword [rbx + 0x2a0], ebp
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18000b74f
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [rbx + 0x2a0], eax
lea rcx, str.HWLOC_XML_USERDATA_NOT_DECODED
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18000b76b
mov dword [rbx + 0x280], 1
lea rcx, str.HWLOC_COMPONENTS
mov qword [rsp + 0x80], rsi
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
jne 0x18000ba96
cmp qword [rbx + 0x2c0], rbp
jne 0x18000ba96
lea rcx, str.HWLOC_FSROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18000b855
cmp dword [rbx + 0xb8], ebp
je 0x18000b7c5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x18000b855
mov r10, qword [0x1800b0300]
test r10, r10
je 0x18000b849
lea r8, str.linux
cmp dword [r10], 1
jne 0x18000b840
mov rdx, qword [r10 + 8]
mov rcx, rbp
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x18000b840
cmp rcx, 6
jne 0x18000b7f0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x18000b855
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x18000b833
mov rcx, rbx
call fcn.1800121d0
mov rdx, rdi
mov rcx, rbx
call sym.xmrstakrx_opencl_backend.dll_hwloc_backend_enable
jmp 0x18000b855
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x18000b7d8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x18000ba96
lea rcx, str.HWLOC_CPUID_PATH
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18000b916
cmp dword [rbx + 0xb8], ebp
je 0x18000b891
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x18000b916
mov r10, qword [0x1800b0300]
test r10, r10
je 0x18000b90a
lea r8, [0x1800921fc]
cmp dword [r10], 1
jne 0x18000b901
mov rdx, qword [r10 + 8]
mov rcx, rbp
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x18000b901
cmp rcx, 4
jne 0x18000b8b1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x18000b916
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x18000b8f4
mov rcx, rbx
call fcn.1800121d0
mov rdx, rdi
mov rcx, rbx
call sym.xmrstakrx_opencl_backend.dll_hwloc_backend_enable
jmp 0x18000b916
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x18000b8a4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x18000ba96
lea rcx, str.HWLOC_SYNTHETIC
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rsi, rax
test rax, rax
je 0x18000b989
cmp dword [rbx + 0xb8], ebp
je 0x18000b94e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x18000b989
mov rdi, qword [0x1800b0300]
test rdi, rdi
je 0x18000b97d
nop word [rax + rax]
mov rdx, qword [rdi + 8]
lea rcx, str.synthetic
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x18000b9c8
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x18000b960
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x18000ba96
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 0x18000ba96
cmp dword [rbx + 0xb8], ebp
je 0x18000ba04
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x18000ba96
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call qword [rdi + 0x18]
mov rdi, rax
test rax, rax
je 0x18000b989
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x18000b9f7
mov rcx, rbx
call fcn.1800121d0
mov rdx, rdi
mov rcx, rbx
call sym.xmrstakrx_opencl_backend.dll_hwloc_backend_enable
jmp 0x18000b989
mov r10, qword [0x1800b0300]
test r10, r10
je 0x18000ba8a
lea r8, [0x180092164]
nop word [rax + rax]
mov rdx, qword [r10 + 8]
mov rcx, rbp
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x18000ba81
cmp rcx, 4
jne 0x18000ba30
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x18000ba96
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x18000ba74
mov rcx, rbx
call fcn.1800121d0
mov rdx, rdi
mov rcx, rbx
call sym.xmrstakrx_opencl_backend.dll_hwloc_backend_enable
jmp 0x18000ba96
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x18000ba20
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
mov rcx, rbx
call fcn.180011a70
mov rax, qword [rbx + 0x2c0]
mov dword [rbx + 0xb4], 1
mov rcx, rax
test rax, rax
je 0x18000bad1
cmp dword [rcx + 0x10], ebp
jne 0x18000bac8
cmp dword [rcx + 0x24], 0xffffffff
je 0x18000bac8
mov dword [rbx + 0xb4], ebp
mov rcx, qword [rcx + 0x18]
test rcx, rcx
jne 0x18000bab7
test byte [rbx + 0x20], 2
je 0x18000bae1
mov dword [rbx + 0xb4], 1
test rax, rax
je 0x18000bb01
cmp dword [rax + 0x10], 1
jne 0x18000baf8
cmp dword [rax + 0x24], 0xffffffff
je 0x18000baf8
mov dword [rbx + 0xb4], ebp
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x18000bae6
lea rcx, str.HWLOC_THISSYSTEM
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18000bb22
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [rbx + 0xb4], eax
mov rax, qword [rbx + 0x2c0]
mov qword [rbx + 0x2c8], rbp
test rax, rax
je 0x18000bb4d
cmp qword [rax + 0x40], rbp
jne 0x18000bb46
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x18000bb35
jmp 0x18000bb4d
mov qword [rbx + 0x2c8], rax
mov rcx, rbx
call fcn.18000f940
lea rcx, str.HWLOC_PCI_LOCALITY
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdi, rax
test rax, rax
je 0x18000bc29
xor edx, edx
mov dword [rbx + 0x2fc], 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__open]
mov esi, eax
test eax, eax
js 0x18000bc1e
lea rdx, [rsp + 0x20]
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__fstat64i32]
test eax, eax
jne 0x18000bc14
mov eax, dword [rsp + 0x34]
cmp eax, 0x10000
jg 0x18000bbf2
inc eax
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8d, dword [rsp + 0x34]
mov ecx, esi
mov rdx, rax
mov rdi, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
movsxd rcx, dword [rsp + 0x34]
cmp eax, ecx
jne 0x18000bbdf
mov byte [rcx + rdi], bpl
mov rdx, rdi
mov rcx, rbx
call fcn.18000fe10
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
jmp 0x18000bc29
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9d, dword [rsp + 0x34]
lea rdx, str.Ignoring_HWLOC_PCI_LOCALITY_file___s_too_large___lu_bytes__n
mov rcx, rax
mov r8, rdi
call fcn.1800053c0
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
jmp 0x18000bc29
mov rdx, rdi
mov rcx, rbx
call fcn.18000fe10
mov rcx, rbx
call fcn.18000a430
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rcx, rbx
test eax, eax
jns 0x18000bc6a
call fcn.180010090
mov rcx, rbx
call fcn.18000b480
mov rcx, rbx
call fcn.18000aa90
mov rcx, rbx
call fcn.1800121d0
or eax, 0xffffffff
jmp 0x18000bcb0
call fcn.180010090
lea rcx, str.HWLOC_DEBUG_CHECK
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rax, qword [rbx + 0x288]
test rax, rax
je 0x18000bc9c
nop dword [rax + rax]
mov dword [rax + 0x28], ebp
mov rax, qword [rax + 0x38]
test rax, rax
jne 0x18000bc90
mov rcx, rbx
call fcn.1800130c0
xor eax, eax
mov dword [rbx + 0xb8], 1
mov rbp, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.18005aca0
add rsp, 0x60
pop rbx
ret