Function at 0x180015140
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.xmrstak_cuda_backend.dll_hwloc_bitmap_alloc_full
mov qword [rbx + 0x188], rax
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_alloc_full
mov rdi, qword [rbx + 0x2c0]
mov qword [rbx + 0x190], rax
test rdi, rdi
je 0x1800151a3
nop
mov rax, qword [rdi]
mov ecx, dword [rax]
dec ecx
cmp ecx, 1
ja 0x18001519a
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x18001519a
mov rcx, rdi
call rax
mov rdi, qword [rdi + 0x18]
test rdi, rdi
jne 0x180015180
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rax, qword [rcx]
mov r8, qword [rax + 0xb8]
test r8, r8
je 0x1800151de
cmp dword [r8 + 0x10], esi
jne 0x1800151fd
mov edx, dword [r8]
mov ecx, esi
test edx, edx
je 0x1800151de
mov r9, qword [r8 + 8]
nop dword [rax]
mov eax, ecx
cmp dword [r9 + rax*4], esi
jne 0x1800151fd
inc ecx
cmp ecx, edx
jb 0x1800151d0
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 0x18001523c
cmp dword [rbx + 0xb4], esi
je 0x18001523c
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 0x18001522d
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
test eax, eax
jne 0x180015233
test byte [rbx + 0x20], 4
je 0x18001523c
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 0x180015303
mov edx, dword [r8]
mov ecx, esi
test edx, edx
je 0x180015276
mov r8, qword [r8 + 8]
mov eax, ecx
cmp dword [r8 + rax*4], esi
jne 0x180015303
inc ecx
cmp ecx, edx
jb 0x180015264
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 0xd]
call sym.xmrstak_cuda_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.xmrstak_cuda_backend.dll_hwloc_bitmap_dup
mov qword [rdi + 0xb8], rax
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_alloc
xor edx, edx
mov qword [rdi + 0xc8], rax
mov rcx, rax
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_set
mov rax, qword [rdi + 0x28]
lea r9, [sym.xmrstak_cuda_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.xmrstak_cuda_backend.dll_hwloc__insert_object_by_cpuset
jmp 0x180015327
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.xmrstak_cuda_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.xmrstak_cuda_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.xmrstak_cuda_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.xmrstak_cuda_backend.dll_hwloc_bitmap_and
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.1800133c0
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.180012ec0
test byte [rbx + 0x20], 1
jne 0x1800153dd
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.180013690
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rdx, qword [rcx]
movsxd rcx, dword [rdx]
cmp ecx, 0x12
jb 0x1800153fd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
jmp 0x18001546a
mov r8d, dword [rbx + rcx*4 + 0x6c]
cmp r8d, 1
je 0x18001546a
cmp r8d, 3
jne 0x1800154ea
cmp ecx, 0xf
jne 0x180015454
mov rax, qword [rdx + 0x28]
movzx edx, word [rax + 6]
mov ecx, edx
shr ecx, 8
lea eax, [rcx - 1]
cmp eax, 2
jbe 0x1800154ea
cmp ecx, 0xb
je 0x1800154ea
lea eax, [rdx - 0xc04]
test eax, 0xfffffffd
je 0x1800154ea
cmp ecx, 0x12
jne 0x18001546a
jmp 0x1800154ea
cmp ecx, 0x10
jne 0x1800154ea
mov rax, qword [rdx + 0x28]
cmp dword [rax], 4
jne 0x1800154ea
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rdi, qword [rcx]
mov r8, qword [rdi + 0x78]
test r8, r8
je 0x1800154ea
cmp qword [r8 + 0x58], rsi
jne 0x1800154ea
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 0x1800154a9
lea rcx, [r8 + 0x90]
call fcn.180010da0
mov rdx, qword [rdi + 0xa0]
test rdx, rdx
je 0x1800154c1
lea rcx, [r8 + 0xa0]
call fcn.180010da0
mov rdx, qword [rdi + 0xb0]
test rdx, rdx
je 0x1800154d9
lea rcx, [r8 + 0xb0]
call fcn.180010da0
mov rcx, rdi
call fcn.180010950
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.xmrstak_cuda_backend.dll_hwloc_topology_reconnect
test eax, eax
js 0x1800151ea
mov rdi, qword [rbx + 0x2c0]
test rdi, rdi
je 0x180015533
nop dword [rax + rax]
mov rax, qword [rdi]
mov ecx, dword [rax]
dec ecx
cmp ecx, 1
jbe 0x18001552a
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x18001552a
mov rcx, rdi
call rax
mov rdi, qword [rdi + 0x18]
test rdi, rdi
jne 0x180015510
mov qword [rsp + 0x30], rbp
cmp dword [rbx + 4], esi
ja 0x180015542
mov rbp, rsi
jmp 0x180015559
mov rax, qword [rbx + 0x10]
cmp dword [rax], esi
ja 0x18001554f
mov rbp, rsi
jmp 0x180015559
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rbp, qword [rcx]
cmp dword [rbx + 0x2f8], esi
je 0x18001560e
mov qword [rsp + 0x38], r14
lea r14, [rbp + 0xa0]
mov dword [rbx + 0x2f8], esi
mov rdi, qword [r14]
test rdi, rdi
je 0x180015609
mov eax, dword [rdi]
cmp eax, 0xf
je 0x1800155cd
cmp eax, 0xe
jne 0x1800155e1
mov rax, qword [rdi + 0x28]
cmp dword [rax + 0x20], 1
je 0x18001559f
cmp dword [rax + 0x18], 1
jne 0x1800155e1
cmp dword [rax + 0x18], 1
je 0x1800155cd
mov rcx, qword [rdi + 0xa0]
test rcx, rcx
je 0x1800155fd
mov eax, dword [rcx]
cmp eax, 0xf
je 0x1800155c7
cmp eax, 0xe
jne 0x1800155fd
mov rax, qword [rcx + 0x28]
cmp dword [rax + 0x18], 1
jne 0x1800155fd
mov rdx, qword [rcx + 0x28]
jmp 0x1800155d1
mov rdx, qword [rdi + 0x28]
mov rcx, rbx
call fcn.18001e960
mov rdx, rax
cmp rax, rbp
jne 0x1800155e7
lea r14, [rdi + 0x58]
jmp 0x1800155fd
mov rax, qword [rdi + 0x58]
mov r8, rdi
mov qword [r14], rax
mov rcx, rbx
mov qword [rdi + 0x58], rsi
call sym.xmrstak_cuda_backend.dll_hwloc_insert_object_by_parent
mov rdi, qword [r14]
test rdi, rdi
jne 0x180015583
mov r14, qword [rsp + 0x38]
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.1800137d0
mov rdx, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rdx]
call fcn.180013830
mov rax, qword [rbx + 0x18]
mov rbp, qword [rsp + 0x30]
mov rcx, qword [rax]
cmp qword [rcx], rsi
jne 0x180015661
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.1800100d0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
xor edx, edx
mov rcx, rbx
call sym.xmrstak_cuda_backend.dll_hwloc_topology_reconnect
test eax, eax
js 0x1800151ea
mov rcx, rbx
call fcn.180013960
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.180012df0
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.1800141a0
mov rcx, rbx
call fcn.180014300
mov rax, qword [rbx + 0x2c0]
test rax, rax
je 0x18001577f
mov rax, qword [rax]
lea rdx, [0x18008b0b4]
mov rcx, qword [rax + 8]
movzx eax, byte [rcx + rsi]
inc rsi
cmp al, byte [rdx + rsi - 1]
jne 0x1800156e7
cmp rsi, 4
jne 0x1800156c2
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 0x180015726
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 0x18001577f
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 0x18001577f
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 0x180015776
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