Function at 0x180016c20
Capabilities:
Query environment variable

Disassembly:
push rbx
push rdi
push r14
sub rsp, 0x30
cmp dword [rcx + 0xb8], 0
mov r14d, r8d
mov rbx, rdx
mov rdi, rcx
jne 0x180016c53
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
or eax, 0xffffffff
add rsp, 0x30
pop r14
pop rdi
pop rbx
ret
test r14d, 0xfffffff8
jne 0x180016c3b
mov rdx, qword [rcx + 0x188]
mov rcx, rbx
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_intersects
test eax, eax
je 0x180016c3b
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], rsi
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_alloc
mov rbp, rax
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_alloc
mov rsi, rax
test rbp, rbp
je 0x180016ec5
test rax, rax
je 0x180016eaa
mov rdx, rbx
mov qword [rsp + 0x60], r15
mov rcx, rbp
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_not
xor r15d, r15d
test r14b, 1
je 0x180016dc9
movsxd rax, dword [rdi + 0x58]
cmp eax, 0xffffffff
jne 0x180016cc6
mov ebx, r15d
jmp 0x180016d20
cmp eax, 0xfffffffe
jne 0x180016cd0
mov rbx, r15
jmp 0x180016d20
cmp eax, dword [rdi + 4]
jb 0x180016cfe
mov ecx, 0xfffffffd
sub ecx, eax
cmp ecx, 5
jae 0x180016ccb
mov eax, ecx
shl rax, 5
cmp dword [rax + rdi + 0xe8], r15d
jbe 0x180016ccb
mov rax, qword [rax + rdi + 0xf0]
mov rbx, qword [rax]
jmp 0x180016d20
mov rcx, rax
mov rax, qword [rdi + 0x10]
cmp dword [rax + rcx*4], r15d
ja 0x180016d10
mov rbx, r15
jmp 0x180016d20
mov rax, qword [rdi + 0x18]
mov rcx, qword [rax + rcx*8]
mov rbx, qword [rcx]
nop dword [rax + rax]
mov r8, qword [rbx + 0xb8]
cmp dword [r8 + 0x10], r15d
jne 0x180016d50
mov edx, dword [r8]
mov ecx, r15d
test edx, edx
je 0x180016d5f
mov r9, qword [r8 + 8]
nop dword [rax + rax]
mov eax, ecx
cmp dword [r9 + rax*4], r15d
jne 0x180016d50
inc ecx
cmp ecx, edx
jb 0x180016d40
jmp 0x180016d5f
mov rdx, rbp
mov rcx, r8
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_isincluded
test eax, eax
je 0x180016d6a
mov edx, dword [rbx + 0x10]
mov rcx, rsi
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_set
mov rbx, qword [rbx + 0x38]
test rbx, rbx
jne 0x180016d20
mov rcx, qword [rdi + 0x190]
mov rdx, rsi
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_isincluded
test eax, eax
je 0x180016dbd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rcx, rbp
mov dword [rax], 0x16
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_free
mov rcx, rsi
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_free
or eax, 0xffffffff
mov r15, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
pop rdi
pop rbx
ret
mov rcx, rsi
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_iszero
test eax, eax
je 0x180016dd4
mov rcx, rsi
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_free
mov rsi, r15
mov r8, qword [rdi + 0x18]
mov r9, rbp
mov edx, r14d
mov qword [rsp + 0x20], rsi
mov rcx, rdi
mov r8, qword [r8]
call fcn.1800169e0
mov rcx, qword [rdi + 0x188]
mov r8, rbp
mov rdx, rcx
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_andnot
test rsi, rsi
je 0x180016e17
mov rcx, qword [rdi + 0x190]
mov r8, rsi
mov rdx, rcx
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_andnot
mov rcx, rbp
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_free
mov rcx, rsi
call sym.xmrstak_cuda_backend.dll_hwloc_bitmap_free
xor edx, edx
mov rcx, rdi
call sym.xmrstak_cuda_backend.dll_hwloc_topology_reconnect
test eax, eax
jns 0x180016e4a
mov rcx, rdi
call fcn.180016190
mov rcx, rdi
call fcn.1800157a0
jmp 0x180016da2
mov rax, qword [rdi + 0x288]
test rax, rax
je 0x180016e6d
nop word [rax + rax]
mov dword [rax + 0x28], r15d
mov rax, qword [rax + 0x38]
test rax, rax
jne 0x180016e60
mov rcx, rdi
call fcn.180013960
mov rax, qword [rdi + 0x18]
mov rcx, rdi
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.1800141a0
mov rax, qword [rdi + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.180012df0
lea rcx, str.HWLOC_DEBUG_CHECK
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xor eax, eax
jmp 0x180016da5
mov rcx, qword [rbp + 8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
or eax, 0xffffffff
jmp 0x180016daa
test rsi, rsi
je 0x180016edd
mov rcx, qword [rax + 8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
or eax, 0xffffffff
jmp 0x180016daa