Function at 0x140179730
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rdi, qword [sym.imp.KERNEL32.dll_SwitchToThread]
xor esi, esi
mov ebx, 1
jmp 0x140179752
call rdi
mov eax, esi
lock cmpxchg dword [0x1407b2e50], ebx
test eax, eax
jne 0x140179750
mov eax, dword [0x1407b2e58]
cmp eax, 0xffffffff
je 0x140179b00
lea edx, [rax + 1]
mov dword [0x1407b2e58], edx
test eax, eax
je 0x1401797c0
cmp dword [0x1407b2e50], 1
jne 0x1401797a0
mov dword [0x1407b2e50], 0
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, 0x1bf
lea rdx, str.components.c
lea rcx, str.hwloc_components_mutex__1
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140179785
lea rcx, str.HWLOC_COMPONENTS_VERBOSE
call sub.msvcrt.dll_getenv
mov rcx, rax
xor eax, eax
test rcx, rcx
je 0x1401797db
call sub.msvcrt.dll_atoi
mov edx, 8
mov ecx, 6
mov dword [0x1407b2e54], eax
mov dword [0x1407b2e40], 6
call sub.msvcrt.dll_calloc
mov qword [0x1407b2e48], rax
test rax, rax
je 0x140179c6e
mov r13, qword [0x1404c8ce0]
mov rbx, qword [0x1404c8cc0]
mov dword [0x1407b2e40], 0
lea r12, [0x1404776c0]
jmp 0x140179868
cmp eax, 1
je 0x140179ab0
mov r8d, 0x1f3
lea rdx, str.components.c
lea rcx, [0x14047736b]
call qword [sym.imp.msvcrt.dll__assert]
add r12, 8
test r13, r13
je 0x140179a20
mov rbx, r13
mov r13, qword [r12 + 8]
mov esi, dword [rbx + 0x1c]
test esi, esi
jne 0x140179a88
mov rax, qword [rbx + 8]
test rax, rax
je 0x140179888
xor ecx, ecx
call rax
test eax, eax
js 0x140179ac0
mov rdx, qword [rbx + 0x10]
test rdx, rdx
je 0x1401798ab
mov eax, dword [0x1407b2e40]
lea ecx, [rax + 1]
mov dword [0x1407b2e40], ecx
mov rcx, qword [0x1407b2e48]
mov qword [rcx + rax*8], rdx
mov eax, dword [rbx + 0x18]
test eax, eax
jne 0x140179830
mov rbp, qword [rbx + 0x20]
mov ecx, 5
lea rdi, str.stop
mov r15, qword [rbp]
mov rsi, r15
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
je 0x140179c34
mov edx, 0x2d
mov rcx, r15
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x140179bb6
mov edx, 0x3a
mov rcx, r15
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x140179bb6
mov rcx, r15
lea rdx, [0x14047719f]
call sub.msvcrt.dll_strcspn
mov rcx, r15
mov rbx, rax
call sub.msvcrt.dll_strlen
cmp rbx, rax
jne 0x140179bb6
mov r9d, dword [rbp + 8]
test r9d, r9d
je 0x140179c08
cmp r9d, 1
je 0x14017994b
test r9d, 0xffffff01
jne 0x140179c08
mov eax, dword [0x1407b2e54]
mov rbx, qword [0x1407b2e60]
lea rdi, [0x1407b2e60]
mov dword [rsp + 0x4c], eax
test rbx, rbx
jne 0x1401799a9
jmp 0x140179bee
mov r14d, dword [rbx + 0x18]
mov ebx, dword [rbp + 0x18]
cmp r14d, ebx
jae 0x140179b80
mov r8d, dword [rsp + 0x4c]
test r8d, r8d
jne 0x140179a50
mov rax, qword [rdi]
mov rax, qword [rax + 0x20]
mov qword [rdi], rax
mov rbx, qword [rax + 0x20]
lea rdi, [rax + 0x20]
test rbx, rbx
je 0x1401799cb
mov r15, qword [rbp]
mov rsi, qword [rbx]
mov rdx, r15
mov rcx, rsi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x140179970
mov rax, qword [rdi]
mov rbx, qword [rax + 0x20]
lea rdi, [rax + 0x20]
test rbx, rbx
jne 0x1401799a5
mov edx, dword [rsp + 0x4c]
test edx, edx
jne 0x140179b28
mov rax, qword [0x1407b2e60]
test rax, rax
je 0x140179bfa
mov ecx, dword [rbp + 0x18]
lea rdx, [0x1407b2e60]
jmp 0x140179a05
lea rdx, [rax + 0x20]
mov rax, qword [rax + 0x20]
test rax, rax
je 0x140179a0a
cmp dword [rax + 0x18], ecx
jae 0x1401799f8
mov qword [rbp + 0x20], rax
add r12, 8
mov qword [rdx], rbp
test r13, r13
jne 0x140179860
nop
cmp dword [0x1407b2e50], 1
je 0x140179785
mov r8d, 0x213
lea rdx, str.components.c
lea rcx, str.hwloc_components_mutex__1
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x140179785
mov ecx, 2
call qword [fcn.140225420]
mov dword [rsp + 0x20], ebx
mov r9d, r14d
mov r8, rsi
mov rcx, rax
lea rdx, str.Dropping_previously_registered_discovery_component___s__priority__u_lower_than_new_one__u_n
call sub.msvcrt.dll_fprintf
mov eax, dword [0x1407b2e54]
mov dword [rsp + 0x4c], eax
jmp 0x14017998e
mov ecx, 2
call qword [fcn.140225420]
mov r8d, esi
lea rdx, str.Ignoring_static_component_with_invalid_flags__lx_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140179853
mov rcx, qword [rbx + 0x20]
call fcn.14018b0b0
jmp 0x140179853
mov r11d, dword [0x1407b2e54]
test r11d, r11d
je 0x140179853
mov ecx, 2
call qword [fcn.140225420]
mov r8d, 0x30
mov edx, 1
lea rcx, str.Ignoring_static_component__failed_to_initialize_n
mov r9, rax
call sub.msvcrt.dll_fwrite
jmp 0x140179853
mov r8d, 0x1bd
lea rdx, str.components.c
lea rcx, str._unsigned___1___hwloc_components_users
call qword [sym.imp.msvcrt.dll__assert]
mov eax, dword [0x1407b2e58]
jmp 0x14017976f
mov r9d, dword [rbp + 8]
mov r15, qword [rbp]
mov dword [rsp + 0x4c], r9d
mov ebx, dword [rbp + 0x18]
mov ecx, 2
call qword [fcn.140225420]
mov r9d, dword [rsp + 0x4c]
mov r8, r15
lea rdx, str.Registered_discovery_component___s_phases_0x_x_with_priority__u___s_s__n
mov rcx, rax
lea rax, [0x140477359]
mov dword [rsp + 0x20], ebx
mov qword [rsp + 0x30], rax
lea rax, str.statically_build
mov qword [rsp + 0x28], rax
call sub.msvcrt.dll_fprintf
jmp 0x1401799d7
mov ecx, dword [rsp + 0x4c]
test ecx, ecx
je 0x140179853
mov ecx, 2
call qword [fcn.140225420]
mov dword [rsp + 0x20], r14d
mov r9d, ebx
mov r8, r15
mov rcx, rax
lea rdx, str.Ignoring_new_discovery_component___s__priority__u_lower_than_previously_registered_one__u_n
call sub.msvcrt.dll_fprintf
jmp 0x140179853
mov r9d, dword [0x1407b2e54]
test r9d, r9d
je 0x140179853
mov ecx, 2
call qword [fcn.140225420]
mov r9d, 0x2d
mov r8, r15
lea rdx, str.Cannot_register_discovery_component_with_name___s_containing_reserved_characters___c__n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140179853
mov eax, dword [rsp + 0x4c]
test eax, eax
jne 0x140179b30
xor eax, eax
lea rdx, [0x1407b2e60]
jmp 0x140179a0a
mov dword [rsp + 0x4c], r9d
mov ecx, 2
call qword [fcn.140225420]
mov r9d, dword [rsp + 0x4c]
mov r8, r15
lea rdx, str.Cannot_register_discovery_component___s_with_invalid_phases_0x_x_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x140179853
mov r10d, dword [0x1407b2e54]
test r10d, r10d
je 0x140179853
mov ecx, 2
call qword [fcn.140225420]
mov r8d, 0x3e
mov edx, 1
lea rcx, str.Cannot_register_discovery_component_with_reserved_name__stop_n
mov r9, rax
call sub.msvcrt.dll_fwrite
jmp 0x140179853
mov r8d, 0x1d6
lea rdx, str.components.c
lea rcx, str.hwloc_component_finalize_cbs
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x14017980a