Function at 0x408f50
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4e2c30
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7c
push ebx
push esi
push edi
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CDC::CDC
mov edi, dword [ebp + 8]
lea eax, [esp + 0x70]
push eax
push 0x18
mov ecx, dword [edi + 4]
mov dword [esp + 0x98], 0
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov esi, dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0
call esi
push eax
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CDC::Attach
test edi, edi
jne 0x408fb5
xor eax, eax
jmp 0x408fb8
mov eax, dword [edi + 4]
mov edx, dword [esp + 0x44]
push eax
push edx
call sub.MFC42.DLL_CDC::SelectGdiObject
mov ebx, eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x2c], ebx
call sub.MFC42.DLL_CDC::CDC
lea ecx, [esp + 0x30]
call fcn.00407e30
mov dword [esp + 0x30], 0x4ec6c4
lea ecx, [esp + 0x38]
call fcn.00407e30
mov dword [esp + 0x38], 0x4ec69c
push 0
mov byte [esp + 0x94], 3
call esi
push eax
lea ecx, [esp + 0x54]
call sub.MFC42.DLL_CDC::Attach
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x44]
push eax
push ecx
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CGdiObject::Attach
mov edi, dword [sym.imp.USER32.dll_GetSysColor]
push 0xf
call edi
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CGdiObject::Attach
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x38]
neg eax
sbb eax, eax
and eax, edx
push eax
mov eax, dword [esp + 0x58]
push eax
call sub.MFC42.DLL_CDC::SelectGdiObject
mov ecx, dword [esp + 0x74]
mov esi, eax
xor eax, eax
mov dword [esp + 0x68], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
lea eax, [esp + 0x30]
neg eax
mov edx, dword [esp + 0x78]
sbb eax, eax
mov dword [esp + 0x6c], edx
and eax, ecx
mov ecx, dword [esp + 0x54]
push eax
lea eax, [esp + 0x64]
push eax
push ecx
call dword [sym.imp.USER32.dll_FillRect]
mov edx, dword [esp + 0x54]
push 1
push 1
push edx
call dword [sym.imp.GDI32.dll_GetPixel]
lea ecx, [esp + 0x30]
mov dword [esp + 0x10], eax
call sub.MFC42.DLL_CGdiObject::DeleteObject
test esi, esi
je 0x4090bb
mov esi, dword [esi + 4]
mov eax, dword [esp + 0x54]
push esi
push eax
call sub.MFC42.DLL_CDC::SelectGdiObject
push 0x10
call edi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x74]
xor edi, edi
test eax, eax
jle 0x4091a1
mov ebx, dword [sym.imp.GDI32.dll_SetPixel]
mov eax, dword [esp + 0x78]
xor esi, esi
test eax, eax
jle 0x409190
mov ecx, dword [esp + 0x44]
push esi
push edi
push ecx
call dword [sym.imp.GDI32.dll_GetPixel]
cmp eax, dword [esp + 0x10]
je 0x409172
xor edx, edx
mov ecx, eax
mov dl, ah
and eax, 0xff
shr ecx, 0x10
mov byte [esp + 0x18], dl
mov byte [esp + 0x14], cl
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
and ecx, 0xff
and edx, 0xff
add ecx, edx
add ecx, eax
mov eax, 0x55555556
imul ecx
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fmul qword [0x4ec7d0]
fstp qword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
push ecx
push edx
push eax
call fcn.00405390
mov ecx, dword [esp + 0x50]
add esp, 0xc
push eax
push esi
push edi
push ecx
jmp 0x409181
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x409183
mov edx, dword [esp + 0x44]
push eax
push esi
push edi
push edx
call ebx
mov eax, dword [esp + 0x78]
inc esi
cmp esi, eax
jl 0x4090f0
mov ecx, dword [esp + 0x74]
inc edi
cmp edi, ecx
jl 0x4090e6
mov ebx, dword [esp + 0x2c]
test ebx, ebx
je 0x4091a8
mov ebx, dword [ebx + 4]
mov eax, dword [esp + 0x44]
push ebx
push eax
call sub.MFC42.DLL_CDC::SelectGdiObject
mov edi, 0x4ec688
mov dword [esp + 0x38], edi
lea ecx, [esp + 0x38]
mov byte [esp + 0x90], 4
call sub.MFC42.DLL_CGdiObject::DeleteObject
mov esi, 0x4ec1a0
mov dword [esp + 0x30], edi
mov dword [esp + 0x38], esi
lea ecx, [esp + 0x30]
mov byte [esp + 0x90], 5
call sub.MFC42.DLL_CGdiObject::DeleteObject
lea ecx, [esp + 0x50]
mov dword [esp + 0x30], esi
mov byte [esp + 0x90], 0
call fcn.0047d630
lea ecx, [esp + 0x40]
mov dword [esp + 0x90], 0xffffffff
call fcn.0047d630
mov ecx, dword [esp + 0x88]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8