Function at 0x180022350
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x78
mov rax, qword [rcx + 0x28]
mov r12d, r8d
mov rbp, qword [rcx + 8]
mov rdi, rdx
mov ecx, 0x18
mov qword [rsp + 0x28], rbp
mov esi, dword [rax]
mov dword [rsp + 0xc0], esi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
mov qword [rsp + 0x30], rax
mov eax, 1
test r14, r14
jne 0x1800223b0
xor r13d, r13d
mov r14d, r13d
mov qword [rsp + 0x30], r13
jmp 0x1800223ef
mov ecx, 0x40
mov dword [r14], eax
mov dword [r14 + 4], 0x10
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [r14 + 8], rax
test rax, rax
jne 0x1800223e5
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r13d, r13d
mov r14d, r13d
mov qword [rsp + 0x30], r13
jmp 0x1800223ef
xor r13d, r13d
mov dword [rax], r13d
mov dword [r14 + 0x10], r13d
or r15d, 0xffffffff
mov dword [rsp + 0x3c], r13d
mov ebx, r13d
test esi, esi
je 0x180023869
cmp dword [rdi], 0
je 0x180022415
mov edx, ebx
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov r15d, ebx
inc ebx
add rdi, 0x88
cmp ebx, esi
jb 0x180022403
mov dword [rsp + 0xd8], r15d
cmp r15d, 0xffffffff
je 0x180023869
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x20], rax
mov r14, rax
test rax, rax
jne 0x180022456
mov r14, r13
mov qword [rsp + 0x20], r13
jmp 0x180022492
mov eax, 1
mov dword [r14 + 4], 0x10
mov dword [r14], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [r14 + 8], rax
test rax, rax
jne 0x18002248b
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r14, r13
mov qword [rsp + 0x20], r13
jmp 0x180022492
mov dword [rax], r13d
mov dword [r14 + 0x10], r13d
cmp dword [rbp + 0x70], 1
mov rsi, qword [rsp + 0x30]
je 0x18002272b
mov ebx, dword [rsi]
mov rcx, r14
mov edx, ebx
call fcn.180002010
test eax, eax
jne 0x1800224cf
mov rcx, qword [r14 + 8]
mov dword [r14], ebx
mov r8d, dword [rsi]
mov rdx, qword [rsi + 8]
shl r8, 2
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsi + 0x10]
mov dword [r14 + 0x10], eax
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov edi, eax
cmp eax, 0xffffffff
je 0x18002272b
test r12d, r12d
je 0x1800225ec
mov rbx, qword [rsp + 0xc8]
mov ecx, edi
imul r14, rcx, 0x88
mov ecx, 0x18
mov ebp, dword [r14 + rbx + 8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x180022519
mov rsi, r13
jmp 0x18002254e
mov eax, 1
mov dword [rsi + 4], 0x10
mov dword [rsi], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsi + 8], rax
test rax, rax
jne 0x180022547
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, r13
jmp 0x18002254e
mov dword [rax], r13d
mov dword [rsi + 0x10], r13d
mov eax, dword [rsp + 0xc0]
cmp edi, eax
jae 0x180022599
mov r12, qword [rsp + 0x20]
add rbx, 8
add rbx, r14
cmp dword [rbx], ebp
jne 0x180022584
mov edx, edi
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov edx, edi
mov rcx, r12
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
mov eax, dword [rsp + 0xc0]
inc edi
add rbx, 0x88
cmp edi, eax
jb 0x180022565
mov r12d, dword [rsp + 0xd0]
mov r8d, ebp
mov edx, 1
mov rbp, qword [rsp + 0x28]
mov rcx, rbp
call sym.xmrstakrx_opencl_backend.dll_hwloc_alloc_setup_object
mov rdx, qword [rsp + 0xc8]
xor r8d, r8d
add rdx, r14
mov rcx, rax
mov rbx, rax
mov qword [rax + 0xb8], rsi
call fcn.180022200
lea r9, [sym.xmrstakrx_opencl_backend.dll_hwloc_report_os_error]
mov r8, rbx
xor edx, edx
mov rcx, rbp
call sym.xmrstakrx_opencl_backend.dll_hwloc__insert_object_by_cpuset
mov r14, qword [rsp + 0x20]
jmp 0x180022713
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x180022604
mov rsi, r13
jmp 0x180022639
mov eax, 1
mov dword [rsi + 4], 0x10
mov dword [rsi], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsi + 8], rax
test rax, rax
jne 0x180022632
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, r13
jmp 0x180022639
mov dword [rax], r13d
mov dword [rsi + 0x10], r13d
mov edx, edi
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
movsxd rcx, dword [rbp + 0x28]
lea eax, [rcx + 2]
cmp eax, 1
jbe 0x1800226be
cmp ecx, dword [rbp + 4]
jb 0x180022680
mov eax, 0xfffffffd
sub eax, ecx
cmp eax, 5
jae 0x1800226be
shl rax, 5
cmp dword [rax + rbp + 0xe8], 0
jbe 0x18002267b
mov rax, qword [rax + rbp + 0xf0]
mov rbx, qword [rax]
jmp 0x180022695
mov rbx, r13
jmp 0x180022695
mov rax, qword [rbp + 0x10]
cmp dword [rax + rcx*4], 0
jbe 0x1800226be
mov rax, qword [rbp + 0x18]
mov rcx, qword [rax + rcx*8]
mov rbx, qword [rcx]
test rbx, rbx
je 0x1800226be
nop word [rax + rax]
mov rdx, qword [rbx + 0xb8]
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_intersects
test eax, eax
jne 0x1800226c1
mov rbx, qword [rbx + 0x38]
test rbx, rbx
jne 0x1800226a0
jmp 0x1800226c1
mov rbx, r13
test rsi, rsi
je 0x1800226d9
mov rcx, qword [rsi + 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]
test rbx, rbx
je 0x1800227b8
mov eax, edi
mov r8d, 1
imul rdx, rax, 0x88
mov rcx, rbx
add rdx, qword [rsp + 0xc8]
call fcn.180022200
mov r8, qword [rbx + 0xb8]
mov rdx, r14
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_andnot
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov edi, eax
cmp eax, 0xffffffff
jne 0x1800224e2
mov rsi, qword [rsp + 0x30]
test r12d, r12d
je 0x180022950
mov ebx, dword [rsi]
mov rcx, r14
mov edx, ebx
call fcn.180002010
test eax, eax
jne 0x180022762
mov rcx, qword [r14 + 8]
mov dword [r14], ebx
mov r8d, dword [rsi]
mov rdx, qword [rsi + 8]
shl r8, 2
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsi + 0x10]
mov dword [r14 + 0x10], eax
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov ebx, eax
cmp eax, 0xffffffff
je 0x180022950
mov r15, qword [rsp + 0x28]
nop word [rax + rax]
mov rax, qword [rsp + 0xc8]
mov ecx, ebx
imul rdx, rcx, 0x88
lea rdi, [rax + 8]
add rdi, rdx
mov ebp, dword [rdx + rax + 0xc]
mov r14d, dword [rdi]
cmp ebp, 0xffffffff
jne 0x1800227fc
mov r14, qword [rsp + 0x20]
mov edx, ebx
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
jmp 0x18002292d
cmp dword [rbp + 4], 0
ja 0x1800227c3
mov rcx, r13
jmp 0x1800227db
mov rax, qword [rbp + 0x10]
cmp dword [rax], 0
ja 0x1800227d1
mov rcx, r13
jmp 0x1800227db
mov rax, qword [rbp + 0x18]
mov rcx, qword [rax]
mov rcx, qword [rcx]
mov eax, edi
mov r8d, 1
imul rdx, rax, 0x88
add rdx, qword [rsp + 0xc8]
call fcn.180022200
jmp 0x180022950
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x180022814
mov rsi, r13
jmp 0x180022849
mov eax, 1
mov dword [rsi + 4], 0x10
mov dword [rsi], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsi + 8], rax
test rax, rax
jne 0x180022842
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, r13
jmp 0x180022849
mov dword [rax], r13d
mov dword [rsi + 0x10], r13d
cmp ebx, dword [rsp + 0xc0]
jae 0x180022898
mov r12, qword [rsp + 0x20]
mov r15d, dword [rsp + 0xc0]
nop
mov eax, dword [rdi + 4]
cmp eax, 0xffffffff
je 0x18002287b
cmp dword [rdi], r14d
jne 0x180022885
cmp eax, ebp
jne 0x180022885
mov edx, ebx
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov edx, ebx
mov rcx, r12
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
inc ebx
add rdi, 0x88
cmp ebx, r15d
jb 0x180022860
mov r15, qword [rsp + 0x28]
mov r8d, ebp
mov edx, 0xd
mov rcx, r15
call sym.xmrstakrx_opencl_backend.dll_hwloc_alloc_setup_object
mov ecx, 0x18
mov rdi, rax
mov qword [rax + 0xb8], rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x1800228ca
mov rbx, r13
jmp 0x1800228ff
mov eax, 1
mov dword [rbx + 4], 0x10
mov dword [rbx], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbx + 8], rax
test rax, rax
jne 0x1800228f8
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, r13
jmp 0x1800228ff
mov dword [rax], r13d
mov dword [rbx + 0x10], r13d
mov edx, ebp
mov qword [rdi + 0xc8], rbx
mov rcx, rbx
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
lea r9, [sym.xmrstakrx_opencl_backend.dll_hwloc_report_os_error]
mov r8, rdi
xor edx, edx
mov rcx, r15
call sym.xmrstakrx_opencl_backend.dll_hwloc__insert_object_by_cpuset
inc dword [rsp + 0x3c]
mov r14, qword [rsp + 0x20]
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov ebx, eax
cmp eax, 0xffffffff
jne 0x180022780
mov r15d, dword [rsp + 0xd8]
mov r12d, dword [rsp + 0xd0]
mov rbp, qword [rsp + 0x28]
cmp dword [rbp + 0x9c], 1
je 0x180022d33
mov rsi, qword [rsp + 0x30]
test r12d, r12d
je 0x180022aff
mov ebx, dword [rsi]
mov rcx, r14
mov edx, ebx
call fcn.180002010
test eax, eax
jne 0x18002299e
mov rcx, qword [r14 + 8]
mov dword [r14], ebx
mov r8d, dword [rsi]
mov rdx, qword [rsi + 8]
shl r8, 2
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsi + 0x10]
mov dword [r14 + 0x10], eax
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov ebx, eax
cmp eax, 0xffffffff
je 0x180022aff
mov r15, rbp
mov rax, qword [rsp + 0xc8]
mov ecx, ebx
imul rdx, rcx, 0x88
lea rdi, [rax + 8]
add rdi, rdx
mov ebp, dword [rdx + rax + 0x10]
mov r14d, dword [rdi]
cmp ebp, 0xffffffff
jne 0x1800229ec
mov r14, qword [rsp + 0x20]
mov edx, ebx
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
jmp 0x180022ad7
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x180022a04
mov rsi, r13
jmp 0x180022a39
mov eax, 1
mov dword [rsi + 4], 0x10
mov dword [rsi], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsi + 8], rax
test rax, rax
jne 0x180022a32
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, r13
jmp 0x180022a39
mov dword [rax], r13d
mov dword [rsi + 0x10], r13d
cmp ebx, dword [rsp + 0xc0]
jae 0x180022a88
mov r12, qword [rsp + 0x20]
mov r15d, dword [rsp + 0xc0]
nop
mov eax, dword [rdi + 8]
cmp eax, 0xffffffff
je 0x180022a6b
cmp dword [rdi], r14d
jne 0x180022a75
cmp eax, ebp
jne 0x180022a75
mov edx, ebx
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov edx, ebx
mov rcx, r12
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
inc ebx
add rdi, 0x88
cmp ebx, r15d
jb 0x180022a50
mov r15, qword [rsp + 0x28]
mov r8d, ebp
mov edx, 0xc
mov rcx, r15
call sym.xmrstakrx_opencl_backend.dll_hwloc_alloc_setup_object
lea rcx, str.ComputeUnit
mov rbx, rax
mov qword [rax + 0xb8], rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rcx, qword [rbx + 0x28]
lea r9, [sym.xmrstakrx_opencl_backend.dll_hwloc_report_os_error]
mov qword [rbx + 8], rax
mov r8, rbx
xor edx, edx
mov dword [rcx + 4], 0x78
mov rcx, r15
call sym.xmrstakrx_opencl_backend.dll_hwloc__insert_object_by_cpuset
mov r14, qword [rsp + 0x20]
mov rcx, r14
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov ebx, eax
cmp eax, 0xffffffff
jne 0x1800229b4
mov r15d, dword [rsp + 0xd8]
mov r12d, dword [rsp + 0xd0]
mov rsi, qword [rsp + 0x30]
mov rbp, qword [rsp + 0xc8]
movsxd rax, r15d
imul r13, rax, 0x88
add r13, rbp
mov qword [rsp + 0xd8], r13
cmp qword [r13 + 0x20], 0
je 0x180022d30
mov r15d, dword [r13 + 0x28]
mov r12, qword [rsp + 0x20]
dec r15d
mov rax, qword [r13 + 0x20]
lea r14, [r15*4]
cmp dword [r14 + rax], 0xffffffff
je 0x180022d11
mov edi, dword [rsi]
lea eax, [rdi - 1]
test eax, eax
jne 0x180022b57
xor ecx, ecx
jmp 0x180022b9c
mov ecx, eax
and ecx, 0xffff0000
je 0x180022b64
shr eax, 0x10
test ecx, ecx
mov edx, 0x11
mov ecx, 1
cmove edx, ecx
test eax, 0xff00
je 0x180022b80
shr eax, 8
add edx, 8
test al, 0xf0
je 0x180022b8a
shr eax, 4
add edx, 4
test al, 0xc
je 0x180022b94
shr eax, 2
add edx, 2
test al, 2
lea ecx, [rdx + 1]
cmove ecx, edx
mov ebx, 1
shl ebx, cl
cmp ebx, dword [r12 + 4]
jbe 0x180022bca
mov rcx, qword [r12 + 8]
mov edx, ebx
shl rdx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
je 0x180022beb
mov qword [r12 + 8], rax
mov dword [r12 + 4], ebx
mov rcx, qword [r12 + 8]
mov dword [r12], edi
mov r8d, dword [rsi]
mov rdx, qword [rsi + 8]
shl r8, 2
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsi + 0x10]
mov dword [r12 + 0x10], eax
mov rcx, r12
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov ebx, eax
cmp eax, 0xffffffff
je 0x180022d11
mov r13, qword [rsp + 0x28]
nop dword [rax]
nop word [rax + rax]
mov ecx, ebx
imul rdi, rcx, 0x88
add rdi, 0x20
add rdi, rbp
mov rcx, qword [rdi]
mov ebp, dword [r14 + rcx]
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
je 0x180022c6e
mov eax, 1
mov dword [rsi + 4], 0x10
mov dword [rsi], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsi + 8], rax
test rax, rax
jne 0x180022c67
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor esi, esi
jmp 0x180022c6e
xor ecx, ecx
mov dword [rax], ecx
mov dword [rsi + 0x10], ecx
cmp ebx, dword [rsp + 0xc0]
jae 0x180022cb0
mov r13d, dword [rsp + 0xc0]
nop
mov rax, qword [rdi]
cmp dword [r14 + rax], ebp
jne 0x180022c9d
mov edx, ebx
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov edx, ebx
mov rcx, r12
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
inc ebx
add rdi, 0x88
cmp ebx, r13d
jb 0x180022c80
mov r13, qword [rsp + 0x28]
mov r8d, ebp
mov edx, 0xc
mov rcx, r13
call sym.xmrstakrx_opencl_backend.dll_hwloc_alloc_setup_object
lea r9, [sym.xmrstakrx_opencl_backend.dll_hwloc_report_os_error]
mov r8, rax
xor edx, edx
mov rcx, qword [rax + 0x28]
mov qword [rax + 0xb8], rsi
mov dword [rcx + 4], 0x65
mov rcx, qword [rax + 0x28]
mov dword [rcx + 8], r15d
mov rcx, r13
call sym.xmrstakrx_opencl_backend.dll_hwloc__insert_object_by_cpuset
mov rcx, r12
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov rbp, qword [rsp + 0xc8]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x180022c10
mov r13, qword [rsp + 0xd8]
mov eax, dword [r13 + 0x28]
dec r15d
mov rsi, qword [rsp + 0x30]
dec eax
cmp r15d, eax
jbe 0x180022b33
mov r12d, dword [rsp + 0xd0]
xor r13d, r13d
mov rdi, qword [rsp + 0x28]
cmp dword [rdi + 0x74], 1
je 0x180022f34
test r12d, r12d
je 0x1800230ae
mov r14, qword [rsp + 0x30]
mov edi, dword [r14]
lea eax, [rdi - 1]
test eax, eax
jne 0x180022d5f
mov ecx, r13d
jmp 0x180022da4
mov ecx, eax
and ecx, 0xffff0000
je 0x180022d6c
shr eax, 0x10
test ecx, ecx
mov edx, 0x11
mov ecx, 1
cmove edx, ecx
test eax, 0xff00
je 0x180022d88
shr eax, 8
add edx, 8
test al, 0xf0
je 0x180022d92
shr eax, 4
add edx, 4
test al, 0xc
je 0x180022d9c
shr eax, 2
add edx, 2
test al, 2
lea ecx, [rdx + 1]
cmove ecx, edx
mov rsi, qword [rsp + 0x20]
mov ebx, 1
shl ebx, cl
cmp ebx, dword [rsi + 4]
jbe 0x180022dd1
mov rcx, qword [rsi + 8]
mov edx, ebx
shl rdx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
je 0x180022dee
mov qword [rsi + 8], rax
mov dword [rsi + 4], ebx
mov rcx, qword [rsi + 8]
mov dword [rsi], edi
mov r8d, dword [r14]
mov rdx, qword [r14 + 8]
shl r8, 2
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [r14 + 0x10]
mov dword [rsi + 0x10], eax
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov ebx, eax
cmp eax, 0xffffffff
je 0x180022f2f
mov rax, qword [rsp + 0xc8]
mov ecx, ebx
imul rdx, rcx, 0x88
lea rdi, [rax + 8]
add rdi, rdx
mov ebp, dword [rdx + rax + 0x18]
mov r14d, dword [rdi]
mov r15d, dword [rdx + rax + 0xc]
cmp ebp, 0xffffffff
jne 0x180022e3e
mov edx, ebx
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
mov rdi, qword [rsp + 0x28]
jmp 0x180022f12
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
test rax, rax
jne 0x180022e56
mov rsi, r13
jmp 0x180022e8b
mov eax, 1
mov dword [rsi + 4], 0x10
mov dword [rsi], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsi + 8], rax
test rax, rax
jne 0x180022e84
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rsi, r13
jmp 0x180022e8b
mov dword [rax], r13d
mov dword [rsi + 0x10], r13d
cmp ebx, dword [rsp + 0xc0]
jae 0x180022edd
mov r12, qword [rsp + 0x20]
nop dword [rax]
mov eax, dword [rdi + 0x10]
cmp eax, 0xffffffff
je 0x180022ec1
cmp dword [rdi], r14d
jne 0x180022ecb
cmp dword [rdi + 4], r15d
jne 0x180022ecb
cmp eax, ebp
jne 0x180022ecb
mov edx, ebx
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov edx, ebx
mov rcx, r12
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
inc ebx
add rdi, 0x88
cmp ebx, dword [rsp + 0xc0]
jb 0x180022ea0
mov rdi, qword [rsp + 0x28]
mov r8d, ebp
mov rcx, rdi
mov edx, 2
call sym.xmrstakrx_opencl_backend.dll_hwloc_alloc_setup_object
lea r9, [sym.xmrstakrx_opencl_backend.dll_hwloc_report_os_error]
mov r8, rax
xor edx, edx
mov rcx, rdi
mov qword [rax + 0xb8], rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc__insert_object_by_cpuset
mov rsi, qword [rsp + 0x20]
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov ebx, eax
cmp eax, 0xffffffff
jne 0x180022e01
mov r12d, dword [rsp + 0xd0]
jmp 0x180022f34
mov rdi, qword [rsp + 0x28]
test r12d, r12d
je 0x1800230ae
mov r15, qword [rsp + 0xc8]
xor r12d, r12d
mov r9d, dword [rsp + 0xc0]
mov esi, r12d
cmp dword [r15], r12d
je 0x18002309a
mov r8d, esi
mov edx, 3
mov rcx, rdi
call sym.xmrstakrx_opencl_backend.dll_hwloc_alloc_setup_object
mov ecx, 0x18
mov r13, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
mov edi, 1
test rax, rax
jne 0x180022f8c
mov rbx, r12
jmp 0x180022fbe
mov ecx, 0x40
mov dword [rax], edi
mov dword [rax + 4], 0x10
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rbx + 8], rax
test rax, rax
jne 0x180022fb7
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, r12
jmp 0x180022fbe
mov dword [rax], r12d
mov dword [rbx + 0x10], r12d
mov ebp, esi
mov qword [r13 + 0xb8], rbx
shr ebp, 5
mov eax, ebp
lea r14d, [rbp + 1]
test ebp, ebp
jne 0x180022fd9
mov ecx, r12d
jmp 0x180023019
mov ecx, eax
and ecx, 0xffff0000
je 0x180022fe6
shr eax, 0x10
test ecx, ecx
mov edx, 0x11
cmove edx, edi
test eax, 0xff00
je 0x180022ffd
shr eax, 8
add edx, 8
test al, 0xf0
je 0x180023007
shr eax, 4
add edx, 4
test al, 0xc
je 0x180023011
shr eax, 2
add edx, 2
test al, 2
lea ecx, [rdx + 1]
cmove ecx, edx
shl edi, cl
cmp edi, dword [rbx + 4]
jbe 0x18002303c
mov rcx, qword [rbx + 8]
mov edx, edi
shl rdx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
je 0x180023079
mov qword [rbx + 8], rax
mov dword [rbx + 4], edi
mov dword [rbx], r14d
mov edx, r12d
test r14d, r14d
je 0x180023060
nop word [rax + rax]
mov rax, qword [rbx + 8]
mov ecx, edx
inc edx
mov dword [rax + rcx*4], r12d
cmp edx, dword [rbx]
jb 0x180023050
mov rax, qword [rbx + 8]
mov ecx, esi
mov dword [rbx + 0x10], r12d
and ecx, 0x1f
lea rdx, [rax + rbp*4]
mov eax, dword [rax + rbp*4]
bts eax, ecx
mov dword [rdx], eax
mov rdi, qword [rsp + 0x28]
lea r9, [sym.xmrstakrx_opencl_backend.dll_hwloc_report_os_error]
mov rcx, rdi
mov r8, r13
xor edx, edx
call sym.xmrstakrx_opencl_backend.dll_hwloc__insert_object_by_cpuset
mov r9d, dword [rsp + 0xc0]
inc esi
add r15, 0x88
cmp esi, r9d
jb 0x180022f53
jmp 0x1800230b1
xor r12d, r12d
mov rsi, qword [rsp + 0xc8]
mov r9d, r12d
mov r14d, dword [rsp + 0xc0]
add rsi, 0x30
mov r15d, dword [0x1800aad58]
nop
mov r10d, dword [rsi - 4]
mov r11d, r12d
test r10d, r10d
je 0x180023207
cmp r10d, 8
jb 0x1800231d2
cmp r15d, 2
jl 0x1800231d2
mov rdi, qword [rsi]
mov ebp, r10d
movd xmm4, r9d
and ebp, 0xfffffff8
pshufd xmm4, xmm4, 0
mov ebx, 2
movdqa xmm5, xmm4
lea eax, [rbx + 1]
mov r9d, r11d
lea r8, [rax + rax*4]
add r11d, 8
movd xmm1, dword [rdi + r8*8 + 4]
mov eax, ebx
lea rcx, [r9 + r9*4]
movd xmm3, dword [rdi + rcx*8 + 4]
lea rdx, [rax + rax*4]
movd xmm0, dword [rdi + rdx*8 + 4]
lea eax, [rbx - 1]
lea rax, [rax + rax*4]
punpckldq xmm3, xmm0
movd xmm2, dword [rdi + rax*8 + 4]
lea eax, [rbx + 5]
lea r9, [rax + rax*4]
punpckldq xmm2, xmm1
movd xmm1, dword [rdi + r9*8 + 4]
lea eax, [rbx + 4]
punpckldq xmm3, xmm2
lea r8, [rax + rax*4]
movd xmm0, dword [rdi + r8*8 + 4]
lea eax, [rbx + 3]
lea rdx, [rax + rax*4]
pmaxud xmm4, xmm3
movd xmm2, dword [rdi + rdx*8 + 4]
lea eax, [rbx + 2]
lea rax, [rax + rax*4]
punpckldq xmm2, xmm1
movd xmm3, dword [rdi + rax*8 + 4]
add ebx, 8
punpckldq xmm3, xmm0
punpckldq xmm3, xmm2
pmaxud xmm5, xmm3
cmp r11d, ebp
jb 0x180023110
pmaxud xmm4, xmm5
movdqa xmm0, xmm4
psrldq xmm0, 8
pmaxud xmm4, xmm0
movdqa xmm0, xmm4
psrldq xmm0, 4
pmaxud xmm4, xmm0
movd r9d, xmm4
cmp r11d, r10d
jae 0x180023207
mov eax, r11d
lea rcx, [rax + rax*4]
lea r8, [rcx*8 + 4]
add r8, qword [rsi]
sub r10d, r11d
mov ecx, r10d
nop
mov eax, r9d
mov r9d, dword [r8]
cmp r9d, eax
lea r8, [r8 + 0x28]
cmovbe r9d, eax
sub rcx, 1
jne 0x1800231f0
add rsi, 0x88
sub r14, 1
jne 0x1800230d0
mov rbp, qword [rsp + 0x28]
mov r14d, r9d
mov dword [rsp + 0x38], r9d
test r9d, r9d
je 0x18002381b
nop
lea eax, [r14 - 1]
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0xd8], eax
mov r15d, r12d
movsxd rdx, r14d
cmp r12d, 2
jne 0x18002325c
cmp eax, 2
ja 0x1800237fa
mov eax, 8
jmp 0x18002326a
cmp eax, 4
ja 0x1800237fa
mov eax, 3
mov rcx, rax
add eax, r14d
add rcx, rdx
mov dword [rsp + 0x48], eax
mov qword [rsp + 0x58], rcx
cmp eax, 0xffffffff
je 0x1800237f3
cmp eax, 0x12
jb 0x18002329b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], 0x16
jmp 0x1800237f0
cmp dword [rbp + rcx*4 + 0x6c], 1
je 0x1800237f3
mov r13, qword [rsp + 0x30]
mov edi, dword [r13]
lea eax, [rdi - 1]
test eax, eax
jne 0x1800232bb
mov ecx, r12d
jmp 0x180023300
mov ecx, eax
and ecx, 0xffff0000
je 0x1800232c8
shr eax, 0x10
test ecx, ecx
mov edx, 0x11
mov ecx, 1
cmove edx, ecx
test eax, 0xff00
je 0x1800232e4
shr eax, 8
add edx, 8
test al, 0xf0
je 0x1800232ee
shr eax, 4
add edx, 4
test al, 0xc
je 0x1800232f8
shr eax, 2
add edx, 2
test al, 2
lea ecx, [rdx + 1]
cmove ecx, edx
mov rsi, qword [rsp + 0x20]
mov ebx, 1
shl ebx, cl
cmp ebx, dword [rsi + 4]
jbe 0x18002332d
mov rcx, qword [rsi + 8]
mov edx, ebx
shl rdx, 2
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
je 0x18002334b
mov qword [rsi + 8], rax
mov dword [rsi + 4], ebx
mov rcx, qword [rsi + 8]
mov dword [rsi], edi
mov r8d, dword [r13]
mov rdx, qword [r13 + 8]
shl r8, 2
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [r13 + 0x10]
mov dword [rsi + 0x10], eax
mov rcx, rsi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov esi, eax
cmp eax, 0xffffffff
je 0x1800237f0
nop
mov ecx, esi
mov ebp, r12d
imul r13, rcx, 0x88
add r13, qword [rsp + 0xc8]
mov edx, dword [r13 + 0x2c]
test edx, edx
je 0x180023399
mov r8, qword [r13 + 0x30]
mov eax, ebp
lea rcx, [rax + rax*4]
cmp dword [r8 + rcx*8 + 4], r14d
jne 0x180023393
cmp dword [r8 + rcx*8], r15d
je 0x180023399
inc ebp
cmp ebp, edx
jb 0x180023380
cmp ebp, edx
jne 0x1800233ae
mov rcx, qword [rsp + 0x20]
mov edx, esi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
jmp 0x1800237d6
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x1800233c6
mov rdi, r12
jmp 0x1800233fb
mov eax, 1
mov dword [rdi + 4], 0x10
mov dword [rdi], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 8], rax
test rax, rax
jne 0x1800233f4
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, r12
jmp 0x1800233fb
mov dword [rax], r12d
mov dword [rdi + 0x10], r12d
mov edx, esi
mov rcx, rdi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov rax, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x28]
movsxd rcx, dword [rdx + rax*4 + 0x24]
lea eax, [rcx + 2]
cmp eax, 1
jbe 0x18002348e
cmp ecx, dword [rdx + 4]
jb 0x18002344d
mov eax, 0xfffffffd
sub eax, ecx
cmp eax, 5
jae 0x18002348e
shl rax, 5
cmp dword [rax + rdx + 0xe8], 0
jbe 0x180023448
mov rax, qword [rax + rdx + 0xf0]
mov rbx, qword [rax]
jmp 0x180023462
mov rbx, r12
jmp 0x180023462
mov rax, qword [rdx + 0x10]
cmp dword [rax + rcx*4], 0
jbe 0x18002348e
mov rax, qword [rdx + 0x18]
mov rcx, qword [rax + rcx*8]
mov rbx, qword [rcx]
test rbx, rbx
je 0x18002348e
nop word [rax + rax]
mov rdx, qword [rbx + 0xb8]
mov rcx, rdi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_intersects
test eax, eax
jne 0x180023491
mov rbx, qword [rbx + 0x38]
test rbx, rbx
jne 0x180023470
jmp 0x180023491
mov rbx, r12
test rdi, rdi
je 0x1800234a9
mov rcx, qword [rdi + 8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test rbx, rbx
je 0x1800235bc
mov r14d, dword [rbx + 0xe0]
mov esi, r12d
test r14d, r14d
je 0x1800234fe
mov r15, qword [rbx + 0xd8]
nop dword [rax + rax]
mov edi, esi
lea rdx, str.Inclusive
add rdi, rdi
mov rcx, qword [r15 + rdi*8]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x1800234f2
inc esi
cmp esi, r14d
jb 0x1800234d0
jmp 0x1800234fe
cmp qword [r15 + rdi*8 + 8], 0
jne 0x180023599
mov esi, dword [rbx + 0xe0]
mov rdi, qword [rbx + 0xd8]
mov eax, ebp
lea rbp, [0x180096010]
lea rcx, [rax + rax*4]
mov rax, qword [r13 + 0x30]
cmp dword [rax + rcx*8 + 0x18], 0
lea rax, [0x18009600c]
cmovne rbp, rax
lea eax, [rsi + 8]
and eax, 0xfffffff8
cmp esi, eax
je 0x180023554
mov edx, eax
mov rcx, rdi
shl rdx, 4
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rdi, rax
test rax, rax
je 0x180023599
mov qword [rbx + 0xd8], rax
lea rcx, str.Inclusive
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rdx, rsi
shl rdx, 4
add rdi, rdx
mov qword [rdi], rax
test rax, rax
je 0x180023599
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov qword [rdi + 8], rax
test rax, rax
jne 0x180023590
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x180023599
lea eax, [rsi + 1]
mov dword [rbx + 0xe0], eax
mov rdx, qword [rsp + 0x20]
mov r8, qword [rbx + 0xb8]
mov rcx, rdx
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_andnot
mov r14d, dword [rsp + 0x38]
mov r15d, dword [rsp + 0x40]
jmp 0x1800237d6
mov eax, dword [r13 + 8]
add r13, 0x30
mov dword [rsp + 0x44], eax
mov eax, ebp
mov rbp, r13
mov qword [rsp + 0x50], r13
lea rcx, [rax + rax*4]
lea rax, [rcx*8]
mov qword [rsp + 0x60], rax
mov rax, qword [r13]
mov r13d, dword [rax + rcx*8 + 0xc]
mov ecx, 0x18
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x180023604
mov rdi, r12
jmp 0x180023639
mov eax, 1
mov dword [rdi + 4], 0x10
mov dword [rdi], eax
lea ecx, [rax + 0x3f]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 8], rax
test rax, rax
jne 0x180023632
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, r12
jmp 0x180023639
mov dword [rax], r12d
mov dword [rdi + 0x10], r12d
cmp esi, dword [rsp + 0xc0]
jae 0x1800236c1
mov rbx, rbp
mov ebp, dword [rsp + 0x44]
nop dword [rax]
mov r8d, dword [rbx - 4]
mov eax, r12d
test r8d, r8d
je 0x18002367a
mov r9, qword [rbx]
nop
mov ecx, eax
lea rdx, [rcx + rcx*4]
cmp dword [r9 + rdx*8 + 4], r14d
jne 0x180023673
cmp dword [r9 + rdx*8], r15d
je 0x18002367a
inc eax
cmp eax, r8d
jb 0x180023660
cmp eax, r8d
je 0x18002369e
cmp dword [rbx - 0x28], ebp
jne 0x1800236aa
mov ecx, eax
mov rax, qword [rbx]
lea rdx, [rcx + rcx*4]
cmp dword [rax + rdx*8 + 0xc], r13d
jne 0x1800236aa
mov edx, esi
mov rcx, rdi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_set
mov rcx, qword [rsp + 0x20]
mov edx, esi
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_clr
inc esi
add rbx, 0x88
cmp esi, dword [rsp + 0xc0]
jb 0x180023650
mov rbp, qword [rsp + 0x50]
mov r13, qword [rsp + 0x28]
or r8d, 0xffffffff
mov edx, dword [rsp + 0x48]
mov rcx, r13
call sym.xmrstakrx_opencl_backend.dll_hwloc_alloc_setup_object
mov r8, qword [rsp + 0x60]
mov rbx, rax
mov rcx, qword [rax + 0x28]
mov dword [rcx + 8], r14d
mov rcx, qword [rbp]
mov edx, dword [r8 + rcx + 0x24]
mov rcx, qword [rax + 0x28]
mov qword [rcx], rdx
mov rdx, qword [rax + 0x28]
mov rcx, qword [rbp]
mov ecx, dword [r8 + rcx + 0x10]
mov dword [rdx + 0xc], ecx
mov rdx, qword [rax + 0x28]
mov rcx, qword [rbp]
mov ecx, dword [r8 + rcx + 0x1c]
mov dword [rdx + 0x10], ecx
mov rax, qword [rbp]
mov rcx, qword [rbx + 0x28]
mov eax, dword [r8 + rax]
mov dword [rcx + 0x14], eax
mov qword [rbx + 0xb8], rdi
mov rax, qword [rbp]
lea rbp, [0x180096010]
mov esi, dword [rbx + 0xe0]
mov rdi, qword [rbx + 0xd8]
cmp dword [r8 + rax + 0x18], 0
lea rax, [0x18009600c]
cmovne rbp, rax
lea eax, [rsi + 8]
and eax, 0xfffffff8
cmp esi, eax
je 0x18002377d
mov edx, eax
mov rcx, rdi
shl rdx, 4
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rdi, rax
test rax, rax
je 0x1800237c2
mov qword [rbx + 0xd8], rax
lea rcx, str.Inclusive
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov rdx, rsi
shl rdx, 4
add rdi, rdx
mov qword [rdi], rax
test rax, rax
je 0x1800237c2
mov rcx, rbp
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__strdup]
mov qword [rdi + 8], rax
test rax, rax
jne 0x1800237b9
mov rcx, qword [rdi]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x1800237c2
lea eax, [rsi + 1]
mov dword [rbx + 0xe0], eax
lea r9, [sym.xmrstakrx_opencl_backend.dll_hwloc_report_os_error]
mov r8, rbx
xor edx, edx
mov rcx, r13
call sym.xmrstakrx_opencl_backend.dll_hwloc__insert_object_by_cpuset
mov rcx, qword [rsp + 0x20]
call sym.xmrstakrx_opencl_backend.dll_hwloc_bitmap_first
mov esi, eax
cmp eax, 0xffffffff
jne 0x180023360
mov rbp, qword [rsp + 0x28]
movsxd rdx, r14d
mov eax, dword [rsp + 0xd8]
inc r15d
mov dword [rsp + 0x40], r15d
cmp r15d, 2
jle 0x18002324a
mov dword [rsp + 0x38], eax
mov r14d, eax
test eax, eax
jne 0x180023230
mov rbx, qword [rsp + 0x20]
test rbx, rbx
je 0x180023838
mov rcx, qword [rbx + 8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsp + 0x30]
test rbx, rbx
je 0x180023855
mov rcx, qword [rbx + 8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
cmp dword [rsp + 0x3c], 0
je 0x180023881
mov rax, qword [rbp + 0x258]
mov byte [rax + 1], 1
jmp 0x180023881
test r14, r14
je 0x180023881
mov rcx, qword [r14 + 8]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret