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

Disassembly:
push rbx
sub rsp, 0x60
mov rax, qword [0x1400b59e8]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp dword [rcx + 0xb8], 0
mov rbx, rcx
je 0x140016773
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
or eax, 0xffffffff
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140087840
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 0x1400167c7
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
test eax, eax
jne 0x1400167c7
mov dword [rbx + 0x29c], ebp
cmp dword [rbx + 0x29c], ebp
je 0x14001689f
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 0x14001682d
mov dword [rbx + 0x2a4], 1
jmp 0x140016878
mov rcx, rbp
lea r8, [0x14009cff0]
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140016856
cmp rcx, 4
jne 0x140016840
jmp 0x140016878
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 0x14001689f
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 0x1400168bb
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 0x140016be6
cmp qword [rbx + 0x2c0], rbp
jne 0x140016be6
lea rcx, str.HWLOC_FSROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x1400169a5
cmp dword [rbx + 0xb8], ebp
je 0x140016915
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
jmp 0x1400169a5
mov r10, qword [0x1400c1588]
test r10, r10
je 0x140016999
lea r8, str.linux
cmp dword [r10], 1
jne 0x140016990
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 0x140016990
cmp rcx, 6
jne 0x140016940
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x1400169a5
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x140016983
mov rcx, rbx
call fcn.1400207c0
mov rdx, rdi
mov rcx, rbx
call sym.xmr_stak_rx.exe_hwloc_backend_enable
jmp 0x1400169a5
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x140016928
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x140016be6
lea rcx, str.HWLOC_CPUID_PATH
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140016a66
cmp dword [rbx + 0xb8], ebp
je 0x1400169e1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
jmp 0x140016a66
mov r10, qword [0x1400c1588]
test r10, r10
je 0x140016a5a
lea r8, [0x14009beec]
cmp dword [r10], 1
jne 0x140016a51
mov rdx, qword [r10 + 8]
mov rcx, rbp
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x140016a51
cmp rcx, 4
jne 0x140016a01
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x140016a66
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x140016a44
mov rcx, rbx
call fcn.1400207c0
mov rdx, rdi
mov rcx, rbx
call sym.xmr_stak_rx.exe_hwloc_backend_enable
jmp 0x140016a66
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x1400169f4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x140016be6
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 0x140016ad9
cmp dword [rbx + 0xb8], ebp
je 0x140016a9e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
jmp 0x140016ad9
mov rdi, qword [0x1400c1588]
test rdi, rdi
je 0x140016acd
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 0x140016b18
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x140016ab0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rbx + 0x2c0], rbp
jne 0x140016be6
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 0x140016be6
cmp dword [rbx + 0xb8], ebp
je 0x140016b54
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
jmp 0x140016be6
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call qword [rdi + 0x18]
mov rdi, rax
test rax, rax
je 0x140016ad9
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x140016b47
mov rcx, rbx
call fcn.1400207c0
mov rdx, rdi
mov rcx, rbx
call sym.xmr_stak_rx.exe_hwloc_backend_enable
jmp 0x140016ad9
mov r10, qword [0x1400c1588]
test r10, r10
je 0x140016bda
lea r8, [0x14009be54]
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 0x140016bd1
cmp rcx, 4
jne 0x140016b80
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rdi, rax
test rax, rax
je 0x140016be6
mov dword [rax + 0x10], 1
cmp qword [rbx + 0x2c0], rbp
je 0x140016bc4
mov rcx, rbx
call fcn.1400207c0
mov rdx, rdi
mov rcx, rbx
call sym.xmr_stak_rx.exe_hwloc_backend_enable
jmp 0x140016be6
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x140016b70
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
mov rcx, rbx
call fcn.140020060
mov rax, qword [rbx + 0x2c0]
mov dword [rbx + 0xb4], 1
mov rcx, rax
test rax, rax
je 0x140016c21
cmp dword [rcx + 0x10], ebp
jne 0x140016c18
cmp dword [rcx + 0x24], 0xffffffff
je 0x140016c18
mov dword [rbx + 0xb4], ebp
mov rcx, qword [rcx + 0x18]
test rcx, rcx
jne 0x140016c07
test byte [rbx + 0x20], 2
je 0x140016c31
mov dword [rbx + 0xb4], 1
test rax, rax
je 0x140016c51
cmp dword [rax + 0x10], 1
jne 0x140016c48
cmp dword [rax + 0x24], 0xffffffff
je 0x140016c48
mov dword [rbx + 0xb4], ebp
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x140016c36
lea rcx, str.HWLOC_THISSYSTEM
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140016c72
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 0x140016c9d
cmp qword [rax + 0x40], rbp
jne 0x140016c96
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x140016c85
jmp 0x140016c9d
mov qword [rbx + 0x2c8], rax
mov rcx, rbx
call fcn.14001aa90
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 0x140016d79
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 0x140016d6e
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 0x140016d64
mov eax, dword [rsp + 0x34]
cmp eax, 0x10000
jg 0x140016d42
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 0x140016d2f
mov byte [rcx + rdi], bpl
mov rdx, rdi
mov rcx, rbx
call fcn.14001e410
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 0x140016d79
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.140001e00
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
jmp 0x140016d79
mov rdx, rdi
mov rcx, rbx
call fcn.14001e410
mov rcx, rbx
call fcn.140015580
mov rdi, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x80]
mov rcx, rbx
test eax, eax
jns 0x140016dba
call fcn.14001e680
mov rcx, rbx
call fcn.1400165d0
mov rcx, rbx
call fcn.140015be0
mov rcx, rbx
call fcn.1400207c0
or eax, 0xffffffff
jmp 0x140016e00
call fcn.14001e680
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 0x140016dec
nop dword [rax + rax]
mov dword [rax + 0x28], ebp
mov rax, qword [rax + 0x38]
test rax, rax
jne 0x140016de0
mov rcx, rbx
call fcn.1400216b0
xor eax, eax
mov dword [rbx + 0xb8], 1
mov rbp, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.140087840
add rsp, 0x60
pop rbx
ret