Function at 0x170066e10
Capabilities:
Get number of processors

Disassembly:
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb8
mov rsi, rcx
mov rdi, qword [rcx + 0x18]
add dword [rcx + 0x98], 0xffffffff
mov ebx, edx
mov eax, dword [rcx + 0x10]
xor ebp, ebp
cmp eax, 4
je 0x170066e4f
cmp eax, 3
jne 0x170066eac
mov eax, dword [rsi + 0xb0]
test eax, eax
je 0x170066ea7
add eax, 0xffffffff
mov dword [rsi + 0xb0], eax
jmp 0x170066eac
mov eax, dword [rsi + 0xb8]
test eax, eax
jne 0x170066e78
lea rcx, str.object__u.io.completion_count
lea rdx, str._data_rock3_wine_builds_wine_7_dlls_ntdll_threadpool.c
mov r8d, 0x89c
call fcn.1700240e0
mov rcx, qword [rsi + 0xc8]
add eax, 0xffffffff
mov dword [rsi + 0xb8], eax
lea rax, [rax + rax*2]
mov rdx, qword [rcx + rax*8 + 0x10]
mov qword [rsp + 0xb0], rdx
movups xmm0, xmmword [rcx + rax*8]
movaps xmmword [rsp + 0xa0], xmm0
jmp 0x170066eac
mov ebp, 0x102
add dword [rsi + 0xa0], 1
add dword [rsi + 0x9c], 1
add rdi, 0x10
mov rcx, rdi
call sym.ntdll.dll_RtlLeaveCriticalSection
test ebx, ebx
je 0x170066ed6
lea rcx, [0x17008db40]
call sym.ntdll.dll_RtlLeaveCriticalSection
mov qword [rsp + 0x58], rsi
mov rax, qword gs:[0x30]
mov eax, dword [rax + 0x48]
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x64], 1
mov eax, dword [rsi + 0x40]
mov dword [rsp + 0x68], eax
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x7c], xmm0
movups xmmword [rsp + 0x90], xmm0
mov eax, dword [rsi + 0x10]
cmp rax, 4
ja case.default.0x170066f2a
lea rcx, [0x17006730c]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
test byte [0x17008dab8], 8
je 0x170066f6c
mov rax, qword [rsi + 0x28]
mov rcx, qword [rsi + 0xa8]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r8, str.tp_object_execute
lea r9, str.executing_simple_callback__p__p___p__n
mov ecx, 3
call fcn.170061ed0
mov rdx, qword [rsi + 0x28]
lea rcx, [rsp + 0x58]
call qword [rsi + 0xa8]
test byte [0x17008dab8], 8
jne 0x17006712f
jmp 0x17006716e
test byte [0x17008dab8], 8
je 0x17006700f
mov rax, qword [rsi + 0x28]
mov rcx, qword [rsi + 0xa8]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r8, str.tp_object_execute
lea r9, str.executing_work_callback__p__p___p___p__n
jmp 0x170067005
test byte [0x17008dab8], 8
je 0x17006700f
mov rax, qword [rsi + 0x28]
mov rcx, qword [rsi + 0xa8]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r8, str.tp_object_execute
lea r9, str.executing_timer_callback__p__p___p___p__n
mov ecx, 3
call fcn.170061ed0
mov rdx, qword [rsi + 0x28]
lea rcx, [rsp + 0x58]
mov r8, rsi
call qword [rsi + 0xa8]
test byte [0x17008dab8], 8
jne 0x17006712f
jmp 0x17006716e
test byte [0x17008dab8], 8
je 0x17006707c
mov rax, qword [rsi + 0x28]
mov rcx, qword [rsi + 0xa8]
mov dword [rsp + 0x40], ebp
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r8, str.tp_object_execute
lea r9, str.executing_wait_callback__p__p___p___p___u__n
mov ecx, 3
call fcn.170061ed0
mov rdx, qword [rsi + 0x28]
lea rcx, [rsp + 0x58]
mov r8, rsi
mov r9d, ebp
call qword [rsi + 0xa8]
test byte [0x17008dab8], 8
jne 0x17006712f
jmp 0x17006716e
test byte [0x17008dab8], 8
je 0x170067102
mov rax, qword [rsi + 0x28]
mov rcx, qword [rsi + 0xa8]
mov rdx, qword [rsp + 0xb0]
mov qword [rsp + 0x48], rsi
lea rbp, [rsp + 0xa0]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], rdx
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
lea r8, str.tp_object_execute
lea r9, str.executing_I_O_callback__p__p___p___lx___p___p__n
mov ecx, 3
call fcn.170061ed0
mov rdx, qword [rsi + 0x28]
mov r8, qword [rsp + 0xb0]
mov qword [rsp + 0x20], rsi
lea rcx, [rsp + 0x58]
lea r9, [rsp + 0xa0]
call qword [rsi + 0xa8]
test byte [0x17008dab8], 8
je 0x17006716e
mov rax, qword [rsi + 0xa8]
mov qword [rsp + 0x20], rax
lea r8, str.tp_object_execute
lea r9, str.callback__p_returned_n
mov ecx, 3
call fcn.170061ed0
jmp 0x17006716e
lea rcx, [0x17007aecf]
lea rdx, str._data_rock3_wine_builds_wine_7_dlls_ntdll_threadpool.c
mov r8d, 0x8e5
call fcn.1700240e0
mov rax, qword [rsi + 0x38]
test rax, rax
je 0x1700671e9
test byte [0x17008dab8], 8
je 0x1700671b4
mov rcx, qword [rsi + 0x28]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r8, str.tp_object_execute
lea r9, str.executing_finalization_callback__p__p___p__n
mov ecx, 3
call fcn.170061ed0
mov rax, qword [rsi + 0x38]
mov rdx, qword [rsi + 0x28]
lea rcx, [rsp + 0x58]
call rax
test byte [0x17008dab8], 8
je 0x1700671e9
mov rax, qword [rsi + 0x38]
mov qword [rsp + 0x20], rax
lea r8, str.tp_object_execute
lea r9, str.callback__p_returned_n
mov ecx, 3
call fcn.170061ed0
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1700671f8
call sym.ntdll.dll_RtlLeaveCriticalSection
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x17006720d
xor edx, edx
call sym.ntdll.dll_NtReleaseMutant
test eax, eax
jne 0x170067257
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x17006722d
mov edx, dword [rsp + 0x88]
xor r8d, r8d
call sym.ntdll.dll_NtReleaseSemaphore
test eax, eax
jne 0x170067257
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x170067245
xor edx, edx
call sym.ntdll.dll_NtSetEvent
test eax, eax
jne 0x170067257
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x170067257
call sym.ntdll.dll_LdrUnloadDll
test ebx, ebx
je 0x170067267
lea rcx, [0x17008db40]
call sym.ntdll.dll_RtlEnterCriticalSection
mov rcx, rdi
call sym.ntdll.dll_RtlEnterCriticalSection
cmp dword [rsi + 0x10], 0
jne 0x170067284
mov rcx, rsi
call fcn.170064890
mov dword [rsi + 0xc], 1
mov eax, dword [rsi + 0x9c]
add eax, 0xffffffff
mov dword [rsi + 0x9c], eax
cmp dword [rsi + 0x98], 0
je 0x1700672e2
cmp dword [rsp + 0x64], 0
je 0x1700672d5
mov eax, dword [rsi + 0xa0]
add eax, 0xffffffff
mov dword [rsi + 0xa0], eax
cmp dword [rsi + 0x98], 0
jne 0x1700672d5
cmp dword [rsi + 0x10], 4
jne 0x170067304
or eax, dword [rsi + 0xb0]
jne 0x1700672d5
sub rsi, 0xffffffffffffff80
mov rcx, rsi
call sym.ntdll.dll_RtlWakeAllConditionVariable
nop
add rsp, 0xb8
pop rbx
pop rbp
pop rdi
pop rsi
ret
cmp dword [rsi + 0x10], 4
jne 0x1700672f2
or eax, dword [rsi + 0xb0]
jne 0x17006729c
jmp 0x1700672f6
test eax, eax
jne 0x17006729c
lea rcx, [rsi + 0x88]
call sym.ntdll.dll_RtlWakeAllConditionVariable
jmp 0x17006729c
test eax, eax
jne 0x1700672d5
jmp 0x1700672c9