Function at 0x18000a430
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x20
xor esi, esi
mov rbx, rcx
mov dword [rcx + 0xbc], esi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_alloc_full
mov qword [rbx + 0x188], rax
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_alloc_full
mov rdi, qword [rbx + 0x2c0]
mov qword [rbx + 0x190], rax
test rdi, rdi
je 0x18000a493
nop
mov rax, qword [rdi]
mov ecx, dword [rax]
dec ecx
cmp ecx, 1
ja 0x18000a48a
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x18000a48a
mov rcx, rdi
call rax
mov rdi, qword [rdi + 0x18]
test rdi, rdi
jne 0x18000a470
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rax, qword [rcx]
mov r8, qword [rax + 0xb8]
test r8, r8
je 0x18000a4ce
cmp dword [r8 + 0x10], esi
jne 0x18000a4ed
mov edx, dword [r8]
mov ecx, esi
test edx, edx
je 0x18000a4ce
mov r9, qword [r8 + 8]
nop dword [rax]
mov eax, ecx
cmp dword [r9 + rax*4], esi
jne 0x18000a4ed
inc ecx
cmp ecx, edx
jb 0x18000a4c0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
or eax, 0xffffffff
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
cmp qword [rbx + 0x250], rsi
je 0x18000a52c
cmp dword [rbx + 0xb4], esi
je 0x18000a52c
lea rcx, str.HWLOC_THISSYSTEM_ALLOWED_RESOURCES
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
test rax, rax
je 0x18000a51d
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
test eax, eax
jne 0x18000a523
test byte [rbx + 0x20], 4
je 0x18000a52c
mov rcx, rbx
call qword [rbx + 0x250]
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rax, qword [rcx]
mov r8, qword [rax + 0xd0]
cmp dword [r8 + 0x10], esi
jne 0x18000a5f3
mov edx, dword [r8]
mov ecx, esi
test edx, edx
je 0x18000a566
mov r8, qword [r8 + 8]
mov eax, ecx
cmp dword [r8 + rax*4], esi
jne 0x18000a5f3
inc ecx
cmp ecx, edx
jb 0x18000a554
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 0xd]
call sym.xmrstakrx_opencl_backend.dll_hwloc_alloc_setup_object
mov rcx, qword [rbx + 0x18]
mov rdi, rax
mov rdx, qword [rcx]
mov rcx, qword [rdx]
mov rcx, qword [rcx + 0xb8]
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_dup
mov qword [rdi + 0xb8], rax
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_alloc
xor edx, edx
mov qword [rdi + 0xc8], rax
mov rcx, rax
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov rax, qword [rdi + 0x28]
lea r9, [sym.xmrstakrx_opencl_backend.dll_hwloc_report_os_error]
movups xmm0, xmmword [rbx + 0x2e0]
mov r8, rdi
xor edx, edx
mov rcx, rbx
movups xmmword [rax], xmm0
movsd xmm1, qword [rbx + 0x2f0]
movsd qword [rax + 0x10], xmm1
xor eax, eax
mov qword [rbx + 0x2e0], rax
mov qword [rbx + 0x2e8], rax
mov qword [rbx + 0x2f0], rax
call sym.xmrstakrx_opencl_backend.dll_hwloc__insert_object_by_cpuset
jmp 0x18000a617
mov rcx, qword [rbx + 0x2f0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
mov qword [rbx + 0x2e0], rax
mov qword [rbx + 0x2e8], rax
mov qword [rbx + 0x2f0], rax
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov r8, qword [rcx]
mov rcx, qword [r8 + 0xb8]
mov r8, qword [r8 + 0xc0]
mov rdx, rcx
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_and
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov r8, qword [rcx]
mov rcx, qword [r8 + 0xc8]
mov r8, qword [r8 + 0xd0]
mov rdx, rcx
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_and
mov rax, qword [rbx + 0x18]
mov rcx, qword [rbx + 0x188]
mov rdx, qword [rax]
mov r8, qword [rdx]
mov rdx, rcx
mov r8, qword [r8 + 0xb8]
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_and
mov rax, qword [rbx + 0x18]
mov rcx, qword [rbx + 0x190]
mov rdx, qword [rax]
mov r8, qword [rdx]
mov rdx, rcx
mov r8, qword [r8 + 0xc8]
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_and
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.1800086b0
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.1800081b0
test byte [rbx + 0x20], 1
jne 0x18000a6cd
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.180008980
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rdx, qword [rcx]
movsxd rcx, dword [rdx]
cmp ecx, 0x12
jb 0x18000a6ed
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
jmp 0x18000a75a
mov r8d, dword [rbx + rcx*4 + 0x6c]
cmp r8d, 1
je 0x18000a75a
cmp r8d, 3
jne 0x18000a7da
cmp ecx, 0xf
jne 0x18000a744
mov rax, qword [rdx + 0x28]
movzx edx, word [rax + 6]
mov ecx, edx
shr ecx, 8
lea eax, [rcx - 1]
cmp eax, 2
jbe 0x18000a7da
cmp ecx, 0xb
je 0x18000a7da
lea eax, [rdx - 0xc04]
test eax, 0xfffffffd
je 0x18000a7da
cmp ecx, 0x12
jne 0x18000a75a
jmp 0x18000a7da
cmp ecx, 0x10
jne 0x18000a7da
mov rax, qword [rdx + 0x28]
cmp dword [rax], 4
jne 0x18000a7da
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rdi, qword [rcx]
mov r8, qword [rdi + 0x78]
test r8, r8
je 0x18000a7da
cmp qword [r8 + 0x58], rsi
jne 0x18000a7da
mov qword [r8 + 0x48], rsi
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov qword [rcx], r8
mov rdx, qword [rdi + 0x90]
test rdx, rdx
je 0x18000a799
lea rcx, [r8 + 0x90]
call fcn.180006090
mov rdx, qword [rdi + 0xa0]
test rdx, rdx
je 0x18000a7b1
lea rcx, [r8 + 0xa0]
call fcn.180006090
mov rdx, qword [rdi + 0xb0]
test rdx, rdx
je 0x18000a7c9
lea rcx, [r8 + 0xb0]
call fcn.180006090
mov rcx, rdi
call fcn.180005c40
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor edx, edx
mov rcx, rbx
call sym.xmrstakrx_opencl_backend.dll_hwloc_topology_reconnect
test eax, eax
js 0x18000a4da
mov rdi, qword [rbx + 0x2c0]
test rdi, rdi
je 0x18000a823
nop dword [rax + rax]
mov rax, qword [rdi]
mov ecx, dword [rax]
dec ecx
cmp ecx, 1
jbe 0x18000a81a
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x18000a81a
mov rcx, rdi
call rax
mov rdi, qword [rdi + 0x18]
test rdi, rdi
jne 0x18000a800
mov qword [rsp + 0x30], rbp
cmp dword [rbx + 4], esi
ja 0x18000a832
mov rbp, rsi
jmp 0x18000a849
mov rax, qword [rbx + 0x10]
cmp dword [rax], esi
ja 0x18000a83f
mov rbp, rsi
jmp 0x18000a849
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rbp, qword [rcx]
cmp dword [rbx + 0x2f8], esi
je 0x18000a8fe
mov qword [rsp + 0x38], r14
lea r14, [rbp + 0xa0]
mov dword [rbx + 0x2f8], esi
mov rdi, qword [r14]
test rdi, rdi
je 0x18000a8f9
mov eax, dword [rdi]
cmp eax, 0xf
je 0x18000a8bd
cmp eax, 0xe
jne 0x18000a8d1
mov rax, qword [rdi + 0x28]
cmp dword [rax + 0x20], 1
je 0x18000a88f
cmp dword [rax + 0x18], 1
jne 0x18000a8d1
cmp dword [rax + 0x18], 1
je 0x18000a8bd
mov rcx, qword [rdi + 0xa0]
test rcx, rcx
je 0x18000a8ed
mov eax, dword [rcx]
cmp eax, 0xf
je 0x18000a8b7
cmp eax, 0xe
jne 0x18000a8ed
mov rax, qword [rcx + 0x28]
cmp dword [rax + 0x18], 1
jne 0x18000a8ed
mov rdx, qword [rcx + 0x28]
jmp 0x18000a8c1
mov rdx, qword [rdi + 0x28]
mov rcx, rbx
call fcn.1800107b0
mov rdx, rax
cmp rax, rbp
jne 0x18000a8d7
lea r14, [rdi + 0x58]
jmp 0x18000a8ed
mov rax, qword [rdi + 0x58]
mov r8, rdi
mov qword [r14], rax
mov rcx, rbx
mov qword [rdi + 0x58], rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_insert_object_by_parent
mov rdi, qword [r14]
test rdi, rdi
jne 0x18000a873
mov r14, qword [rsp + 0x38]
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.180008ac0
mov rdx, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rdx]
call fcn.180008b20
mov rax, qword [rbx + 0x18]
mov rbp, qword [rsp + 0x30]
mov rcx, qword [rax]
cmp qword [rcx], rsi
jne 0x18000a951
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
lea rdx, str.Topology_became_empty__aborting__n
call fcn.1800053c0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
xor edx, edx
mov rcx, rbx
call sym.xmrstakrx_opencl_backend.dll_hwloc_topology_reconnect
test eax, eax
js 0x18000a4da
mov rcx, rbx
call fcn.180008c50
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.1800080e0
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.180009490
mov rcx, rbx
call fcn.1800095f0
mov rax, qword [rbx + 0x2c0]
test rax, rax
je 0x18000aa6f
mov rax, qword [rax]
lea rdx, [0x180092164]
mov rcx, qword [rax + 8]
movzx eax, byte [rcx + rsi]
inc rsi
cmp al, byte [rdx + rsi - 1]
jne 0x18000a9d7
cmp rsi, 4
jne 0x18000a9b2
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rdi, qword [rcx]
mov esi, dword [rdi + 0xe0]
mov rbx, qword [rdi + 0xd8]
lea eax, [rsi + 8]
and eax, 0xfffffff8
cmp esi, eax
je 0x18000aa16
mov edx, eax
mov rcx, rbx
shl rdx, 4
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rbx, rax
test rax, rax
je 0x18000aa6f
mov qword [rdi + 0xd8], rax
lea rcx, str.hwlocVersion
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rcx, rsi
shl rcx, 4
add rbx, rcx
mov qword [rbx], rax
test rax, rax
je 0x18000aa6f
lea rcx, str.2.0.2
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov qword [rbx + 8], rax
test rax, rax
jne 0x18000aa66
mov rcx, qword [rbx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
lea eax, [rsi + 1]
mov dword [rdi + 0xe0], eax
mov rbx, qword [rsp + 0x40]
xor eax, eax
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret