Function at 0x6a2880
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, 0x48
xor esi, esi
mov ebx, 1
mov rdi, qword [sym.imp.KERNEL32.DLL_SwitchToThread]
jmp 0x6a28a2
call rdi
mov eax, esi
lock cmpxchg dword [0x00b58d90], ebx
test eax, eax
jne 0x6a28a0
mov eax, dword [0x00b58d98]
cmp eax, 0xffffffff
je 0x6a2c90
lea edx, [rax + 1]
mov dword [0x00b58d98], edx
test eax, eax
je 0x6a2910
cmp dword [0x00b58d90], 1
jne 0x6a28f0
mov dword [0x00b58d90], 0
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, 0x14a
lea rdx, str.components.c
lea rcx, str.hwloc_components_mutex__1
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6a28d5
lea rcx, str.HWLOC_COMPONENTS_VERBOSE
call sub.msvcrt.dll_getenv
xor edx, edx
test rax, rax
je 0x6a292d
mov rcx, rax
call sub.msvcrt.dll_atoi
mov edx, eax
mov dword [0x00b58d94], edx
mov ecx, 6
mov edx, 8
mov dword [0x00b58d80], 6
call sub.msvcrt.dll_calloc
mov qword [0x00b58d88], rax
test rax, rax
je 0x6a2cfd
lea r12, [0x00aed7a0]
mov rbx, qword [0x00afb100]
mov dword [0x00b58d80], 0
jmp 0x6a29b4
cmp eax, 1
je 0x6a2c42
mov r8d, 0x17e
lea rdx, str.components.c
lea rcx, [0x00aed53a]
call qword [sym.imp.msvcrt.dll__assert]
add r12, 8
mov rbx, qword [r12]
test rbx, rbx
je 0x6a2bc0
mov esi, dword [rbx + 0x1c]
test esi, esi
jne 0x6a2c20
mov rax, qword [rbx + 8]
test rax, rax
je 0x6a29d4
xor ecx, ecx
call rax
test eax, eax
js 0x6a2c50
mov rdx, qword [rbx + 0x10]
test rdx, rdx
je 0x6a29f7
mov eax, dword [0x00b58d80]
lea ecx, [rax + 1]
mov dword [0x00b58d80], ecx
mov rcx, qword [0x00b58d88]
mov qword [rcx + rax*8], rdx
mov eax, dword [rbx + 0x18]
test eax, eax
jne 0x6a2980
mov rbp, qword [rbx + 0x20]
mov ecx, 5
lea rdi, str.stop
mov rbx, qword [rbp + 8]
mov rsi, rbx
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
je 0x6a2d83
mov edx, 0x2d
mov rcx, rbx
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x6a2d1c
mov rcx, rbx
lea rdx, [0x00aed37f]
call sub.msvcrt.dll_strcspn
mov rcx, rbx
mov rsi, rax
call sub.msvcrt.dll_strlen
cmp rsi, rax
jne 0x6a2d1c
mov esi, dword [rbp]
cmp esi, 4
ja 0x6a2d5e
mov eax, 1
mov ecx, esi
shl rax, cl
test al, 0x16
je 0x6a2d5e
mov r13, qword [0x00b58da0]
mov edi, dword [0x00b58d94]
lea r15, [0x00b58da0]
test r13, r13
jne 0x6a2ad4
jmp 0x6a2ce7
mov r13d, dword [r13 + 0x20]
mov r14d, dword [rbp + 0x20]
cmp r13d, r14d
jae 0x6a2cb5
test edi, edi
jne 0x6a2bf0
mov rax, qword [r15]
mov rax, qword [rax + 0x28]
mov qword [r15], rax
mov r13, qword [rax + 0x28]
lea r15, [rax + 0x28]
test r13, r13
je 0x6a2af7
mov rbx, qword [rbp + 8]
mov rsi, qword [r13 + 8]
mov rdx, rbx
mov rcx, rsi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x6a2aa0
mov rax, qword [r15]
mov r13, qword [rax + 0x28]
lea r15, [rax + 0x28]
test r13, r13
jne 0x6a2ad0
test edi, edi
je 0x6a2b70
mov rbx, qword [rbp + 8]
mov esi, dword [rbp]
mov r15d, dword [rbp + 0x20]
lea rdi, str.global
cmp esi, 2
je 0x6a2b33
lea rdi, str.misc
cmp esi, 4
je 0x6a2b33
cmp esi, 1
lea rdi, [0x00aed22c]
lea r8, [0x00aed220]
cmovne rdi, r8
mov ecx, 2
call qword [fcn.00701940]
mov dword [rsp + 0x20], r15d
mov r9, rbx
mov r8, rdi
lea rdx, [0x00aed528]
mov rcx, rax
mov qword [rsp + 0x30], rdx
lea rdx, str.statically_build
mov qword [rsp + 0x28], rdx
lea rdx, str.Registered__s_discovery_component___s_with_priority__u___s_s__n
call sub.msvcrt.dll_fprintf
mov rax, qword [0x00b58da0]
test rax, rax
je 0x6a2cef
mov edx, dword [rbp + 0x20]
cmp dword [rax + 0x20], edx
jae 0x6a2b95
jmp 0x6a2d52
cmp dword [rax + 0x20], edx
jb 0x6a2ba2
lea rcx, [rax + 0x28]
mov rax, qword [rax + 0x28]
test rax, rax
jne 0x6a2b90
add r12, 8
mov rbx, qword [r12]
mov qword [rbp + 0x28], rax
mov qword [rcx], rbp
test rbx, rbx
jne 0x6a29b4
nop word [rax + rax]
cmp dword [0x00b58d90], 1
je 0x6a28d5
mov r8d, 0x19e
lea rdx, str.components.c
lea rcx, str.hwloc_components_mutex__1
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6a28d5
mov ecx, 2
call qword [fcn.00701940]
mov dword [rsp + 0x20], r14d
mov r9d, r13d
mov r8, rsi
lea rdx, str.Dropping_previously_registered_discovery_component___s__priority__u_lower_than_new_one__u_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
mov edi, dword [0x00b58d94]
jmp 0x6a2ab9
mov ecx, 2
call qword [fcn.00701940]
mov r8d, esi
lea rdx, str.Ignoring_static_component_with_invalid_flags__lx_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x6a29a3
mov rcx, qword [rbx + 0x20]
call fcn.006b2160
jmp 0x6a29a3
mov ecx, dword [0x00b58d94]
test ecx, ecx
je 0x6a29a3
mov ecx, 2
call qword [fcn.00701940]
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 0x6a29a3
mov r8d, 0x148
lea rdx, str.components.c
lea rcx, str._unsigned___1___hwloc_components_users
call qword [sym.imp.msvcrt.dll__assert]
mov eax, dword [0x00b58d98]
jmp 0x6a28bf
test edi, edi
je 0x6a29a3
mov ecx, 2
call qword [fcn.00701940]
mov dword [rsp + 0x20], r13d
mov r9d, r14d
mov r8, rbx
lea rdx, str.Ignoring_new_discovery_component___s__priority__u_lower_than_previously_registered_one__u_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x6a29a3
test edi, edi
jne 0x6a2b02
xor eax, eax
lea rcx, [0x00b58da0]
jmp 0x6a2ba2
mov r8d, 0x161
lea rdx, str.components.c
lea rcx, str.hwloc_component_finalize_cbs
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6a295c
mov eax, dword [0x00b58d94]
test eax, eax
je 0x6a29a3
mov ecx, 2
call qword [fcn.00701940]
mov r9d, 0x2d
mov r8, rbx
lea rdx, str.Cannot_register_discovery_component_with_name___s_containing_reserved_characters___c__n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x6a29a3
lea rcx, [0x00b58da0]
jmp 0x6a2ba2
mov ecx, 2
call qword [fcn.00701940]
mov r9d, esi
mov r8, rbx
lea rdx, str.Cannot_register_discovery_component___s_with_unknown_type__u_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x6a29a3
mov edx, dword [0x00b58d94]
test edx, edx
je 0x6a29a3
mov ecx, 2
call qword [fcn.00701940]
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 0x6a29a3