Function at 0x6d1d50
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 0x6d1d72
call rdi
mov eax, esi
lock cmpxchg dword [0x00c2d130], ebx
test eax, eax
jne 0x6d1d70
mov eax, dword [0x00c2d138]
cmp eax, 0xffffffff
je 0x6d2160
lea edx, [rax + 1]
mov dword [0x00c2d138], edx
test eax, eax
je 0x6d1de0
cmp dword [0x00c2d130], 1
jne 0x6d1dc0
mov dword [0x00c2d130], 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 0x6d1da5
lea rcx, str.HWLOC_COMPONENTS_VERBOSE
call sub.msvcrt.dll_getenv
xor edx, edx
test rax, rax
je 0x6d1dfd
mov rcx, rax
call sub.msvcrt.dll_atoi
mov edx, eax
mov dword [0x00c2d134], edx
mov ecx, 6
mov edx, 8
mov dword [0x00c2d120], 6
call sub.msvcrt.dll_calloc
mov qword [0x00c2d128], rax
test rax, rax
je 0x6d21cd
lea r12, [0x00912c80]
mov rbx, qword [0x0091e2f0]
mov dword [0x00c2d120], 0
jmp 0x6d1e84
cmp eax, 1
je 0x6d2112
mov r8d, 0x17e
lea rdx, str.components.c
lea rcx, [0x00912a1a]
call qword [sym.imp.msvcrt.dll__assert]
add r12, 8
mov rbx, qword [r12]
test rbx, rbx
je 0x6d2090
mov esi, dword [rbx + 0x1c]
test esi, esi
jne 0x6d20f0
mov rax, qword [rbx + 8]
test rax, rax
je 0x6d1ea4
xor ecx, ecx
call rax
test eax, eax
js 0x6d2120
mov rdx, qword [rbx + 0x10]
test rdx, rdx
je 0x6d1ec7
mov eax, dword [0x00c2d120]
lea ecx, [rax + 1]
mov dword [0x00c2d120], ecx
mov rcx, qword [0x00c2d128]
mov qword [rcx + rax*8], rdx
mov eax, dword [rbx + 0x18]
test eax, eax
jne 0x6d1e50
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 0x6d2253
mov edx, 0x2d
mov rcx, rbx
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x6d21ec
mov rcx, rbx
lea rdx, [0x0091285f]
call sub.msvcrt.dll_strcspn
mov rcx, rbx
mov rsi, rax
call sub.msvcrt.dll_strlen
cmp rsi, rax
jne 0x6d21ec
mov esi, dword [rbp]
cmp esi, 4
ja 0x6d222e
mov eax, 1
mov ecx, esi
shl rax, cl
test al, 0x16
je 0x6d222e
mov r13, qword [0x00c2d140]
mov edi, dword [0x00c2d134]
lea r15, [0x00c2d140]
test r13, r13
jne 0x6d1fa4
jmp 0x6d21b7
mov r13d, dword [r13 + 0x20]
mov r14d, dword [rbp + 0x20]
cmp r13d, r14d
jae 0x6d2185
test edi, edi
jne 0x6d20c0
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 0x6d1fc7
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 0x6d1f70
mov rax, qword [r15]
mov r13, qword [rax + 0x28]
lea r15, [rax + 0x28]
test r13, r13
jne 0x6d1fa0
test edi, edi
je 0x6d2040
mov rbx, qword [rbp + 8]
mov esi, dword [rbp]
mov r15d, dword [rbp + 0x20]
lea rdi, str.global
cmp esi, 2
je 0x6d2003
lea rdi, str.misc
cmp esi, 4
je 0x6d2003
cmp esi, 1
lea rdi, [0x0091270c]
lea r8, str.unknown
cmovne rdi, r8
mov ecx, 2
call qword [fcn.007116c0]
mov dword [rsp + 0x20], r15d
mov r9, rbx
mov r8, rdi
lea rdx, [0x00912a08]
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 [0x00c2d140]
test rax, rax
je 0x6d21bf
mov edx, dword [rbp + 0x20]
cmp dword [rax + 0x20], edx
jae 0x6d2065
jmp 0x6d2222
cmp dword [rax + 0x20], edx
jb 0x6d2072
lea rcx, [rax + 0x28]
mov rax, qword [rax + 0x28]
test rax, rax
jne 0x6d2060
add r12, 8
mov rbx, qword [r12]
mov qword [rbp + 0x28], rax
mov qword [rcx], rbp
test rbx, rbx
jne 0x6d1e84
nop word [rax + rax]
cmp dword [0x00c2d130], 1
je 0x6d1da5
mov r8d, 0x19e
lea rdx, str.components.c
lea rcx, str.hwloc_components_mutex__1
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6d1da5
mov ecx, 2
call qword [fcn.007116c0]
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 [0x00c2d134]
jmp 0x6d1f89
mov ecx, 2
call qword [fcn.007116c0]
mov r8d, esi
lea rdx, str.Ignoring_static_component_with_invalid_flags__lx_n
mov rcx, rax
call sub.msvcrt.dll_fprintf
jmp 0x6d1e73
mov rcx, qword [rbx + 0x20]
call fcn.006e1630
jmp 0x6d1e73
mov ecx, dword [0x00c2d134]
test ecx, ecx
je 0x6d1e73
mov ecx, 2
call qword [fcn.007116c0]
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 0x6d1e73
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 [0x00c2d138]
jmp 0x6d1d8f
test edi, edi
je 0x6d1e73
mov ecx, 2
call qword [fcn.007116c0]
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 0x6d1e73
test edi, edi
jne 0x6d1fd2
xor eax, eax
lea rcx, [0x00c2d140]
jmp 0x6d2072
mov r8d, 0x161
lea rdx, str.components.c
lea rcx, str.hwloc_component_finalize_cbs
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6d1e2c
mov eax, dword [0x00c2d134]
test eax, eax
je 0x6d1e73
mov ecx, 2
call qword [fcn.007116c0]
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 0x6d1e73
lea rcx, [0x00c2d140]
jmp 0x6d2072
mov ecx, 2
call qword [fcn.007116c0]
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 0x6d1e73
mov edx, dword [0x00c2d134]
test edx, edx
je 0x6d1e73
mov ecx, 2
call qword [fcn.007116c0]
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 0x6d1e73