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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
xor edi, edi
cmp esi, 3
jle case.default.0x406ed5
mov ecx, dword [ebp + 0x18]
cmp ecx, 3
jle case.default.0x406ed5
mov eax, dword [ebp + 8]
cmp eax, 3
ja case.default.0x406ed5
jmp dword [eax*4 + 0x407380]
mov eax, dword [ebp + 0x10]
add ecx, eax
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + esi]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov edi, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
add ecx, eax
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [ecx + esi]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_CreateEllipticRgn]
mov edi, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
push 2
cdq
sub eax, edx
push 3
mov edx, eax
mov eax, dword [ebp + 0xc]
sar edx, 1
add edx, eax
mov dword [esp + 0x64], eax
add eax, esi
mov dword [esp + 0x5c], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x6c], eax
lea eax, [esp + 0x5c]
add ecx, edx
push eax
mov dword [esp + 0x64], edx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x74], ecx
call dword [sym.imp.GDI32.dll_CreatePolygonRgn]
mov edi, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, esi
cdq
idiv ecx
cmp eax, 0xa
jg case.default.0x406ed5
mov eax, ecx
cdq
idiv esi
cmp eax, 0xa
jg case.default.0x406ed5
mov ecx, esi
imul ecx, esi
mov dword [esp + 0xc], ecx
fild dword [esp + 0xc]
fmul qword [0x4bd100]
fild dword [ebp + 0x18]
fst qword [esp + 0x70]
fld st(0)
fmul st(1)
fmul qword [0x4bd0f8]
fadd st(2)
fsqrt
fst qword [esp + 0x20]
fld st(1)
fmul qword [0x4bd0f0]
fstp qword [esp + 0x30]
fcomp qword [0x4bd0e8]
fnstsw ax
test ah, 1
jne 0x407370
fld qword [0x4bd0e0]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0x40200000
fst qword [esp + 0x38]
fld qword [esp + 0x20]
fld st(2)
fadd qword [esp + 0x30]
fld st(1)
fcompp
fnstsw ax
test ah, 0x41
jne 0x40706f
fcom qword [0x4bd0d8]
fnstsw ax
test ah, 1
je 0x407063
fstp st(0)
fld qword [esp + 0x10]
fadd qword [0x4bd0d0]
fstp qword [esp + 0x10]
fadd qword [0x4bd0c8]
fld st(0)
fsub qword [0x4bcfe0]
fld qword [esp + 0x10]
fsub qword [0x4bd0c0]
fmulp st(1)
fmul st(2)
fmul qword [esp + 0x10]
fld st(1)
fadd st(0), st(0)
fdivp st(1)
fst qword [esp + 0x30]
fld st(2)
fadd st(1)
fstp qword [esp + 0x38]
fstp st(0)
fld st(1)
fdiv st(1)
fsubr qword [esp + 0x38]
fld st(0)
fmulp st(1)
fadd st(3)
fsqrt
fadd qword [0x4bd0b8]
fcom qword [esp + 0x38]
fnstsw ax
test ah, 0x41
je 0x406ff1
fst qword [esp + 0x20]
fxch st(1)
fst qword [esp + 0x38]
fxch st(1)
fld qword [esp + 0x10]
fsub qword [0x4bd0c0]
fild dword [ebp + 0x14]
fst qword [esp + 0x78]
fld st(0)
fmul st(1)
fmul st(2)
fmul st(2)
fld qword [esp + 0x10]
fmul qword [esp + 0x10]
fmul qword [0x4bd0e0]
fdivp st(1)
fld qword [esp + 0x30]
fmul qword [esp + 0x30]
faddp st(1)
fsqrt
fadd qword [0x4bd0b8]
fstp qword [esp + 0x88]
fstp st(0)
fstp st(0)
fcomp qword [0x4bd0d8]
fnstsw ax
test ah, 0x41
jne 0x407121
fld st(1)
fdiv st(1)
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0x40a77000
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0x40440000
fadd qword [0x4bd0b0]
fld qword [0x4bd0d8]
fsub st(3)
faddp st(1)
fstp qword [esp + 0x88]
fld qword [0x4bd0a8]
fsub st(3)
fsqrt
fld st(1)
fsub qword [0x4bcfe0]
fmul st(3)
fdiv st(2)
fsubp st(1)
fstp qword [esp + 0x30]
fstp st(0)
fstp st(0)
fstp st(0)
jmp 0x407127
fstp st(0)
fstp st(0)
fstp st(0)
push 1
push 1
push 0
push 0
call dword [sym.imp.GDI32.dll_CreateRectRgn]
fild dword [ebp + 0x10]
mov edi, eax
mov ebx, dword [ebp + 0xc]
mov eax, esi
fst qword [esp + 0x40]
fadd qword [esp + 0x70]
cdq
sub eax, edx
fst qword [esp + 0x80]
fadd qword [esp + 0x30]
sar eax, 1
add eax, ebx
mov dword [esp + 0xc], eax
fst qword [esp + 0xa8]
fild dword [esp + 0xc]
fstp qword [esp + 0x48]
fld st(0)
fadd qword [esp + 0x20]
call fcn.00496fa4
fld qword [esp + 0x48]
fadd qword [esp + 0x20]
push eax
call fcn.00496fa4
fsub qword [esp + 0x24]
push eax
call fcn.00496fa4
fld qword [esp + 0x50]
fsub qword [esp + 0x28]
push eax
call fcn.00496fa4
push eax
call dword [sym.imp.GDI32.dll_CreateEllipticRgn]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x18]
mov dword [esp + 0x2c], eax
lea esi, [ebx + esi - 1]
lea eax, [ecx + edx - 1]
mov dword [esp + 0x6c], esi
push eax
push esi
mov esi, dword [sym.imp.GDI32.dll_CreateRectRgn]
push ecx
push ebx
mov dword [esp + 0x1c], eax
call esi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x10]
push 1
push 1
push eax
push ebx
call esi
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
push 1
mov esi, eax
push ecx
push edx
push esi
call dword [sym.imp.GDI32.dll_CombineRgn]
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
fld qword [esp + 0x88]
fld qword [esp + 0x80]
fadd st(1)
fadd qword [esp + 0x30]
call fcn.00496fa4
fld qword [esp + 0x48]
fadd st(1)
push eax
call fcn.00496fa4
fld qword [esp + 0xac]
fsub st(1)
push eax
call fcn.00496fa4
fld qword [esp + 0x50]
fsub st(1)
push eax
call fcn.00496fa4
push eax
fstp st(0)
call dword [sym.imp.GDI32.dll_CreateEllipticRgn]
push 4
push eax
push esi
push edi
mov dword [esp + 0x3c], eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push 5
push 0
push edi
push esi
call dword [sym.imp.GDI32.dll_CombineRgn]
fld qword [esp + 0x70]
fdiv qword [esp + 0x38]
mov dword [esp + 0x54], ebx
fadd qword [esp + 0x40]
call fcn.00496fa4
fild dword [ebp + 0xc]
mov dword [esp + 0x20], eax
mov dword [esp + 0x58], eax
fstp qword [esp + 0x40]
fld qword [esp + 0x78]
fdiv qword [esp + 0x10]
fadd qword [esp + 0x40]
call fcn.00496fa4
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x64], ebx
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
push ecx
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], eax
call ebx
push 2
lea edx, [esp + 0x58]
push 3
push edx
call dword [sym.imp.GDI32.dll_CreatePolygonRgn]
push 4
push eax
push esi
push edi
mov dword [esp + 0x2c], eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push 5
push 0
push edi
push esi
call dword [sym.imp.GDI32.dll_CombineRgn]
fld qword [esp + 0x10]
fsub qword [0x4bcfe0]
fmul qword [esp + 0x78]
fdiv qword [esp + 0x10]
fadd qword [esp + 0x40]
call fcn.00496fa4
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x90], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x98], ecx
mov dword [esp + 0xa0], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x94], eax
mov dword [esp + 0x9c], eax
mov eax, dword [esp + 0x20]
push ecx
mov dword [esp + 0xa8], eax
call ebx
push 2
lea edx, [esp + 0x94]
push 3
push edx
call dword [sym.imp.GDI32.dll_CreatePolygonRgn]
mov dword [esp + 0x1c], eax
push 4
push eax
push esi
push edi
call dword [sym.imp.GDI32.dll_CombineRgn]
mov eax, dword [esp + 0x2c]
push eax
call ebx
mov ecx, dword [esp + 0x1c]
push ecx
call ebx
push esi
call ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fstp st(0)
fstp st(0)
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret