Function at 0x40c840
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x54f364
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5a5784]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x10], ebx
push str._GETSET_CIOOperation::Save__._n
push 0x40000
call fcn.0041abf0
mov eax, dword [ebx + 0x68]
mov ecx, dword [ebx + 0x64]
add esp, 8
lea esi, [ebx + 0x64]
push eax
push ecx
lea eax, [esp + 0x20]
push eax
push esi
call fcn.00411090
mov ecx, dword [ebx + 0x28]
sub ecx, dword [ebx + 0x24]
lea edi, [ebx + 0x24]
test ecx, 0xffffffe0
je 0x40c9f8
push 0x5ada58
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 4]
sub edx, dword [esi]
test edx, 0xffffffe0
jne 0x40c8d4
push edi
mov eax, esi
call fcn.00410ec0
jmp 0x40c9ed
mov ebx, dword [edi]
mov dword [esp + 0x14], ebx
cmp ebx, dword [edi + 4]
je 0x40c9e9
mov eax, dword [esi + 4]
cmp ebx, eax
jae 0x40c95a
mov edx, dword [esi]
cmp edx, ebx
ja 0x40c95a
mov ecx, dword [esi + 8]
mov edi, ebx
sub edi, edx
cmp eax, ecx
jne 0x40c93c
sub eax, edx
sar eax, 5
cmp eax, 0x7fffffe
ja 0x40c9df
sub ecx, edx
inc eax
sar ecx, 5
cmp eax, ecx
jbe 0x40c93c
mov edx, ecx
shr edx, 1
mov ebx, 0x7ffffff
sub ebx, edx
cmp ebx, ecx
jae 0x40c928
xor ecx, ecx
jmp 0x40c92a
add ecx, edx
cmp ecx, eax
jae 0x40c930
mov ecx, eax
push ecx
mov ecx, esi
call fcn.004117b0
mov ebx, dword [esp + 0x14]
mov eax, dword [esi + 4]
and edi, 0xffffffe0
add edi, dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], 0
test eax, eax
je 0x40c9bb
jmp 0x40c9b5
mov ecx, dword [esi + 8]
cmp eax, ecx
jne 0x40c99c
mov edx, dword [esi]
sub eax, edx
sar eax, 5
cmp eax, 0x7fffffe
ja 0x40c9df
sub ecx, edx
inc eax
sar ecx, 5
cmp eax, ecx
jbe 0x40c99c
mov edx, ecx
shr edx, 1
mov edi, 0x7ffffff
sub edi, edx
cmp edi, ecx
jae 0x40c98c
xor ecx, ecx
jmp 0x40c98e
add ecx, edx
cmp ecx, eax
jae 0x40c994
mov ecx, eax
push ecx
mov ecx, esi
call fcn.004117b0
mov eax, dword [esi + 4]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], 1
test eax, eax
je 0x40c9bb
mov edi, ebx
push eax
call fcn.00412150
mov eax, dword [esp + 0x10]
mov dword [esp + 0x38], 0xffffffff
add dword [esi + 4], 0x20
add ebx, 0x20
mov dword [esp + 0x14], ebx
cmp ebx, dword [eax + 0x28]
jne 0x40c8e3
mov ebx, eax
jmp 0x40c9ed
push str.vector_T__too_long
call fcn.005414ad
mov ebx, dword [esp + 0x10]
push 0x5ada58
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebx + 0x38]
sub eax, dword [ebx + 0x34]
lea edi, [ebx + 0x34]
test eax, 0xffffffe0
je 0x40cb47
push 0x5ada58
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [esi + 4]
sub ecx, dword [esi]
test ecx, 0xffffffe0
jne 0x40ca31
push edi
mov eax, esi
call fcn.00410ec0
jmp 0x40cb3c
mov ebx, dword [edi]
mov dword [esp + 0x14], ebx
cmp ebx, dword [edi + 4]
je 0x40cb3c
mov eax, dword [esi + 4]
cmp ebx, eax
jae 0x40cab7
mov edx, dword [esi]
cmp edx, ebx
ja 0x40cab7
mov ecx, dword [esi + 8]
mov edi, ebx
sub edi, edx
cmp eax, ecx
jne 0x40ca99
sub eax, edx
sar eax, 5
cmp eax, 0x7fffffe
ja 0x40c9df
sub ecx, edx
inc eax
sar ecx, 5
cmp eax, ecx
jbe 0x40ca99
mov edx, ecx
shr edx, 1
mov ebx, 0x7ffffff
sub ebx, edx
cmp ebx, ecx
jae 0x40ca85
xor ecx, ecx
jmp 0x40ca87
add ecx, edx
cmp ecx, eax
jae 0x40ca8d
mov ecx, eax
push ecx
mov ecx, esi
call fcn.004117b0
mov ebx, dword [esp + 0x14]
mov eax, dword [esi + 4]
and edi, 0xffffffe0
add edi, dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], 2
test eax, eax
je 0x40cb1c
jmp 0x40cb16
mov ecx, dword [esi + 8]
cmp eax, ecx
jne 0x40cafd
mov edx, dword [esi]
sub eax, edx
sar eax, 5
cmp eax, 0x7fffffe
ja 0x40c9df
sub ecx, edx
inc eax
sar ecx, 5
cmp eax, ecx
jbe 0x40cafd
mov edx, ecx
shr edx, 1
mov edi, 0x7ffffff
sub edi, edx
cmp edi, ecx
jae 0x40caed
xor ecx, ecx
jmp 0x40caef
add ecx, edx
cmp ecx, eax
jae 0x40caf5
mov ecx, eax
push ecx
mov ecx, esi
call fcn.004117b0
mov eax, dword [esi + 4]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], 3
test eax, eax
je 0x40cb1c
mov edi, ebx
push eax
call fcn.00412150
mov eax, dword [esp + 0x10]
mov dword [esp + 0x38], 0xffffffff
add dword [esi + 4], 0x20
add ebx, 0x20
mov dword [esp + 0x14], ebx
cmp ebx, dword [eax + 0x38]
jne 0x40ca40
push 0x5ada58
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
mov ebx, 4
mov dword [esp + 0x38], ebx
mov edi, dword [esi]
cmp edi, dword [eax + 0x68]
je 0x40cbc0
lea esp, [esp]
lea edx, [esp + 0x14]
push edx
mov ecx, edi
call fcn.00410930
lea ecx, [esp + 0x14]
lea esi, [esp + 0x1c]
mov byte [esp + 0x38], 5
call fcn.00404590
mov byte [esp + 0x38], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add edi, 0x20
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cbb5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x10]
cmp edi, dword [ecx + 0x68]
jne 0x40cb70
mov eax, ecx
mov edx, dword [eax + 0x78]
sub edx, dword [eax + 0x74]
test edx, 0xfffffffc
je 0x40cbf6
mov edi, dword [eax + 0x74]
cmp edi, dword [eax + 0x78]
je 0x40cbf6
jmp 0x40cbe0
mov ecx, edi
lea esi, [esp + 0x1c]
call fcn.00404590
mov eax, dword [esp + 0x10]
add edi, ebx
cmp edi, dword [eax + 0x78]
jne 0x40cbe0
mov eax, dword [eax + 0x84]
push 0x4042
push ecx
sub eax, 0x10
mov dword [esp + 0x20], esp
mov esi, esp
push eax
call fcn.00402140
add eax, 0x10
mov dword [esi], eax
mov esi, dword [esp + 0x1c]
add esp, 4
add esi, 8
push esi
call fcn.0040b680
sub esp, 0x10
mov ecx, esp
mov dword [esp + 0x28], esp
push ecx
lea ecx, [esp + 0x30]
call fcn.00402600
push esi
call fcn.0040bbd0
mov edi, eax
test edi, edi
je 0x40cc52
push edi
push str._GETSET_CIOOperation::Save___failed._return_value:__d._n
push 0x40000
jmp 0x40cc5e
push 0
push str._GETSET_CIOOperation::Save___end._return_value:__d._n
push 0x80000
call fcn.0041abf0
add esp, 0xc
push str.CFileWrapper::FileClose__._n
push 0x80000
call fcn.0041abf0
add esp, 8
cmp dword [esi + 0x14], 0
je 0x40cc8f
mov edx, dword [esi]
mov eax, dword [edx + 0x50]
mov ecx, esi
call eax
lea ecx, [esi + 0x18]
call fcn.00401ac0
lea ebx, [esp + 0x1c]
call fcn.00402d80
mov eax, edi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret