Function at 0x140017060
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 0x140017093
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_shutdown
or eax, 0xffffffff
add rsp, 0x30
pop r14
pop rdi
pop rbx
ret
test r14d, 0xfffffff8
jne 0x14001707b
mov rdx, qword [rcx + 0x188]
mov rcx, rbx
call sym.xmr_stak_rx.exe_hwloc_bitmap_intersects
test eax, eax
je 0x14001707b
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], rsi
call sym.xmr_stak_rx.exe_hwloc_bitmap_alloc
mov rbp, rax
call sym.xmr_stak_rx.exe_hwloc_bitmap_alloc
mov rsi, rax
test rbp, rbp
je 0x140017305
test rax, rax
je 0x1400172ea
mov rdx, rbx
mov qword [rsp + 0x60], r15
mov rcx, rbp
call sym.xmr_stak_rx.exe_hwloc_bitmap_not
xor r15d, r15d
test r14b, 1
je 0x140017209
movsxd rax, dword [rdi + 0x58]
cmp eax, 0xffffffff
jne 0x140017106
mov ebx, r15d
jmp 0x140017160
cmp eax, 0xfffffffe
jne 0x140017110
mov rbx, r15
jmp 0x140017160
cmp eax, dword [rdi + 4]
jb 0x14001713e
mov ecx, 0xfffffffd
sub ecx, eax
cmp ecx, 5
jae 0x14001710b
mov eax, ecx
shl rax, 5
cmp dword [rax + rdi + 0xe8], r15d
jbe 0x14001710b
mov rax, qword [rax + rdi + 0xf0]
mov rbx, qword [rax]
jmp 0x140017160
mov rcx, rax
mov rax, qword [rdi + 0x10]
cmp dword [rax + rcx*4], r15d
ja 0x140017150
mov rbx, r15
jmp 0x140017160
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 0x140017190
mov edx, dword [r8]
mov ecx, r15d
test edx, edx
je 0x14001719f
mov r9, qword [r8 + 8]
nop dword [rax + rax]
mov eax, ecx
cmp dword [r9 + rax*4], r15d
jne 0x140017190
inc ecx
cmp ecx, edx
jb 0x140017180
jmp 0x14001719f
mov rdx, rbp
mov rcx, r8
call sym.xmr_stak_rx.exe_hwloc_bitmap_isincluded
test eax, eax
je 0x1400171aa
mov edx, dword [rbx + 0x10]
mov rcx, rsi
call sym.xmr_stak_rx.exe_hwloc_bitmap_set
mov rbx, qword [rbx + 0x38]
test rbx, rbx
jne 0x140017160
mov rcx, qword [rdi + 0x190]
mov rdx, rsi
call sym.xmr_stak_rx.exe_hwloc_bitmap_isincluded
test eax, eax
je 0x1400171fd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov rcx, rbp
mov dword [rax], reloc.WS2_32.dll_shutdown
call sym.xmr_stak_rx.exe_hwloc_bitmap_free
mov rcx, rsi
call sym.xmr_stak_rx.exe_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.xmr_stak_rx.exe_hwloc_bitmap_iszero
test eax, eax
je 0x140017214
mov rcx, rsi
call sym.xmr_stak_rx.exe_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.140016e20
mov rcx, qword [rdi + 0x188]
mov r8, rbp
mov rdx, rcx
call sym.xmr_stak_rx.exe_hwloc_bitmap_andnot
test rsi, rsi
je 0x140017257
mov rcx, qword [rdi + 0x190]
mov r8, rsi
mov rdx, rcx
call sym.xmr_stak_rx.exe_hwloc_bitmap_andnot
mov rcx, rbp
call sym.xmr_stak_rx.exe_hwloc_bitmap_free
mov rcx, rsi
call sym.xmr_stak_rx.exe_hwloc_bitmap_free
xor edx, edx
mov rcx, rdi
call sym.xmr_stak_rx.exe_hwloc_topology_reconnect
test eax, eax
jns 0x14001728a
mov rcx, rdi
call fcn.1400165d0
mov rcx, rdi
call fcn.140015be0
jmp 0x1400171e2
mov rax, qword [rdi + 0x288]
test rax, rax
je 0x1400172ad
nop word [rax + rax]
mov dword [rax + 0x28], r15d
mov rax, qword [rax + 0x38]
test rax, rax
jne 0x1400172a0
mov rcx, rdi
call fcn.140013da0
mov rax, qword [rdi + 0x18]
mov rcx, rdi
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.1400145e0
mov rax, qword [rdi + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.140013230
lea rcx, str.HWLOC_DEBUG_CHECK
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xor eax, eax
jmp 0x1400171e5
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 0x1400171ea
test rsi, rsi
je 0x14001731d
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 0x1400171ea