Function at 0x508140
Capabilities:
Get number of processors

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x54a1c0
push eax
mov dword fs:[0], esp
sub esp, 0x24
push esi
push edi
mov edi, dword [esp + 0x3c]
mov esi, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x508180
mov eax, dword [esp + 0x40]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret 0xc
push edi
mov ecx, esi
call fcn.00509aa0
test eax, eax
je 0x5081d6
mov ecx, dword [edi]
lea eax, [esp + 0x44]
mov edx, dword [ecx - 8]
mov ecx, edi
dec edx
push edx
push eax
call fcn.005338fb
mov eax, dword [eax]
push eax
call fcn.005249d8
add esp, 4
lea ecx, [esp + 0x44]
mov esi, eax
call fcn.00536883
mov ecx, dword [esp + 0x40]
push 0x64
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
pop edi
pop esi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret 0xc
mov eax, dword [edi]
mov cl, byte [eax]
cmp cl, 0x2b
je 0x5081e4
cmp cl, 0x2d
jne 0x508216
mov eax, dword [eax - 8]
lea edx, [esp + 0x40]
dec eax
mov ecx, edi
push eax
push edx
call fcn.0053387f
push eax
mov ecx, edi
mov dword [esp + 0x38], 0
call fcn.005369bc
lea ecx, [esp + 0x40]
mov dword [esp + 0x34], 0xffffffff
call fcn.00536883
mov eax, dword [edi]
push ebx
lea ecx, [esp + 0x44]
mov eax, dword [eax - 8]
add eax, 0xfffffffe
push eax
push ecx
mov ecx, edi
call fcn.005338fb
mov eax, dword [eax]
push eax
call fcn.005249d8
add esp, 4
lea ecx, [esp + 0x44]
mov ebx, eax
call fcn.00536883
lea edx, [esp + 0x40]
push 2
push edx
mov ecx, edi
call fcn.0053387f
mov eax, dword [esp + 0x40]
push 0x7a3c6c
push eax
mov dword [esp + 0x40], 1
call fcn.00524b24
add esp, 8
test eax, eax
jne 0x508275
mov esi, ebx
jmp 0x508342
mov ecx, dword [esp + 0x40]
push 0x7a3c68
push ecx
call fcn.00524b24
add esp, 8
test eax, eax
jne 0x5082c9
push 0x7a3c64
lea ecx, [esp + 0x48]
call fcn.005368f1
mov ecx, dword [esp + 0x44]
mov eax, dword [esi + 0x1f8]
lea esi, [esp + 0xc]
mov edx, dword [ecx - 8]
push esi
push edx
mov edx, dword [eax + 8]
push ecx
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x44]
imul esi, ebx
call fcn.00536883
jmp 0x508342
mov eax, dword [esp + 0x40]
push 0x7a3a98
push eax
call fcn.00524b24
add esp, 8
test eax, eax
jne 0x5082ea
mov esi, dword [esi + 0x17c]
imul esi, ebx
jmp 0x508342
mov esi, dword [esi + 0x1f8]
push 0x5a
mov ecx, dword [esi + 8]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
imul eax, ebx
mov edx, dword [esp + 0x40]
mov esi, eax
push 0x7a3c60
push edx
mov dword [esp + 0x4c], esi
call fcn.00524b24
add esp, 8
test eax, eax
je 0x508342
mov eax, dword [esp + 0x40]
push 0x7a3c5c
push eax
call fcn.00524b24
add esp, 8
test eax, eax
jne 0x508369
fild dword [esp + 0x44]
fmul qword [0x6b79d8]
call fcn.00524388
mov esi, eax
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], 0xffffffff
call fcn.00536883
mov ecx, dword [esp + 0x30]
pop ebx
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x30
ret 0xc
mov ecx, dword [esp + 0x40]
push 0x7a3c58
push ecx
call fcn.00524b24
add esp, 8
test eax, eax
jne 0x50838b
fild dword [esp + 0x44]
fmul qword [0x6b79d0]
jmp 0x50833b
mov edx, dword [esp + 0x40]
push 0x7a3c54
push edx
call fcn.00524b24
add esp, 8
test eax, eax
jne 0x5083b6
mov eax, 0x38e38e39
imul esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov esi, edx
jmp 0x508342
mov ecx, dword [esp + 0x40]
push 0x7a3c50
push ecx
call fcn.00524b24
add esp, 8
test eax, eax
jne 0x5083e1
mov eax, 0x2aaaaaab
imul esi
mov eax, edx
shr eax, 0x1f
add edx, eax
mov esi, edx
jmp 0x508342
mov edi, dword [edi]
push 0
push 0
push edi
call fcn.005272a4
add esp, 0xc
test eax, eax
jle 0x508340
cmp eax, 8
jge 0x508340
mov ecx, dword [esp + 0x48]
test ecx, ecx
je 0x508340
mov dword [esp + 0x14], 8
mov dword [esp + 0x18], 0xa
mov dword [esp + 0x1c], 0xc
mov dword [esp + 0x20], 0xe
mov dword [esp + 0x24], 0x12
mov dword [esp + 0x28], 0x18
mov dword [esp + 0x2c], 0x24
mov esi, dword [esp + eax*4 + 0x10]
jmp 0x508342