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

Disassembly:
sub esp, 0x60
push ebp
push esi
push edi
mov edi, dword [esp + 0x78]
xor ebp, ebp
mov esi, ecx
cmp dword [edi + 0xa4], ebp
je 0x41a961
mov eax, dword [esp + 0x7c]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jbe 0x41a61a
mov ecx, edx
push ebx
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebp
mov edx, dword [ebx + 0xc]
mov cx, word [eax]
sub edx, dword [ebx + 4]
shr cx, 1
sub edx, 0x24
mov dword [esp + 0x80], edx
mov dx, word [eax + 0xc]
fild dword [esp + 0x80]
fild qword [esp + 0x28]
cmp cx, dx
fdivr st(1)
fst dword [esp + 0x54]
fstp dword [esp + 0x50]
ja 0x41a65d
mov ecx, edx
and ecx, 0xffff
xor edx, edx
mov dword [esp + 0x80], ecx
xor ecx, ecx
fild dword [esp + 0x80]
mov cx, word [eax + 0xe]
mov dx, word [eax + 0x10]
mov dword [esp + 0x80], ecx
xor ecx, ecx
fdivr st(1)
mov cx, word [eax + 0x12]
mov eax, dword [esi + 0xa64]
mov dword [esp + 0x2c], ebp
fst dword [esp + 0x5c]
fstp dword [esp + 0x58]
fild dword [esp + 0x80]
mov dword [esp + 0x80], edx
mov edx, dword [ebx + 8]
fdivr st(1)
fstp dword [esp + 0x60]
fild dword [esp + 0x80]
mov dword [esp + 0x80], ecx
mov ecx, dword [ebx]
sub edx, ecx
mov ecx, dword [esi + 0xa60]
fmul dword [0x426450]
sub edx, 0x10
sub eax, ecx
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x84]
fdivr st(1)
push ecx
mov ecx, esi
fstp dword [esp + 0x68]
fild dword [esp + 0x84]
mov dword [esp + 0x84], edx
fadd st(0), st(0)
fdivr st(1)
fstp dword [esp + 0x6c]
fstp st(0)
fild dword [esp + 0x84]
fidiv dword [esp + 0x2c]
fstp dword [esp + 0x14]
call fcn.0041a2f0
mov edx, dword [eax]
mov ebp, dword [esp + 0x74]
push edx
mov ecx, ebp
mov dword [esp + 0x84], eax
call sub.MFC42.DLL_CDC::SelectObject_1
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.GDI32.dll_GetBkMode]
mov ecx, dword [ebp + 8]
mov dword [esp + 0x20], eax
push ecx
call dword [sym.imp.GDI32.dll_GetBkColor]
mov edx, dword [ebp]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x430]
mov ecx, ebp
push eax
call dword [edx + 0x30]
mov ecx, dword [edi + 0xa4]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0xa60]
mov dword [esp + 0x14], ecx
push eax
mov ecx, edi
mov byte [0x43da73], 1
call fcn.00403ca0
mov edx, dword [esp + 0x7c]
mov ecx, eax
shl ecx, 5
mov edi, ecx
mov dword [esp + 0x84], eax
add edi, dword [edx + 0x94]
mov edx, dword [esp + 0x14]
cmp eax, edx
jae 0x41a92e
mov dword [esp + 0x74], ecx
mov eax, dword [edi]
mov ecx, dword [esi + 0xa64]
mov eax, dword [eax + 8]
cmp eax, ecx
ja 0x41a92e
mov cl, byte [esi + 0x458]
test cl, cl
je 0x41a7d0
cmp eax, dword [esi + 0xa68]
ja 0x41a92e
mov ecx, dword [esi + 0xa60]
mov dword [esp + 0x34], 0
sub eax, ecx
mov ecx, dword [ebx]
mov dword [esp + 0x30], eax
add ecx, 8
fild qword [esp + 0x30]
mov dword [esp + 0x78], ecx
fmul dword [esp + 0x10]
fiadd dword [esp + 0x78]
call sub.MSVCRT.dll__ftol
mov ecx, dword [esi + 0x230]
mov dword [esp + 0x78], eax
test ecx, ecx
je 0x41a85d
lea edx, [eax - 2]
add eax, 2
push edi
lea ecx, [esi + 0x260]
mov dword [esp + 0x44], edx
mov dword [esp + 0x4c], eax
call fcn.004047d0
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [ebx + 0xc]
shl ecx, 1
sub eax, ecx
mov ecx, dword [ebx + 4]
sub eax, 0xf
mov dword [esp + 0x4c], eax
add eax, 0xfffffff6
cmp eax, ecx
mov dword [esp + 0x44], eax
jle 0x41a859
lea edx, [esp + 0x40]
push edi
push edx
push ebp
mov ecx, esi
call fcn.00419f60
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x84]
push edx
mov edx, dword [ebx + 0xc]
push ecx
push edi
sub edx, 0xc
push eax
push edx
push ebp
mov ecx, esi
call fcn.0041a440
mov byte [0x43da73], 0
mov eax, dword [esi + 0x224]
test eax, eax
je 0x41a8fc
mov eax, dword [esi + 0x258]
test eax, eax
je 0x41a8fc
mov al, byte [edi + 8]
test al, al
jne 0x41a8fc
mov eax, dword [edi + 0x10]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], eax
fild qword [esp + 0x38]
fmul dword [esp + 0x50]
call sub.MSVCRT.dll__ftol
mov edx, dword [esp + 0x80]
mov ecx, eax
mov eax, dword [ebx + 0xc]
sub eax, ecx
mov ecx, ebp
sub eax, 0xc
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0x20]
push eax
call sub.MFC42.DLL_CDC::SelectObject_1
mov ecx, dword [esp + 0x80]
mov eax, dword [esp + 0x18]
mov edx, dword [ecx + 0x40]
mov ecx, dword [esp + 0x78]
push edx
push edi
push eax
push ecx
push ebp
mov ecx, esi
call fcn.0041a430
mov edi, dword [esp + 0x74]
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x84]
add edi, 0x20
mov ecx, dword [edx + 0x94]
mov dword [esp + 0x74], edi
add edi, ecx
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x84], eax
jb 0x41a7a7
mov eax, dword [esp + 0x1c]
mov ecx, ebp
push eax
call sub.MFC42.DLL_CDC::SelectObject_1
mov ecx, dword [esp + 0x20]
push ecx
mov ecx, ebp
call sub.MFC42.DLL_CDC::SetBkMode
mov eax, dword [esp + 0x24]
mov edx, dword [ebp]
push eax
mov ecx, ebp
call dword [edx + 0x34]
mov eax, dword [esp + 0x28]
mov edx, dword [ebp]
push eax
mov ecx, ebp
call dword [edx + 0x30]
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x60
ret 0x14