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

Disassembly:
push 0xffffffffffffffff
push 0x4adb10
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
push esi
mov esi, ecx
mov dword [esp + 0x1c], esi
mov eax, dword [esi + 0x68]
test eax, eax
jne 0x40d548
mov ecx, dword [esi + 0x20]
push ebx
push ebp
lea eax, [esp + 0x3c]
push edi
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov ebx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x44]
mov edi, dword [esp + 0x48]
mov eax, dword [esp + 0x40]
sub ebx, ebp
push esi
lea ecx, [esp + 0x74]
sub edi, eax
mov dword [esp + 0x14], ebx
call sub.MFC42.DLL_CWindowDC::CWindowDC
lea ecx, [esp + 0x30]
mov dword [esp + 0x8c], 0
call fcn.004abe32
mov ebp, dword [esp + 0x74]
lea eax, [esp + 0x70]
neg eax
sbb eax, eax
mov byte [esp + 0x8c], 1
and eax, ebp
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CDC::Attach
add esi, 0x64
mov ecx, esi
call sub.MFC42.DLL_CGdiObject::DeleteObject
mov edx, dword [esp + 0x74]
push ebx
push edi
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
mov ecx, esi
call sub.MFC42.DLL_CGdiObject::Attach
test esi, esi
je 0x40d2bf
mov esi, dword [esi + 4]
mov eax, dword [esp + 0x34]
push esi
push eax
call sub.MFC42.DLL_CDC::SelectGdiObject
push 0xf
mov dword [esp + 0x30], eax
call dword [sym.imp.USER32.dll_GetSysColor]
mov ecx, eax
mov edx, dword [esp + 0x48]
and eax, 0xff
xor ebx, ebx
mov dword [esp + 0x14], eax
mov eax, ecx
shr eax, 0x10
and eax, 0xff
mov bl, ch
mov dword [esp + 0x24], eax
lea eax, [edx*8]
cdq
and edx, 7
and ebx, 0xff
add eax, edx
mov esi, eax
mov eax, dword [esp + 0x40]
sar esi, 3
mov ebp, esi
sub ebp, eax
mov eax, edi
cdq
and edx, 0x7f
mov dword [esp + 0x1c], ebp
add eax, edx
sar eax, 7
cmp eax, 1
mov edi, eax
jg 0x40d332
mov edi, 1
mov eax, dword [esp + 0x10]
push ecx
push eax
mov eax, dword [esp + 0x50]
sub eax, esi
lea ecx, [esp + 0x38]
push eax
push 0
push esi
push ecx
mov dword [esp + 0x30], edi
call fcn.0040d560
add esp, 0x18
cmp esi, edi
jle 0x40d3df
mov eax, dword [esp + 0x1c]
mov ecx, edi
neg ecx
imul ebp, eax
mov dword [esp + 0x1c], ecx
sub eax, esi
jmp 0x40d376
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
sub eax, ecx
sub esi, edi
mov edi, eax
mov ecx, dword [esp + 0x24]
imul edi, eax
mov dword [esp + 0x20], eax
mov eax, edi
imul eax, ecx
cdq
idiv ebp
mov dl, cl
xor ecx, ecx
sub dl, al
mov eax, edi
imul eax, ebx
mov ch, dl
cdq
idiv ebp
mov dl, bl
sub dl, al
mov eax, edi
imul eax, dword [esp + 0x14]
mov cl, dl
mov edi, dword [esp + 0x18]
cdq
idiv ebp
mov dl, byte [esp + 0x14]
shl ecx, 8
sub dl, al
mov eax, dword [esp + 0x10]
and edx, 0xff
or ecx, edx
push ecx
push eax
push edi
push 0
lea ecx, [esp + 0x40]
push esi
push ecx
call fcn.0040d560
add esp, 0x18
cmp esi, edi
jg 0x40d36e
mov edx, dword [esp + 0x10]
push 0
push edx
push esi
push 0
lea eax, [esp + 0x40]
push 0
push eax
call fcn.0040d560
mov esi, dword [esp + 0x40]
add esp, 0x18
lea edi, [esi + 0x5c]
test edi, edi
je 0x40d40a
mov eax, dword [edi + 4]
test eax, eax
jne 0x40d439
mov eax, dword [esi + 0x40]
push eax
push 0x30
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x2bc
push 0
push 0
push 0
push 0x12
call dword [sym.imp.GDI32.dll_CreateFontA]
push eax
mov ecx, edi
call sub.MFC42.DLL_CGdiObject::Attach
push edi
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CDC::SelectObject_1
mov edi, eax
mov eax, dword [esp + 0x48]
sub eax, 5
push 1
lea ecx, [esp + 0x34]
mov dword [esp + 0x4c], eax
call sub.MFC42.DLL_CDC::SetBkMode
mov ebx, dword [sym.imp.USER32.dll_GetSysColor]
push 0x14
call ebx
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CDC::SetTextColor
mov edx, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x54], edx
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x4c]
push 1
lea edx, [esp + 0x54]
push 1
push edx
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], eax
mov eax, dword [esi + 0x6c]
mov dword [esp + 0x64], ecx
lea edx, [esp + 0x60]
mov ecx, dword [eax - 8]
push 0x26
push edx
push ecx
push eax
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x40]
call dword [eax + 0x70]
push 0x10
call ebx
push eax
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CDC::SetTextColor
mov eax, dword [esi + 0x6c]
lea edx, [esp + 0x40]
push 0x26
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x40]
call dword [eax + 0x70]
push edi
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CDC::SelectObject_1
mov eax, dword [esp + 0x2c]
pop edi
pop ebp
pop ebx
test eax, eax
je 0x40d518
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x28]
push eax
push ecx
call sub.MFC42.DLL_CDC::SelectGdiObject
lea ecx, [esp + 0x24]
mov byte [esp + 0x80], 0
call sub.MFC42.DLL_CDC::CDC
lea ecx, [esp + 0x64]
mov dword [esp + 0x80], 0xffffffff
call fcn.004abffa
mov ecx, dword [esp + 0x78]
pop esi
mov dword fs:[0], ecx
add esp, 0x80
ret