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

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x18009d5d8]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp dword [rcx + 0xb8], 0
mov rbx, rcx
je 0x180016333
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.180076910
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 0x180016387
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
test eax, eax
jne 0x180016387
mov dword [rbx + 0x29c], ebp
cmp dword [rbx + 0x29c], ebp
je 0x18001645f
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 0x1800163ed
mov dword [rbx + 0x2a4], 1
jmp 0x180016438
mov rcx, rbp
lea r8, [0x18008c490]
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x180016416
cmp rcx, 4
jne 0x180016400
jmp 0x180016438
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 0x18001645f
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 0x18001647b
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 0x1800167a6
cmp qword [rbx + 0x2c0], rbp
jne 0x1800167a6
lea rcx, str.HWLOC_FSROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x180016565
cmp dword [rbx + 0xb8], ebp
je 0x1800164d5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x180016565
mov r10, qword [0x1800a2f90]
test r10, r10
je 0x180016559
lea r8, str.linux
cmp dword [r10], 1
jne 0x180016550
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 0x180016550
cmp rcx, 6
jne 0x180016500
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x180016565
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x180016543
mov rcx, rbx
call fcn.180020380
mov rdx, rdi
mov rcx, rbx
call sym.xmrstak_cuda_backend.dll_hwloc_backend_enable
jmp 0x180016565
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x1800164e8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x1800167a6
lea rcx, str.HWLOC_CPUID_PATH
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x180016626
cmp dword [rbx + 0xb8], ebp
je 0x1800165a1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x180016626
mov r10, qword [0x1800a2f90]
test r10, r10
je 0x18001661a
lea r8, [0x18008b14c]
cmp dword [r10], 1
jne 0x180016611
mov rdx, qword [r10 + 8]
mov rcx, rbp
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x180016611
cmp rcx, 4
jne 0x1800165c1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x180016626
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x180016604
mov rcx, rbx
call fcn.180020380
mov rdx, rdi
mov rcx, rbx
call sym.xmrstak_cuda_backend.dll_hwloc_backend_enable
jmp 0x180016626
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x1800165b4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x1800167a6
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 0x180016699
cmp dword [rbx + 0xb8], ebp
je 0x18001665e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x180016699
mov rdi, qword [0x1800a2f90]
test rdi, rdi
je 0x18001668d
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 0x1800166d8
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x180016670
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x1800167a6
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 0x1800167a6
cmp dword [rbx + 0xb8], ebp
je 0x180016714
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x10
jmp 0x1800167a6
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call qword [rdi + 0x18]
mov rdi, rax
test rax, rax
je 0x180016699
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x180016707
mov rcx, rbx
call fcn.180020380
mov rdx, rdi
mov rcx, rbx
call sym.xmrstak_cuda_backend.dll_hwloc_backend_enable
jmp 0x180016699
mov r10, qword [0x1800a2f90]
test r10, r10
je 0x18001679a
lea r8, [0x18008b0b4]
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 0x180016791
cmp rcx, 4
jne 0x180016740
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x1800167a6
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x180016784
mov rcx, rbx
call fcn.180020380
mov rdx, rdi
mov rcx, rbx
call sym.xmrstak_cuda_backend.dll_hwloc_backend_enable
jmp 0x1800167a6
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x180016730
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
mov rcx, rbx
call fcn.18001fc20
mov rax, qword [rbx + 0x2c0]
mov dword [rbx + 0xb4], 1
mov rcx, rax
test rax, rax
je 0x1800167e1
cmp dword [rcx + 0x10], ebp
jne 0x1800167d8
cmp dword [rcx + 0x24], 0xffffffff
je 0x1800167d8
mov dword [rbx + 0xb4], ebp
mov rcx, qword [rcx + 0x18]
test rcx, rcx
jne 0x1800167c7
test byte [rbx + 0x20], 2
je 0x1800167f1
mov dword [rbx + 0xb4], 1
test rax, rax
je 0x180016811
cmp dword [rax + 0x10], 1
jne 0x180016808
cmp dword [rax + 0x24], 0xffffffff
je 0x180016808
mov dword [rbx + 0xb4], ebp
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x1800167f6
lea rcx, str.HWLOC_THISSYSTEM
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x180016832
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 0x18001685d
cmp qword [rax + 0x40], rbp
jne 0x180016856
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x180016845
jmp 0x18001685d
mov qword [rbx + 0x2c8], rax
mov rcx, rbx
call fcn.18001a650
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 0x180016939
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 0x18001692e
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 0x180016924
mov eax, dword [rsp + 0x34]
cmp eax, 0x10000
jg 0x180016902
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 0x1800168ef
mov byte [rcx + rdi], bpl
mov rdx, rdi
mov rcx, rbx
call fcn.18001dfc0
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 0x180016939
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.1800100d0
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
jmp 0x180016939
mov rdx, rdi
mov rcx, rbx
call fcn.18001dfc0
mov rcx, rbx
call fcn.180015140
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rcx, rbx
test eax, eax
jns 0x18001697a
call fcn.18001e240
mov rcx, rbx
call fcn.180016190
mov rcx, rbx
call fcn.1800157a0
mov rcx, rbx
call fcn.180020380
or eax, 0xffffffff
jmp 0x1800169c0
call fcn.18001e240
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 0x1800169ac
nop dword [rax + rax]
mov dword [rax + 0x28], ebp
mov rax, qword [rax + 0x38]
test rax, rax
jne 0x1800169a0
mov rcx, rbx
call fcn.180021270
xor eax, eax
mov dword [rbx + 0xb8], 1
mov rbp, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.180076910
add rsp, 0x60
pop rbx
ret