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

Disassembly:
push rdi
sub rsp, 0x60
mov rax, qword [0x1400b89e8]
xor rax, rsp
mov qword [rsp + 0x50], rax
cmp dword [rcx + 0xb8], 0
mov rdi, rcx
je 0x140017505
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
mov eax, 0xffffffff
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14008ccd0
add rsp, 0x60
pop rdi
ret
mov dword [rcx + 0x29c], 1
mov eax, dword [rcx + 0x29c]
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x80], rbp
xor ebp, ebp
cmp dword [rcx + 0x9c], 1
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 0x140017559
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
test eax, eax
jne 0x140017559
mov dword [rdi + 0x29c], ebp
cmp dword [rdi + 0x29c], ebp
je 0x14001762f
mov qword [rdi + 0x2b8], 0x3dcccccd
lea rcx, str.HWLOC_GROUPING_ACCURACY
mov dword [rdi + 0x2a8], ebp
mov dword [rdi + 0x2ac], 0x3c23d70a
mov dword [rdi + 0x2b0], 0x3ca3d70a
mov dword [rdi + 0x2b4], 0x3d4ccccd
mov dword [rdi + 0x2a4], 5
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdx, rax
test rax, rax
jne 0x1400175bf
mov dword [rdi + 0x2a4], 1
jmp 0x140017608
mov rcx, rbp
lea r8, [0x1400a2240]
nop dword [rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x1400175e6
cmp rcx, 4
jne 0x1400175d0
jmp 0x140017608
mov rcx, rdx
mov dword [rdi + 0x2a4], 1
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atof]
xorps xmm1, xmm1
cvtsd2ss xmm1, xmm0
movss dword [rdi + 0x2a8], xmm1
lea rcx, str.HWLOC_GROUPING_VERBOSE
mov dword [rdi + 0x2a0], ebp
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x14001762f
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [rdi + 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 0x14001764b
mov dword [rdi + 0x280], 1
lea rcx, str.HWLOC_COMPONENTS
mov qword [rsp + 0x88], rsi
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
jne 0x140017976
cmp qword [rdi + 0x2c0], rbp
jne 0x140017976
lea rcx, str.HWLOC_FSROOT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140017735
cmp dword [rdi + 0xb8], ebp
je 0x1400176a5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
jmp 0x140017735
mov r10, qword [0x1400c2458]
test r10, r10
je 0x140017729
lea r8, str.linux
cmp dword [r10], 1
jne 0x140017720
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 0x140017720
cmp rcx, 6
jne 0x1400176d0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [r10 + 0x18]
mov rbx, rax
test rax, rax
je 0x140017735
mov dword [rax + 0x10], 1
cmp qword [rdi + 0x2c0], rbp
je 0x140017713
mov rcx, rdi
call fcn.1400217b0
mov rdx, rbx
mov rcx, rdi
call sym.cornelius.exe_hwloc_backend_enable
jmp 0x140017735
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x1400176b8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rdi + 0x2c0], rbp
jne 0x140017976
lea rcx, str.HWLOC_CPUID_PATH
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x1400177f6
cmp dword [rdi + 0xb8], ebp
je 0x140017771
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
jmp 0x1400177f6
mov r10, qword [0x1400c2458]
test r10, r10
je 0x1400177ea
lea r8, [0x1400a113c]
cmp dword [r10], 1
jne 0x1400177e1
mov rdx, qword [r10 + 8]
mov rcx, rbp
movzx eax, byte [r8 + rcx]
inc rcx
cmp al, byte [rdx + rcx - 1]
jne 0x1400177e1
cmp rcx, 4
jne 0x140017791
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r10
call qword [r10 + 0x18]
mov rbx, rax
test rax, rax
je 0x1400177f6
mov dword [rax + 0x10], 1
cmp qword [rdi + 0x2c0], rbp
je 0x1400177d4
mov rcx, rdi
call fcn.1400217b0
mov rdx, rbx
mov rcx, rdi
call sym.cornelius.exe_hwloc_backend_enable
jmp 0x1400177f6
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x140017784
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rdi + 0x2c0], rbp
jne 0x140017976
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 0x140017869
cmp dword [rdi + 0xb8], ebp
je 0x14001782e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
jmp 0x140017869
mov rbx, qword [0x1400c2458]
test rbx, rbx
je 0x14001785d
nop word [rax + rax]
mov rdx, qword [rbx + 8]
lea rcx, str.synthetic
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x1400178a8
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x140017840
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
cmp qword [rdi + 0x2c0], rbp
jne 0x140017976
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 0x140017976
cmp dword [rdi + 0xb8], ebp
je 0x1400178e4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_recv
jmp 0x140017976
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rbx
call qword [rbx + 0x18]
mov rbx, rax
test rax, rax
je 0x140017869
mov dword [rax + 0x10], 1
cmp qword [rdi + 0x2c0], rbp
je 0x1400178d7
mov rcx, rdi
call fcn.1400217b0
mov rdx, rbx
mov rcx, rdi
call sym.cornelius.exe_hwloc_backend_enable
jmp 0x140017869
mov r10, qword [0x1400c2458]
test r10, r10
je 0x14001796a
lea r8, [0x1400a10a4]
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 0x140017961
cmp rcx, 4
jne 0x140017910
xor r9d, r9d
xor r8d, r8d
mov rdx, r11
mov rcx, r10
call qword [r10 + 0x18]
mov rbx, rax
test rax, rax
je 0x140017976
mov dword [rax + 0x10], 1
cmp qword [rdi + 0x2c0], rbp
je 0x140017954
mov rcx, rdi
call fcn.1400217b0
mov rdx, rbx
mov rcx, rdi
call sym.cornelius.exe_hwloc_backend_enable
jmp 0x140017976
mov r10, qword [r10 + 0x28]
test r10, r10
jne 0x140017900
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x28
mov rcx, rdi
call fcn.1400210e0
mov rax, qword [rdi + 0x2c0]
mov dword [rdi + 0xb4], 1
mov rcx, rax
test rax, rax
je 0x1400179b1
cmp dword [rcx + 0x10], ebp
jne 0x1400179a8
cmp dword [rcx + 0x24], 0xffffffff
je 0x1400179a8
mov dword [rdi + 0xb4], ebp
mov rcx, qword [rcx + 0x18]
test rcx, rcx
jne 0x140017997
test byte [rdi + 0x20], 2
je 0x1400179c1
mov dword [rdi + 0xb4], 1
test rax, rax
je 0x1400179e1
cmp dword [rax + 0x10], 1
jne 0x1400179d8
cmp dword [rax + 0x24], 0xffffffff
je 0x1400179d8
mov dword [rdi + 0xb4], ebp
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x1400179c6
lea rcx, str.HWLOC_THISSYSTEM
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x140017a02
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov dword [rdi + 0xb4], eax
mov rax, qword [rdi + 0x2c0]
mov qword [rdi + 0x2c8], rbp
test rax, rax
je 0x140017a2d
cmp qword [rax + 0x40], rbp
jne 0x140017a26
mov rax, qword [rax + 0x18]
test rax, rax
jne 0x140017a15
jmp 0x140017a2d
mov qword [rdi + 0x2c8], rax
mov rcx, rdi
call fcn.14001ee40
lea rcx, str.HWLOC_PCI_LOCALITY
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rbx, rax
test rax, rax
je 0x140017b09
xor edx, edx
mov dword [rdi + 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 0x140017afe
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 0x140017af4
mov eax, dword [rsp + 0x34]
cmp eax, 0x10000
jg 0x140017ad2
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 rbx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
movsxd rcx, dword [rsp + 0x34]
cmp eax, ecx
jne 0x140017abf
mov byte [rcx + rbx], bpl
mov rdx, rbx
mov rcx, rdi
call fcn.14001f4a0
mov rcx, rbx
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 0x140017b09
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, rbx
call fcn.140001fc0
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__close]
jmp 0x140017b09
mov rdx, rbx
mov rcx, rdi
call fcn.14001f4a0
mov rcx, rdi
call fcn.1400161c0
mov rcx, rdi
mov ebx, eax
call fcn.14001f710
mov rsi, qword [rsp + 0x88]
test ebx, ebx
mov rbx, qword [rsp + 0x78]
jns 0x140017b4b
mov rcx, rdi
call fcn.140017360
mov rcx, rdi
call fcn.140016880
mov rcx, rdi
call fcn.1400217b0
mov eax, 0xffffffff
jmp 0x140017b84
lea rcx, str.HWLOC_DEBUG_CHECK
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rax, qword [rdi + 0x288]
test rax, rax
je 0x140017b70
mov dword [rax + 0x28], ebp
mov rax, qword [rax + 0x38]
test rax, rax
jne 0x140017b64
mov rcx, rdi
call fcn.1400226d0
xor eax, eax
mov dword [rdi + 0xb8], 1
mov rbp, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.14008ccd0
add rsp, 0x60
pop rdi
ret