Function at 0x409140
Capabilities:
Access peb ldr_data
Get number of processors
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x42b1c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4c
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov ebp, ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], 0x42ecb0
lea ecx, [esp + 0x10]
mov dword [esp + 0x64], ebx
call sub.mfc42.dll_CString::CString
push 0x11b
lea ecx, [esp + 0x14]
mov byte [esp + 0x68], 1
call sub.mfc42.dll_CString::LoadStringA
mov eax, dword [esp + 0x10]
push eax
push 0x30
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push ebx
push 0x190
push ebx
push ebx
push ebx
push 0x1e
call dword [sym.imp.gdi32.dll_CreateFontA]
push eax
lea ecx, [esp + 0x38]
call sub.mfc42.dll_CGdiObject::Attach
mov esi, dword [esp + 0x6c]
lea eax, [esp + 0x34]
push eax
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 0x30]
mov edi, dword [esp + 0x70]
mov ecx, esi
push edi
mov dword [esp + 0x30], eax
call sub.mfc42.dll_CDC::IntersectClipRect
mov edx, dword [esi]
push 7
mov ecx, esi
call dword [edx + 0x2c]
mov dword [esp + 0x30], eax
mov eax, dword [esi]
push 0xffffff
mov ecx, esi
call dword [eax + 0x34]
mov edx, dword [esi]
push ebx
mov ecx, esi
call dword [edx + 0x38]
push 2
mov ecx, esi
call sub.mfc42.dll_CDC::SetBkMode
mov edx, dword [edi + 8]
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [esp + 0x54], edx
mov edx, dword [edi + 0xc]
mov dword [esp + 0x50], ecx
add eax, 0x514
add ecx, 0xffffffce
mov dword [esp + 0x58], edx
mov dword [esp + 0x4c], eax
add eax, 0x4b0
mov dword [esp + 0x58], ecx
push 0x435160
lea ecx, [esp + 0x18]
mov dword [esp + 0x58], eax
call sub.mfc42.dll_CString::CString_2
mov byte [esp + 0x64], 2
mov eax, dword [esp + 0x14]
mov edx, dword [esi]
lea edi, [esp + 0x4c]
push 0x24
mov ecx, dword [eax - 8]
push edi
push ecx
push eax
mov ecx, esi
call dword [edx + 0x70]
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
sub eax, 0x32
mov dword [esp + 0x50], eax
push eax
lea ecx, [eax - 0x258]
lea eax, [esp + 0x40]
mov dword [esp + 0x5c], ecx
push edx
push eax
mov ecx, esi
call sub.mfc42.dll_CDC::MoveTo
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x54]
push ecx
push edx
mov ecx, esi
call sub.mfc42.dll_CDC::LineTo
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x54]
push eax
push ecx
mov ecx, esi
call sub.mfc42.dll_CDC::LineTo
mov edx, dword [esp + 0x58]
mov eax, dword [esp + 0x4c]
push edx
push eax
mov ecx, esi
call sub.mfc42.dll_CDC::LineTo
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x4c]
push ecx
push edx
mov ecx, esi
call sub.mfc42.dll_CDC::LineTo
push 0x48c
mov ecx, ebp
call sub.mfc42.dll_CWnd::GetDlgItem
mov eax, dword [eax + 0x20]
push ebx
push ebx
push 0xf0
push eax
call dword [sym.imp.user32.dll_SendMessageA]
cmp eax, ebx
je 0x4094d8
mov ecx, dword [ebp + 0x70]
call fcn.004114e0
lea ecx, [esp + 0x44]
mov dword [esp + 0x20], eax
push ecx
mov ecx, dword [ebp + 0x70]
call fcn.004114f0
mov ebp, dword [eax]
mov dword [esp + 0x3c], ebp
mov ebx, dword [eax + 4]
mov dword [esp + 0x40], ebx
lea eax, [ebx + 3]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x1c], eax
imul eax, ebp
lea eax, [eax*4 + 0x428]
push eax
push 0x42
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
mov dword [esp + 0x70], edi
jne 0x4092f6
push 0xffffffffffffffff
push 0x40
push 0x100
call sub.mfc42.dll_AfxMessageBox
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 1
call fcn.0042a3b0
lea ecx, [esp + 0x10]
mov byte [esp + 0x64], 0
call fcn.0042a3b0
mov dword [esp + 0x34], 0x42ecd8
lea ecx, [esp + 0x34]
mov dword [esp + 0x64], 3
call sub.mfc42.dll_CGdiObject::DeleteObject
xor eax, eax
jmp 0x40952a
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.kernel32.dll_GlobalLock]
push edi
mov dword [esp + 0x70], eax
call dword [sym.imp.kernel32.dll_GlobalLock]
mov ecx, eax
xor edi, edi
mov eax, dword [esp + 0x6c]
inc edi
cmp edi, 0x428
mov dl, byte [edi + eax - 1]
mov byte [edi + ecx - 1], dl
jb 0x409310
mov edi, eax
lea eax, [ebp + 3]
cdq
and edx, 3
mov dword [ecx + 4], ebx
add eax, edx
mov edx, dword [esp + 0x1c]
sar eax, 2
mov dword [ecx + 8], ebp
add edi, 0x428
add ecx, 0x428
mov dword [esp + 0x6c], 0
shl eax, 2
shl edx, 2
test ebp, ebp
mov dword [esp + 0x28], edx
jle 0x4093b0
lea edx, [ebx - 1]
mov dword [esp + 0x1c], ecx
imul edx, eax
add edx, edi
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x6c]
mov edi, dword [esp + 0x24]
add edi, edx
mov edx, ecx
test ebx, ebx
jle 0x409399
mov dword [esp + 0x18], ebx
mov cl, byte [edi]
sub edi, eax
mov byte [edx], cl
mov ecx, dword [esp + 0x18]
inc edx
dec ecx
mov dword [esp + 0x18], ecx
jne 0x409383
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x6c]
mov edi, dword [esp + 0x28]
inc edx
add ecx, edi
cmp edx, ebp
mov dword [esp + 0x6c], edx
mov dword [esp + 0x1c], ecx
jl 0x40936f
mov edx, dword [esp + 0x20]
mov edi, dword [sym.imp.kernel32.dll_GlobalUnlock]
push edx
call edi
mov eax, dword [esp + 0x70]
push eax
call edi
lea ecx, [esp + 0x4c]
push ecx
mov ecx, esi
call sub.mfc42.dll_CDC::IntersectClipRect
mov edx, dword [esp + 0x70]
push edx
call dword [sym.imp.kernel32.dll_GlobalLock]
mov dword [esp + 0x28], eax
call sub.mfc42.dll_AfxGetModuleState
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x20]
call fcn.0040be00
test eax, eax
mov dword [esp + 0x20], 0
je 0x409409
push 1
push eax
mov ecx, esi
call sub.mfc42.dll_CDC::SelectPalette
mov dword [esp + 0x20], eax
push 3
mov ecx, esi
call sub.mfc42.dll_CDC::SetStretchBltMode
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x58]
sub eax, edx
cmp eax, ebp
mov dword [esp + 0x6c], eax
jle 0x40942a
mov edi, ebx
mov ecx, ebp
jmp 0x409452
fild dword [esp + 0x3c]
fild dword [esp + 0x6c]
fdiv st(1)
fild dword [esp + 0x40]
fmul st(1)
call sub.msvcrt.dll__ftol
fxch st(1)
fmul st(1)
mov edi, eax
call sub.msvcrt.dll__ftol
mov ecx, eax
mov eax, dword [esp + 0x6c]
fstp st(0)
sub eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x50]
sar eax, 1
neg eax
add edx, eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x50], edx
mov edx, ecx
neg edx
mov dword [esp + 0x6c], edx
jmp 0x409477
mov edx, dword [esp + 0x6c]
mov ecx, dword [esp + 0x28]
push 0xcc0020
push 0
push ecx
add ecx, 0x428
push ecx
mov ecx, dword [esp + 0x60]
push ebp
push ebx
push 0
push 0
push edx
mov edx, dword [esi + 4]
push edi
push ecx
push eax
push edx
call dword [sym.imp.gdi32.dll_StretchDIBits]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x54]
add eax, edi
cmp eax, ecx
mov dword [esp + 0x4c], eax
jl 0x409473
mov edi, dword [esp + 0x70]
push edi
call dword [sym.imp.kernel32.dll_GlobalUnlock]
push edi
call dword [sym.imp.kernel32.dll_GlobalFree]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4094d8
push 1
push eax
mov ecx, esi
call sub.mfc42.dll_CDC::SelectPalette
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0x30]
mov edx, dword [esp + 0x30]
mov ecx, esi
push edx
call sub.mfc42.dll_CDC::SelectObject
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 1
call fcn.0042a3b0
lea ecx, [esp + 0x10]
mov byte [esp + 0x64], 0
call fcn.0042a3b0
mov dword [esp + 0x34], 0x42ecd8
lea ecx, [esp + 0x34]
mov dword [esp + 0x64], 4
call sub.mfc42.dll_CGdiObject::DeleteObject
mov eax, 1
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x58
ret 8