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

Disassembly:
sub esp, 0x44
fld dword [esp + 0x5c]
push ebx
push ebp
push esi
mov esi, ecx
push edi
fmul dword [esi + 0x14]
call sub.MSVCRT.dll__ftol
fld dword [esp + 0x6c]
fmul dword [esi + 0x18]
mov ebx, eax
call sub.MSVCRT.dll__ftol
fld dword [esi + 0x1c]
fadd dword [esi + 0x14]
mov ebp, eax
mov dword [esp + 0x38], ebp
fmul dword [esp + 0x6c]
call sub.MSVCRT.dll__ftol
fld dword [esi + 0x20]
fadd dword [esi + 0x18]
mov dword [esp + 0x1c], eax
fmul dword [esp + 0x6c]
call sub.MSVCRT.dll__ftol
mov dword [esp + 0x20], eax
xor eax, eax
mov al, byte [esi + 0x38]
mov dword [esp + 0x24], 0
mov edi, eax
mov dword [esp + 0x28], 0
shl edi, 1
lea ecx, [edi*8]
push ecx
call sub.MFC42.DLL_operatornew
xor edx, edx
add esp, 4
cmp eax, edx
je 0x40cf89
dec edi
mov ecx, eax
cmp edi, edx
jl 0x40cf81
inc edi
mov dword [ecx + 4], edx
mov dword [ecx], edx
add ecx, 8
dec edi
jne 0x40cf76
mov edi, eax
mov dword [esp + 0x18], edi
jmp 0x40cf8f
mov dword [esp + 0x18], edx
mov edi, edx
mov ecx, dword [esp + 0x1c]
sub ecx, ebx
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x20]
sar eax, 1
sub edx, ebp
add ebx, eax
cmp ecx, edx
mov dword [esp + 0x3c], ebx
jle 0x40cfb9
mov eax, edx
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x10], eax
jmp 0x40cfbd
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x38]
add ebp, eax
sub edx, ebp
xor ecx, ecx
mov dword [edi], 0
mov dword [edi + 4], edx
mov cl, byte [esi + 0x38]
mov dword [esp + 0x6c], 1
mov dword [esp + 0x14], ecx
add ecx, ecx
cmp ecx, 1
jle 0x40d13e
add edi, 8
jmp 0x40cff3
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x6c]
and edx, 0x80000001
jns 0x40d004
dec edx
or edx, 0xfffffffe
inc edx
fild dword [esp + 0x3c]
je 0x40d0b9
xor ecx, ecx
mov cl, byte [esi + 0x39]
mov edx, ecx
mov ecx, 0x64
sub ecx, edx
imul ecx, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x38]
fstp dword [esp + 0x2c]
add edx, eax
mov ax, word [esi + 0x2a]
mov dword [esp + 0x1c], edx
mov ecx, dword [esp + 0x2c]
fild dword [esp + 0x1c]
test ax, ax
mov dword [esp + 0x24], ecx
fstp dword [esp + 0x30]
fild dword [esp + 0x14]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x28], edx
fdivr qword [0x416cc0]
fimul dword [esp + 0x6c]
fstp dword [esp + 0x14]
je 0x40d08a
movsx eax, ax
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
fmul qword [0x417200]
fadd dword [esp + 0x14]
fstp dword [esp + 0x14]
mov ecx, dword [esp + 0x14]
push ecx
sub esp, 8
mov ecx, esp
mov dword [esp + 0x28], esp
push ebp
push ebx
call fcn.0040d210
lea edx, [esp + 0x30]
push edx
call fcn.00405170
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push eax
push ecx
lea edx, [esp + 0x5c]
jmp 0x40d100
fstp dword [esp + 0x24]
fild dword [esp + 0x38]
push ecx
sub esp, 8
fstp dword [esp + 0x34]
fild dword [esp + 0x20]
mov ecx, esp
mov dword [esp + 0x28], esp
fdivr qword [0x416cc0]
fimul dword [esp + 0x78]
fstp dword [esp + 8]
push ebp
push ebx
call fcn.0040d210
lea edx, [esp + 0x30]
push edx
call fcn.00405170
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
push eax
push ecx
lea edx, [esp + 0x64]
push edx
call fcn.00404fc0
mov ecx, eax
add esp, 0x1c
add edi, 8
mov eax, dword [ecx]
sub eax, ebx
mov ecx, dword [ecx + 4]
mov dword [edi - 8], eax
sub ecx, ebp
xor eax, eax
mov dword [edi - 4], ecx
mov al, byte [esi + 0x38]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x14], eax
inc ecx
lea edx, [eax + eax]
cmp ecx, edx
mov dword [esp + 0x6c], ecx
jl 0x40cfef
mov edi, dword [esp + 0x18]
mov al, byte [esi + 0x2c]
test al, al
je 0x40d198
mov ecx, dword [esp + 0x70]
lea eax, [esp + 0x6c]
push eax
push ecx
mov dword [esp + 0x74], 0
call sub.gdiplus.dll_GdipCreateSolidFill
mov ebx, dword [esp + 0x6c]
xor eax, eax
mov al, byte [esi + 0x38]
mov esi, dword [esp + 0x58]
shl eax, 1
mov edx, dword [esi]
push 0
push eax
push edi
push ebx
push edx
call sub.gdiplus.dll_GdipFillPolygonI
test eax, eax
je 0x40d17f
mov dword [esi + 4], eax
push ebx
call sub.gdiplus.dll_GdipDeleteBrush
push edi
call sub.MFC42.DLL_operatordelete
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 0x1c
xor eax, eax
lea ecx, [esp + 0x1c]
mov al, byte [esi + 0x28]
push ecx
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x74]
fild dword [esp + 0x70]
push 0
mov dword [esp + 0x24], 0
fstp dword [esp + 0x74]
mov edx, dword [esp + 0x74]
push edx
push eax
call sub.gdiplus.dll_GdipCreatePen1
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
xor eax, eax
mov al, byte [esi + 0x38]
mov esi, dword [esp + 0x58]
shl eax, 1
mov edx, dword [esi]
push eax
push edi
push ecx
push edx
call sub.gdiplus.dll_GdipDrawPolygonI
test eax, eax
je 0x40d1ec
mov dword [esi + 4], eax
mov eax, dword [esp + 0x1c]
push eax
call sub.gdiplus.dll_GdipDeletePen
push edi
call sub.MFC42.DLL_operatordelete
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret 0x1c