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

Disassembly:
sub esp, 0x88
push ebx
mov ebx, dword [esp + 0x94]
lea eax, [ebx - 3]
cmp eax, 5
setbe al
push esi
mov esi, ecx
push str.3___count__count___b2_maxPolygonVertices
mov dword [esp + 0x30], esi
push eax
call dword [0x7dca44]
add esp, 8
cmp ebx, 3
jge 0x66d490
fld1
sub esp, 8
fst dword [esp + 4]
mov ecx, esi
fstp dword [esp]
call fcn.0066bfb0
pop esi
pop ebx
add esp, 0x88
ret 8
cmp ebx, 8
jge 0x66d49d
mov ecx, ebx
mov dword [esp + 0x28], ebx
jmp 0x66d4a6
mov ecx, 8
mov dword [esp + 0x28], ecx
push ebp
push edi
test ecx, ecx
jle 0x66d4c1
mov esi, dword [esp + 0x9c]
and ecx, 0x1fffffff
add ecx, ecx
lea edi, [esp + 0x38]
rep movsd dword es:[edi], dword [esi]
fld dword [esp + 0x38]
xor esi, esi
lea edi, [esi + 1]
fstp dword [esp + 0x10]
cmp ebx, edi
mov dword [esp + 0x2c], esi
jle 0x66d6c7
fld dword [esp + 0x10]
lea eax, [ebx - 1]
cmp eax, 4
jl 0x66d662
lea ecx, [esp + 0x44]
mov eax, 0x18
sub eax, ecx
mov dword [esp + 0x14], eax
mov ebp, 0x10
mov eax, 0x20
xor edx, edx
sub ebp, ecx
sub eax, ecx
lea ebx, [esi + 8]
lea esi, [edi + 2]
mov dword [esp + 0x28], eax
fld dword [esp + ebx + 0x38]
lea ecx, [esp + ebx + 0x3c]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(1)
fnstsw ax
test ah, 0x41
je 0x66d548
fld st(0)
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d55a
fld dword [ecx]
fld dword [esp + edx + 0x3c]
fcompp
fnstsw ax
test ah, 0x41
jne 0x66d55a
fstp st(1)
mov dword [esp + 0x2c], edi
fstp dword [esp + 0x10]
mov edx, ebx
fld dword [esp + 0x10]
jmp 0x66d55c
fstp st(0)
fld dword [ecx + 4]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(1)
fnstsw ax
test ah, 0x41
je 0x66d58d
fld st(0)
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d5a3
fld dword [ecx + 8]
fld dword [esp + edx + 0x3c]
fcompp
fnstsw ax
test ah, 0x41
jne 0x66d5a3
fstp st(1)
lea edx, [esi - 1]
fstp dword [esp + 0x10]
mov dword [esp + 0x2c], edx
fld dword [esp + 0x10]
lea edx, [ecx + ebp]
jmp 0x66d5a5
fstp st(0)
fld dword [ecx + 0xc]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(1)
fnstsw ax
test ah, 0x41
je 0x66d5d6
fld st(0)
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d5ed
fld dword [ecx + 0x10]
fld dword [esp + edx + 0x3c]
fcompp
fnstsw ax
test ah, 0x41
jne 0x66d5ed
mov eax, dword [esp + 0x14]
fstp st(1)
fstp dword [esp + 0x10]
mov dword [esp + 0x2c], esi
fld dword [esp + 0x10]
lea edx, [eax + ecx]
jmp 0x66d5ef
fstp st(0)
fld dword [ecx + 0x14]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(1)
fnstsw ax
test ah, 0x41
je 0x66d620
fld st(0)
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d63a
fld dword [ecx + 0x18]
fld dword [esp + edx + 0x3c]
fcompp
fnstsw ax
test ah, 0x41
jne 0x66d63a
mov eax, dword [esp + 0x28]
fstp st(1)
lea edx, [esi + 1]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
mov dword [esp + 0x2c], edx
lea edx, [eax + ecx]
jmp 0x66d63c
fstp st(0)
mov eax, dword [esp + 0xa0]
add edi, 4
add eax, 0xfffffffd
add esi, 4
add ebx, 0x20
cmp edi, eax
jl 0x66d513
mov ebx, dword [esp + 0xa0]
mov esi, dword [esp + 0x2c]
cmp edi, ebx
jge 0x66d6c5
lea edx, [esi*8]
lea ecx, [edi*8]
fld dword [esp + ecx + 0x38]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(1)
fnstsw ax
test ah, 0x41
je 0x66d6a7
fld st(0)
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d6b7
fld dword [esp + ecx + 0x3c]
fld dword [esp + edx + 0x3c]
fcompp
fnstsw ax
test ah, 0x41
jne 0x66d6b7
fstp st(1)
mov esi, edi
fstp dword [esp + 0x10]
mov edx, ecx
fld dword [esp + 0x10]
jmp 0x66d6b9
fstp st(0)
inc edi
add ecx, 8
cmp edi, ebx
jl 0x66d674
mov dword [esp + 0x2c], esi
fstp st(0)
fldz
lea ecx, [esp + 0x78]
mov dword [esp + 0x28], 0
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x14]
mov ebx, 1
xor ecx, ecx
cmp dword [esp + 0x30], ebx
mov dword [edx], esi
jle 0x66daef
mov eax, dword [esp + 0x30]
dec eax
cmp eax, 4
jl 0x66da10
lea edx, [ecx + 8]
lea edi, [ecx + 3]
lea ebp, [ecx + 0x10]
cmp ecx, esi
jne 0x66d712
mov ecx, ebx
jmp 0x66d7c1
fld dword [esp + ecx*8 + 0x38]
fsub dword [esp + esi*8 + 0x38]
fstp dword [esp + 0x20]
fld dword [esp + ecx*8 + 0x3c]
fsub dword [esp + esi*8 + 0x3c]
fstp dword [esp + 0x24]
fld dword [esp + edx + 0x38]
fsub dword [esp + esi*8 + 0x38]
fstp dword [esp + 0x18]
fld dword [esp + edx + 0x3c]
fsub dword [esp + esi*8 + 0x3c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fmulp st(2)
fld dword [esp + 0x24]
fld st(0)
fld dword [esp + 0x18]
fld st(0)
fmulp st(2)
fxch st(4)
fsubrp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(5)
fnstsw ax
test ah, 5
jp 0x66d775
mov ecx, ebx
fld st(5)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d7b9
fld st(2)
fmulp st(3)
fld st(3)
fmulp st(4)
fxch st(2)
faddp st(3)
fxch st(2)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fld st(1)
fmulp st(2)
fld st(2)
fmulp st(3)
fxch st(1)
faddp st(2)
fxch st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 5
jp 0x66d7c1
mov ecx, ebx
jmp 0x66d7c1
fstp st(3)
fstp st(1)
fstp st(1)
fstp st(0)
cmp ecx, esi
jne 0x66d7cd
lea ecx, [edi - 1]
jmp 0x66d87e
fld dword [esp + ecx*8 + 0x38]
fsub dword [esp + esi*8 + 0x38]
fstp dword [esp + 0x20]
fld dword [esp + ecx*8 + 0x3c]
fsub dword [esp + esi*8 + 0x3c]
fstp dword [esp + 0x24]
fld dword [esp + edx + 0x40]
fsub dword [esp + esi*8 + 0x38]
fstp dword [esp + 0x18]
fld dword [esp + edx + 0x44]
fsub dword [esp + esi*8 + 0x3c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fmulp st(2)
fld dword [esp + 0x24]
fld st(0)
fld dword [esp + 0x18]
fld st(0)
fmulp st(2)
fxch st(4)
fsubrp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(5)
fnstsw ax
test ah, 5
jp 0x66d831
lea ecx, [edi - 1]
fld st(5)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d876
fld st(2)
fmulp st(3)
fld st(3)
fmulp st(4)
fxch st(2)
faddp st(3)
fxch st(2)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fld st(1)
fmulp st(2)
fld st(2)
fmulp st(3)
fxch st(1)
faddp st(2)
fxch st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 5
jp 0x66d87e
lea ecx, [edi - 1]
jmp 0x66d87e
fstp st(3)
fstp st(1)
fstp st(1)
fstp st(0)
cmp ecx, esi
jne 0x66d889
mov ecx, edi
jmp 0x66d938
fld dword [esp + ecx*8 + 0x38]
fsub dword [esp + esi*8 + 0x38]
fstp dword [esp + 0x20]
fld dword [esp + ecx*8 + 0x3c]
fsub dword [esp + esi*8 + 0x3c]
fstp dword [esp + 0x24]
fld dword [esp + edx + 0x48]
fsub dword [esp + esi*8 + 0x38]
fstp dword [esp + 0x18]
fld dword [esp + edx + 0x4c]
fsub dword [esp + esi*8 + 0x3c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fmulp st(2)
fld dword [esp + 0x24]
fld st(0)
fld dword [esp + 0x18]
fld st(0)
fmulp st(2)
fxch st(4)
fsubrp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(5)
fnstsw ax
test ah, 5
jp 0x66d8ec
mov ecx, edi
fld st(5)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d930
fld st(2)
fmulp st(3)
fld st(3)
fmulp st(4)
fxch st(2)
faddp st(3)
fxch st(2)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fld st(1)
fmulp st(2)
fld st(2)
fmulp st(3)
fxch st(1)
faddp st(2)
fxch st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 5
jp 0x66d938
mov ecx, edi
jmp 0x66d938
fstp st(3)
fstp st(1)
fstp st(1)
fstp st(0)
cmp ecx, esi
jne 0x66d944
lea ecx, [edi + 1]
jmp 0x66d9f5
fld dword [esp + ecx*8 + 0x38]
fsub dword [esp + esi*8 + 0x38]
fstp dword [esp + 0x20]
fld dword [esp + ecx*8 + 0x3c]
fsub dword [esp + esi*8 + 0x3c]
fstp dword [esp + 0x24]
fld dword [esp + edx + 0x50]
fsub dword [esp + esi*8 + 0x38]
fstp dword [esp + 0x18]
fld dword [esp + edx + 0x54]
fsub dword [esp + esi*8 + 0x3c]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fmulp st(2)
fld dword [esp + 0x24]
fld st(0)
fld dword [esp + 0x18]
fld st(0)
fmulp st(2)
fxch st(4)
fsubrp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(5)
fnstsw ax
test ah, 5
jp 0x66d9a8
lea ecx, [edi + 1]
fld st(5)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66d9ed
fld st(2)
fmulp st(3)
fld st(3)
fmulp st(4)
fxch st(2)
faddp st(3)
fxch st(2)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fld st(1)
fmulp st(2)
fld st(2)
fmulp st(3)
fxch st(1)
faddp st(2)
fxch st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 5
jp 0x66d9f5
lea ecx, [edi + 1]
jmp 0x66d9f5
fstp st(3)
fstp st(1)
fstp st(1)
fstp st(0)
mov eax, dword [esp + 0x30]
add ebx, 4
add eax, 0xfffffffd
add edi, 4
add edx, 0x20
add ebp, 0x20
cmp ebx, eax
jl 0x66d707
cmp ebx, dword [esp + 0x30]
jge 0x66daef
lea edx, [ebx*8]
cmp ecx, esi
jne 0x66da2c
mov ecx, ebx
jmp 0x66dae1
mov eax, dword [esp + 0x14]
fld dword [esp + ecx*8 + 0x38]
mov eax, dword [eax]
fsub dword [esp + eax*8 + 0x38]
lea eax, [esp + eax*8 + 0x38]
fstp dword [esp + 0x20]
fld dword [esp + ecx*8 + 0x3c]
fsub dword [eax + 4]
fstp dword [esp + 0x24]
fld dword [esp + edx + 0x38]
fsub dword [eax]
fstp dword [esp + 0x18]
fld dword [esp + edx + 0x3c]
fsub dword [eax + 4]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld st(0)
fld dword [esp + 0x20]
fld st(0)
fmulp st(2)
fld dword [esp + 0x24]
fld st(0)
fld dword [esp + 0x18]
fld st(0)
fmulp st(2)
fxch st(4)
fsubrp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcom st(5)
fnstsw ax
test ah, 5
jp 0x66da95
mov ecx, ebx
fld st(5)
fucompp
fnstsw ax
test ah, 0x44
jp 0x66dad9
fld st(2)
fmulp st(3)
fld st(3)
fmulp st(4)
fxch st(2)
faddp st(3)
fxch st(2)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fld st(1)
fmulp st(2)
fld st(2)
fmulp st(3)
fxch st(1)
faddp st(2)
fxch st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcompp
fnstsw ax
test ah, 5
jp 0x66dae1
mov ecx, ebx
jmp 0x66dae1
fstp st(3)
fstp st(1)
fstp st(1)
fstp st(0)
inc ebx
add edx, 8
cmp ebx, dword [esp + 0x30]
jl 0x66da21
inc dword [esp + 0x28]
add dword [esp + 0x14], 4
mov esi, ecx
cmp ecx, dword [esp + 0x2c]
jne 0x66d6d9
mov esi, dword [esp + 0x28]
fstp st(0)
mov ecx, dword [esp + 0x34]
xor eax, eax
mov dword [ecx + 0x94], esi
test esi, esi
jle 0x66dc39
add ecx, 0x14
mov edx, dword [esp + eax*4 + 0x78]
mov edi, dword [esp + edx*8 + 0x38]
mov edx, dword [esp + edx*8 + 0x3c]
mov dword [ecx], edi
mov dword [ecx + 4], edx
inc eax
add ecx, 8
cmp eax, esi
jl 0x66db21
test esi, esi
jle 0x66dc39
mov esi, dword [esp + 0x34]
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x34]
mov edi, 1
add esi, 0x58
xor eax, eax
cmp edi, dword [esp + 0x28]
setge al
dec eax
and eax, edi
fld dword [ebp + eax*8 + 0x14]
fsub dword [esi - 0x44]
fstp dword [esp + 0x18]
fld dword [ebp + eax*8 + 0x18]
fsub dword [esi - 0x40]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fld dword [esp + 0x18]
fmul st(0), st(0)
fld st(1)
fmulp st(2)
faddp st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fcomp dword [0x798420]
fnstsw ax
test ah, 0x41
jne 0x66dba1
mov al, 1
jmp 0x66dba3
xor al, al
push str.edge.LengthSquared_____b2_epsilon__b2_epsilon
push eax
call dword [0x7dca44]
fld dword [esp + 0x24]
fstp dword [esp + 0x28]
mov eax, dword [esp + 0x28]
fld dword [esp + 0x20]
mov dword [esi - 4], eax
fmul qword [0x6d89a0]
add esp, 8
fstp dword [esp + 0x24]
mov ecx, dword [esp + 0x24]
mov dword [esi], ecx
fld dword [esi]
fld dword [esi - 4]
fmul st(0), st(0)
fld st(1)
fmulp st(2)
faddp st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
call fcn.00695070
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fstp dword [esp + 0x14]
fld dword [0x7982a4]
fld dword [esp + 0x14]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jnp 0x66dc2a
fld1
fdivrp st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fld st(0)
fmul dword [esi - 4]
fstp dword [esi - 4]
fmul dword [esi]
fstp dword [esi]
jmp 0x66dc2c
fstp st(0)
inc edi
add esi, 8
sub ebx, 1
jne 0x66db56
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 0x28]
lea edx, [ebx + 0x14]
push edx
lea esi, [esp + 0x1c]
call fcn.0066c1a0
mov ecx, dword [eax]
add esp, 4
pop edi
mov dword [ebx + 0xc], ecx
mov edx, dword [eax + 4]
pop ebp
pop esi
mov dword [ebx + 0x10], edx
pop ebx
add esp, 0x88
ret 8