Function at 0x1001561
Capabilities:
Get number of processors

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x668
mov eax, dword [0x1003010]
push ebx
push esi
push edi
push 5
pop ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov esi, 0x1001110
lea edi, [ebp - 0x18]
rep movsd dword es:[edi], dword [esi]
mov esi, eax
push 2
mov dword [ebp - 0x644], eax
mov dword [ebp - 0x634], esi
pop ebx
push 0x20
pop edi
cmp word [esi], di
jne 0x10015ad
add esi, ebx
cmp word [esi], di
je 0x10015a0
mov dword [ebp - 0x634], esi
cmp word [esi], 0x2f
jne 0x10015e8
add esi, ebx
movzx eax, word [esi]
test eax, eax
mov dword [ebp - 0x634], esi
je 0x1001598
cmp eax, edi
je 0x1001598
cmp eax, 0x44
je 0x10015d0
cmp eax, 0x64
jne 0x10015d7
and dword [0x1003008], 0
add esi, ebx
movzx eax, word [esi]
test eax, eax
mov dword [ebp - 0x634], esi
jne 0x10015c2
jmp 0x1001598
cmp word [esi], 0x22
mov eax, esi
jne 0x100161e
add esi, ebx
mov dword [ebp - 0x634], esi
add eax, ebx
mov cx, word [eax]
xor edi, edi
cmp cx, di
je 0x100196c
cmp cx, 0x22
jne 0x10015f8
cmp cx, di
je 0x100196c
mov word [eax], di
add eax, ebx
jmp 0x100164a
xor edx, edx
cmp word [esi], dx
je 0x100163a
mov cx, word [eax]
cmp cx, di
je 0x100163a
cmp cx, 0x2c
je 0x100163a
add eax, ebx
cmp word [eax], dx
jne 0x1001625
cmp word [eax], dx
je 0x100196c
mov word [eax], dx
add eax, ebx
xor edi, edi
mov cx, word [eax]
cmp cx, di
je 0x100196c
cmp cx, 0x20
je 0x1001662
cmp cx, 0x2c
jne 0x100166c
add eax, ebx
mov cx, word [eax]
cmp cx, di
jne 0x1001656
cmp word [eax], di
je 0x100196c
push 0x20
push eax
mov dword [ebp - 0x63c], eax
call fcn.01001293
cmp eax, edi
mov dword [ebp - 0x640], eax
je 0x1001698
mov word [eax], di
add eax, ebx
mov dword [ebp - 0x640], eax
push dword [ebp - 0x63c]
call fcn.010012bd
test eax, eax
jne 0x100196c
mov ebx, dword [0x1001044]
push esi
mov dword [ebp - 0x638], esi
call ebx
cmp eax, 0xffffffff
mov esi, 0x104
jne 0x10016f1
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x428]
push eax
push esi
push edi
push dword [ebp - 0x634]
push edi
call dword [0x1001040]
test eax, eax
jbe 0x10016f1
lea eax, [ebp - 0x428]
mov dword [ebp - 0x638], eax
push dword [ebp - 0x638]
lea eax, [ebp - 0x220]
push esi
push eax
mov dword [ebp - 0x668], 0x20
mov dword [ebp - 0x664], edi
call fcn.010011b9
test eax, eax
jl 0x1001743
lea eax, [ebp - 0x18]
push eax
push esi
lea eax, [ebp - 0x220]
push eax
call fcn.0100149a
test eax, eax
jl 0x1001743
lea eax, [ebp - 0x220]
push eax
call ebx
cmp eax, 0xffffffff
je 0x1001743
lea eax, [ebp - 0x220]
jmp 0x100175d
mov eax, dword [ebp - 0x638]
mov dword [ebp - 0x664], 8
mov dword [ebp - 0x654], 0x7b
mov dword [ebp - 0x660], eax
lea eax, [ebp - 0x668]
push eax
call dword [0x100103c]
cmp eax, 0xffffffff
mov dword [0x1003004], eax
je 0x1001786
push 0x1003014
push eax
call dword [0x1001038]
push dword [ebp - 0x634]
call dword [0x1001034]
cmp eax, edi
mov dword [0x1003028], eax
jne 0x10017e2
push edi
push esi
lea eax, [ebp - 0x630]
push eax
push edi
call dword [0x1001030]
push eax
push edi
push 0x1200
call dword [0x100102c]
test eax, eax
je 0x100196c
lea eax, [ebp - 0x630]
push eax
push dword [ebp - 0x634]
push 0x1001100
push 0x401
push edi
call fcn.010014d3
jmp 0x100196c
mov eax, dword fs:[0x18]
mov ecx, dword [0x1003028]
mov esi, dword [eax + 0x30]
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp word [eax + 0x14], di
je 0x100183b
cmp dword [eax + 0x4c], edi
je 0x100183b
mov ecx, dword [eax + 0x4c]
and ecx, 0xff
mov dword [esi + 0xa4], ecx
movzx ecx, byte [eax + 0x4d]
mov dword [esi + 0xa8], ecx
mov cx, word [eax + 0x4e]
and cx, 0x3fff
mov word [esi + 0xac], cx
mov eax, dword [eax + 0x4c]
xor eax, 0xbfffffff
shr eax, 0x1e
mov dword [esi + 0xb0], eax
lea eax, [ebp - 0x638]
push eax
push 0xa
push 1
push dword [esi + 8]
call dword [0x1001008]
cmp eax, edi
je 0x1001863
mov ax, word [eax + 0x34]
cmp ax, di
je 0x1001863
mov word [esi + 0xae], ax
mov ecx, dword [ebp - 0x63c]
cmp word [ecx], 0x23
jne 0x100189f
lea eax, [ecx + 2]
cmp word [eax], di
je 0x100189f
push eax
call dword [0x10010bc]
movzx eax, ax
pop ecx
push eax
push dword [0x1003028]
call dword [0x1001028]
mov dword [0x1003020], eax
mov dword [0x100301c], edi
jmp 0x100193c
push ecx
call dword [0x1001024]
mov esi, eax
inc esi
lea eax, [esi + esi + 2]
push eax
push edi
mov dword [0x100301c], edi
call dword [0x1001020]
mov ebx, eax
cmp ebx, edi
je 0x100193c
push edi
push edi
lea eax, [esi + esi]
push eax
push ebx
push esi
push dword [ebp - 0x63c]
push edi
push edi
call dword [0x100101c]
test eax, eax
je 0x1001935
push ebx
call dword [0x1001018]
mov edi, dword [0x1001028]
lea esi, [ebx + eax]
push ebx
mov byte [esi], 0x57
mov byte [esi + 1], 0
push dword [0x1003028]
call edi
test eax, eax
mov dword [0x1003020], eax
jne 0x1001933
mov byte [esi], 0x41
push ebx
push dword [0x1003028]
mov dword [0x100301c], 1
call edi
test eax, eax
mov dword [0x1003020], eax
jne 0x1001933
push ebx
mov byte [esi], al
push dword [0x1003028]
call edi
mov dword [0x1003020], eax
xor edi, edi
push ebx
call dword [0x1001014]
cmp dword [0x1003020], edi
jne 0x1001970
push dword [ebp - 0x63c]
push dword [ebp - 0x634]
push 0x1001100
push 0x400
push edi
call fcn.010014d3
push dword [0x1003028]
call dword [fcn.01001010]
xor eax, eax
jmp 0x10019a3
cmp dword [ebp - 0x640], edi
je 0x1001997
push dword [ebp - 0x640]
push dword [ebp + 0xc]
push dword [ebp - 0x644]
call fcn.0100144a
xor ecx, ecx
test eax, eax
setge cl
mov eax, ecx
jmp 0x10019a3
mov eax, dword [ebp - 0x644]
mov word [eax], di
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01001c5e
leave
ret 0xc