Function at 0x140015580
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.xmr_stak_rx.exe_hwloc_bitmap_alloc_full
mov qword [rbx + 0x188], rax
call sym.xmr_stak_rx.exe_hwloc_bitmap_alloc_full
mov rdi, qword [rbx + 0x2c0]
mov qword [rbx + 0x190], rax
test rdi, rdi
je 0x1400155e3
nop
mov rax, qword [rdi]
mov ecx, dword [rax]
dec ecx
cmp ecx, 1
ja 0x1400155da
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x1400155da
mov rcx, rdi
call rax
mov rdi, qword [rdi + 0x18]
test rdi, rdi
jne 0x1400155c0
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rax, qword [rcx]
mov r8, qword [rax + 0xb8]
test r8, r8
je 0x14001561e
cmp dword [r8 + 0x10], esi
jne 0x14001563d
mov edx, dword [r8]
mov ecx, esi
test edx, edx
je 0x14001561e
mov r9, qword [r8 + 8]
nop dword [rax]
mov eax, ecx
cmp dword [r9 + rax*4], esi
jne 0x14001563d
inc ecx
cmp ecx, edx
jb 0x140015610
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
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x20
pop rdi
ret
cmp qword [rbx + 0x250], rsi
je 0x14001567c
cmp dword [rbx + 0xb4], esi
je 0x14001567c
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 0x14001566d
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
test eax, eax
jne 0x140015673
test byte [rbx + 0x20], 4
je 0x14001567c
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 0x140015743
mov edx, dword [r8]
mov ecx, esi
test edx, edx
je 0x1400156b6
mov r8, qword [r8 + 8]
mov eax, ecx
cmp dword [r8 + rax*4], esi
jne 0x140015743
inc ecx
cmp ecx, edx
jb 0x1400156a4
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 0xd]
call sym.xmr_stak_rx.exe_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.xmr_stak_rx.exe_hwloc_bitmap_dup
mov qword [rdi + 0xb8], rax
call sym.xmr_stak_rx.exe_hwloc_bitmap_alloc
xor edx, edx
mov qword [rdi + 0xc8], rax
mov rcx, rax
call sym.xmr_stak_rx.exe_hwloc_bitmap_set
mov rax, qword [rdi + 0x28]
lea r9, [sym.xmr_stak_rx.exe_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.xmr_stak_rx.exe_hwloc__insert_object_by_cpuset
jmp 0x140015767
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.xmr_stak_rx.exe_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.xmr_stak_rx.exe_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.xmr_stak_rx.exe_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.xmr_stak_rx.exe_hwloc_bitmap_and
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.140013800
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.140013300
test byte [rbx + 0x20], 1
jne 0x14001581d
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.140013ad0
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rdx, qword [rcx]
movsxd rcx, dword [rdx]
cmp ecx, 0x12
jb 0x14001583d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], reloc.WS2_32.dll_shutdown
jmp 0x1400158aa
mov r8d, dword [rbx + rcx*4 + 0x6c]
cmp r8d, 1
je 0x1400158aa
cmp r8d, 3
jne 0x14001592a
cmp ecx, 0xf
jne 0x140015894
mov rax, qword [rdx + 0x28]
movzx edx, word [rax + 6]
mov ecx, edx
shr ecx, 8
lea eax, [rcx - 1]
cmp eax, 2
jbe 0x14001592a
cmp ecx, 0xb
je 0x14001592a
lea eax, [rdx - 0xc04]
test eax, 0xfffffffd
je 0x14001592a
cmp ecx, 0x12
jne 0x1400158aa
jmp 0x14001592a
cmp ecx, 0x10
jne 0x14001592a
mov rax, qword [rdx + 0x28]
cmp dword [rax], 4
jne 0x14001592a
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rdi, qword [rcx]
mov r8, qword [rdi + 0x78]
test r8, r8
je 0x14001592a
cmp qword [r8 + 0x58], rsi
jne 0x14001592a
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 0x1400158e9
lea rcx, [r8 + 0x90]
call fcn.1400111e0
mov rdx, qword [rdi + 0xa0]
test rdx, rdx
je 0x140015901
lea rcx, [r8 + 0xa0]
call fcn.1400111e0
mov rdx, qword [rdi + 0xb0]
test rdx, rdx
je 0x140015919
lea rcx, [r8 + 0xb0]
call fcn.1400111e0
mov rcx, rdi
call fcn.140010d90
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.xmr_stak_rx.exe_hwloc_topology_reconnect
test eax, eax
js 0x14001562a
mov rdi, qword [rbx + 0x2c0]
test rdi, rdi
je 0x140015973
nop dword [rax + rax]
mov rax, qword [rdi]
mov ecx, dword [rax]
dec ecx
cmp ecx, 1
jbe 0x14001596a
mov rax, qword [rdi + 0x38]
test rax, rax
je 0x14001596a
mov rcx, rdi
call rax
mov rdi, qword [rdi + 0x18]
test rdi, rdi
jne 0x140015950
mov qword [rsp + 0x30], rbp
cmp dword [rbx + 4], esi
ja 0x140015982
mov rbp, rsi
jmp 0x140015999
mov rax, qword [rbx + 0x10]
cmp dword [rax], esi
ja 0x14001598f
mov rbp, rsi
jmp 0x140015999
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rbp, qword [rcx]
cmp dword [rbx + 0x2f8], esi
je 0x140015a4e
mov qword [rsp + 0x38], r14
lea r14, [rbp + 0xa0]
mov dword [rbx + 0x2f8], esi
mov rdi, qword [r14]
test rdi, rdi
je 0x140015a49
mov eax, dword [rdi]
cmp eax, 0xf
je 0x140015a0d
cmp eax, 0xe
jne 0x140015a21
mov rax, qword [rdi + 0x28]
cmp dword [rax + 0x20], 1
je 0x1400159df
cmp dword [rax + 0x18], 1
jne 0x140015a21
cmp dword [rax + 0x18], 1
je 0x140015a0d
mov rcx, qword [rdi + 0xa0]
test rcx, rcx
je 0x140015a3d
mov eax, dword [rcx]
cmp eax, 0xf
je 0x140015a07
cmp eax, 0xe
jne 0x140015a3d
mov rax, qword [rcx + 0x28]
cmp dword [rax + 0x18], 1
jne 0x140015a3d
mov rdx, qword [rcx + 0x28]
jmp 0x140015a11
mov rdx, qword [rdi + 0x28]
mov rcx, rbx
call fcn.14001eda0
mov rdx, rax
cmp rax, rbp
jne 0x140015a27
lea r14, [rdi + 0x58]
jmp 0x140015a3d
mov rax, qword [rdi + 0x58]
mov r8, rdi
mov qword [r14], rax
mov rcx, rbx
mov qword [rdi + 0x58], rsi
call sym.xmr_stak_rx.exe_hwloc_insert_object_by_parent
mov rdi, qword [r14]
test rdi, rdi
jne 0x1400159c3
mov r14, qword [rsp + 0x38]
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.140013c10
mov rdx, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rdx]
call fcn.140013c70
mov rax, qword [rbx + 0x18]
mov rbp, qword [rsp + 0x30]
mov rcx, qword [rax]
cmp qword [rcx], rsi
jne 0x140015aa1
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.140001e00
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
int3
xor edx, edx
mov rcx, rbx
call sym.xmr_stak_rx.exe_hwloc_topology_reconnect
test eax, eax
js 0x14001562a
mov rcx, rbx
call fcn.140013da0
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
call fcn.140013230
mov rax, qword [rbx + 0x18]
mov rcx, rbx
mov rdx, qword [rax]
mov rdx, qword [rdx]
call fcn.1400145e0
mov rcx, rbx
call fcn.140014740
mov rax, qword [rbx + 0x2c0]
test rax, rax
je 0x140015bbf
mov rax, qword [rax]
lea rdx, [0x14009be54]
mov rcx, qword [rax + 8]
movzx eax, byte [rcx + rsi]
inc rsi
cmp al, byte [rdx + rsi - 1]
jne 0x140015b27
cmp rsi, 4
jne 0x140015b02
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 0x140015b66
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 0x140015bbf
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 0x140015bbf
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 0x140015bb6
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