Function at 0x40f440
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4870a0
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x4a60f8]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x1c]
test edi, edi
je 0x40f4ce
lea eax, [esp + 0x14]
push eax
mov ecx, 0x494900
mov dword [edi], 1
call fcn.00406a00
mov ebx, dword [ebp + 8]
mov dword [esp + 0x38], 0
mov ecx, dword [ebx + 0xb0]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x40f4e5
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f4ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
lea eax, [ebx + 0x64]
mov dword [esp + 0x1c], vtable._BaseModule::CAutoLocker.0
mov dword [esp + 0x20], eax
test eax, eax
je 0x40f4ff
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call edx
lea esi, [ebx + 0x84]
mov byte [esp + 0x38], 1
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
sar eax, 2
test eax, eax
jbe 0x40f614
mov edi, dword [esi + 0xc]
mov dword [esp + 0x18], edi
cmp edi, dword [esi + 0x10]
jbe 0x40f52c
call fcn.00461ea8
mov eax, dword [esi]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x40f5af
call fcn.00461ea8
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x40f547
call fcn.00461ea8
mov eax, edi
lea edi, [esp + 0x14]
call fcn.00401e30
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
push ecx
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0040f720
mov esi, 1
add dword [ebx + 0xa4], esi
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40f586
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40f595
mov ecx, dword [ebx + 0xa4]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x40f5a4
mov edx, dword [ebx + 0xa0]
mov dword [eax], edx
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x40f5b3
xor esi, esi
jmp 0x40f5d5
mov eax, dword [eax]
jmp 0x40f53d
mov edi, dword [esp + 0x14]
xor ecx, ecx
mov word [eax], cx
mov edx, dword [edi - 0xc]
mov ecx, dword [ebp + 0x10]
cmp ecx, edx
jg 0x40f5ca
xor esi, esi
jmp 0x40f5d5
push ecx
push edi
push eax
call fcn.00462b97
add esp, 0xc
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f5fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
cmp dword [ebx + 0xa8], 0
je 0x40f64c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x38], 0
call fcn.0040ede0
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40f4c2
mov ecx, dword [ebx + 0xb0]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea ecx, [esp + 0x1c]
mov dword [edi], 0
mov byte [esp + 0x38], 0
call fcn.0040ede0
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f695
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18