Function at 0x40e320
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4787a0
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x494db8]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov edi, dword [ebp + 0x1c]
test edi, edi
je 0x40e3ae
lea eax, [esp + 0x14]
push eax
mov ecx, 0x484624
mov dword [edi], 1
call fcn.00402700
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 0x40e3c5
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 0x40e3ae
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 0x40e3df
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 0x40e4f4
mov edi, dword [esi + 0xc]
mov dword [esp + 0x18], edi
cmp edi, dword [esi + 0x10]
jbe 0x40e40c
call fcn.0045c23a
mov eax, dword [esi]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x40e48f
call fcn.0045c23a
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x40e427
call fcn.0045c23a
mov eax, edi
lea edi, [esp + 0x14]
call fcn.00401e10
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
push ecx
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0040e600
mov esi, 1
add dword [ebx + 0xa4], esi
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40e466
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
push eax
call edx
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40e475
mov ecx, dword [ebx + 0xa4]
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x40e484
mov edx, dword [ebx + 0xa0]
mov dword [eax], edx
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x40e493
xor esi, esi
jmp 0x40e4b5
mov eax, dword [eax]
jmp 0x40e41d
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 0x40e4aa
xor esi, esi
jmp 0x40e4b5
push ecx
push edi
push eax
call fcn.0045cd4c
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 0x40e4dd
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 0x40e52c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x38], 0
call fcn.0040dcd0
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 0x40e3a2
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.0040dcd0
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 0x40e575
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