Function at 0x407820
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x439fc8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x3c]
mov dword [esp + 0x14], ebp
call fcn.00438cea
mov edi, dword [esp + 0x84]
mov dword [esp + 0x7c], 0
test edi, edi
jne 0x407862
xor eax, eax
jmp 0x407865
mov eax, dword [edi + 4]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CDC::Attach
mov ebx, dword [esp + 0x88]
lea eax, [ebx + 0x14]
mov ecx, dword [ebx + 0x14]
mov dword [esp + 0x1c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x20], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x24], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [ebp + 0x1b4]
test eax, eax
mov dword [esp + 0x28], edx
je 0x4078a9
mov eax, dword [eax + 4]
push eax
mov eax, dword [esp + 0x44]
push eax
call sub.MFC42.DLL_CDC::SelectGdiObject
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x1b4]
lea ecx, [esp + 0x5c]
mov edx, dword [eax + 4]
push ecx
push 0x18
push edx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ecx, dword [esp + 0x60]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov ecx, edx
mov eax, edx
shr ecx, 0x1f
add eax, ecx
mov ecx, dword [ebx + 8]
cdq
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0x64]
sar esi, 1
test cl, 2
mov dword [esp + 0x10], eax
je 0x407909
mov dword [esp + 0x84], 0
jmp 0x407957
mov edx, dword [esp + 0x8c]
mov ebx, dword [ebp + 0x60]
cmp edx, ebx
je 0x40793a
cmp edx, dword [ebp + 0x64]
je 0x40793a
test cl, 4
je 0x40792a
lea edx, [esi*8]
jmp 0x407950
lea ecx, [esi*4]
mov dword [esp + 0x84], ecx
jmp 0x407957
test cl, 4
je 0x40794d
lea ecx, [esi + esi*2]
shl ecx, 1
mov dword [esp + 0x84], ecx
jmp 0x407957
lea edx, [esi + esi]
mov dword [esp + 0x84], edx
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x40]
push 0xff00ff
push eax
push esi
push 0
push ecx
mov ecx, dword [esp + 0x30]
push edx
mov edx, dword [edi + 4]
push eax
mov eax, dword [esp + 0x3c]
push esi
push eax
push ecx
push edx
call dword [sym.imp.MSIMG32.dll_TransparentBlt]
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
sub ebx, edx
mov ebp, esi
sub ebx, esi
cmp esi, ebx
jge 0x4079d0
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0x40]
push 0xff00ff
push ecx
push 1
add eax, esi
push 0
push eax
mov eax, dword [esp + 0x34]
push edx
mov edx, dword [edi + 4]
push ecx
mov ecx, dword [esp + 0x38]
push 1
add ecx, ebp
push eax
push ecx
push edx
call dword [sym.imp.MSIMG32.dll_TransparentBlt]
inc ebp
cmp ebp, ebx
jl 0x407995
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x84]
push 0xff00ff
push ecx
add eax, esi
push esi
mov ebp, dword [esp + 0x2c]
push 0
push eax
mov eax, dword [esp + 0x54]
mov edx, dword [edi + 4]
mov ebx, dword [sym.imp.MSIMG32.dll_TransparentBlt]
push eax
push ecx
mov ecx, dword [esp + 0x40]
push esi
sub ecx, esi
push ebp
push ecx
push edx
call ebx
mov esi, dword [esp + 0x88]
mov eax, dword [esi + 4]
test eax, eax
je 0x407a98
lea eax, [esi + 0x24]
mov ecx, dword [esi + 0x24]
mov dword [esp + 0x4c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x50], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x54], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x58], edx
mov eax, dword [eax + 0x1b0]
test eax, eax
je 0x407a48
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x40]
push eax
push ecx
call sub.MFC42.DLL_CDC::SelectGdiObject
mov ecx, dword [esi + 0xc]
xor eax, eax
test cl, 1
jne 0x407a73
test cl, 4
je 0x407a69
mov eax, 0x10
jmp 0x407a73
test cl, 2
je 0x407a73
mov eax, 0x20
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x4c]
push 0xff00ff
push 0x10
push 0x10
push 0
push eax
mov eax, dword [esp + 0x64]
push edx
mov edx, dword [edi + 4]
push 0x10
push 0x10
push eax
push ecx
push edx
call ebx
mov eax, dword [esi + 0x34]
test eax, eax
je 0x407adb
jne 0x407aa5
xor eax, eax
jmp 0x407aa8
mov eax, dword [eax + 4]
push eax
mov eax, dword [esp + 0x44]
push eax
call sub.MFC42.DLL_CDC::SelectGdiObject
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x1c]
push 0xff00ff
push 0x10
push 0x10
push 0
push 0
push ecx
mov ecx, dword [edi + 4]
push 0x10
lea edx, [ebp + 5]
push 0x10
add eax, 0x14
push edx
push eax
push ecx
call ebx
push 1
mov ecx, edi
call sub.MFC42.DLL_CDC::SetBkMode
mov ecx, dword [0x44c920]
mov ebx, dword [edi]
push 0
mov edx, dword [ecx]
call dword [edx + 0x1c]
push eax
mov ecx, edi
call dword [ebx + 0x30]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov ebx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x2c], eax
mov al, byte [esi + 8]
test al, 2
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
je 0x407b30
mov eax, dword [edi]
push 0
mov ecx, edi
call dword [eax + 0x38]
mov eax, dword [esp + 0x30]
add eax, 3
jmp 0x407b40
mov edx, dword [edi]
push 0
mov ecx, edi
call dword [edx + 0x38]
mov eax, dword [esp + 0x30]
add eax, 2
mov ecx, dword [esi + 0x34]
mov dword [esp + 0x30], eax
test ecx, ecx
mov ecx, dword [esp + 0x2c]
mov eax, 0x32
je 0x407b58
add ecx, eax
jmp 0x407b5b
add ecx, 0x1e
mov ebp, dword [esp + 0x34]
mov edx, dword [edi]
sub ebp, eax
mov eax, dword [esi]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], ebp
mov ecx, dword [eax - 8]
lea esi, [esp + 0x2c]
push 0x24
push esi
push ecx
push eax
mov ecx, edi
call dword [edx + 0x70]
mov eax, dword [edi]
push ebx
mov ecx, edi
call dword [eax + 0x30]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x407b95
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x30]
push eax
push ecx
call sub.MFC42.DLL_CDC::SelectGdiObject
lea ecx, [esp + 0x2c]
mov dword [esp + 0x6c], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
add esp, 0x70
ret 0xc