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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, dword [0x4574d4]
sub esp, 0x70
cmp eax, 3
push ebx
push ebp
push esi
push edi
jge 0x402c90
mov eax, dword [0x45767c]
push str.model_has_less_than_3_nodes
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [0x4574c0]
cmp edi, 1
jge 0x402cb5
mov ecx, dword [0x45767c]
push str.model_has_no_elements
push ecx
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
fld dword [0x4493bc]
mov edx, dword [0x4574d8]
mov ecx, dword [0x4574e4]
fst dword [esp + 0x24]
fst dword [esp + 0x20]
xor ebp, ebp
cmp eax, ebp
fstp dword [esp + 0x1c]
fld dword [0x4493b8]
mov dword [esp + 0x34], edx
fst dword [esp + 0x2c]
fst dword [esp + 0x28]
fstp dword [esp + 0x30]
fld dword [esp + 0x1c]
fld dword [esp + 0x20]
fld dword [esp + 0x24]
fld dword [esp + 0x28]
fld dword [esp + 0x2c]
jle 0x402db0
lea edx, [ecx + 0xc]
mov esi, eax
fld dword [edx - 4]
fcomp st(5)
fnstsw ax
test ah, 0x41
je 0x402d27
fstp st(4)
fld dword [edx - 4]
fstp dword [esp + 0x1c]
fld dword [esp + 0x1c]
fxch st(4)
fld dword [esp + 0x30]
fld dword [edx - 4]
fcompp
fnstsw ax
test ah, 5
jnp 0x402d3e
fld dword [edx - 4]
fstp dword [esp + 0x30]
fld dword [edx]
fcomp st(4)
fnstsw ax
test ah, 0x41
je 0x402d57
fstp st(3)
fld dword [edx]
fstp dword [esp + 0x20]
fld dword [esp + 0x20]
fxch st(3)
fld dword [edx]
fcomp st(2)
fnstsw ax
test ah, 5
jnp 0x402d70
fstp st(1)
fld dword [edx]
fstp dword [esp + 0x28]
fld dword [esp + 0x28]
fxch st(1)
fld dword [edx + 4]
fcomp st(3)
fnstsw ax
test ah, 0x41
je 0x402d8b
fstp st(2)
fld dword [edx + 4]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
fxch st(2)
fld dword [edx + 4]
fcomp st(1)
fnstsw ax
test ah, 5
jnp 0x402da4
fstp st(0)
fld dword [edx + 4]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
add edx, 0x14
sub esi, 1
jne 0x402d0c
fld dword [esp + 0x30]
fcom st(5)
fnstsw ax
test ah, 0x41
jp 0x402de2
mov eax, dword [0x45767c]
fstp st(0)
fstp st(3)
push str.model_is_degenerate_in_x
fstp st(1)
push eax
fstp st(0)
fstp st(0)
fstp st(0)
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
fxch st(2)
fcom st(4)
fnstsw ax
test ah, 0x41
jp 0x402e13
mov ecx, dword [0x45767c]
fstp st(2)
fstp st(3)
push str.model_is_degenerate_in_y
fstp st(1)
push ecx
fstp st(0)
fstp st(0)
fstp st(0)
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
fxch st(1)
fcom st(3)
fnstsw ax
test ah, 0x41
jp 0x402e44
mov edx, dword [0x45767c]
fstp st(2)
fstp st(3)
push str.model_is_degenerate_in_z
fstp st(1)
push edx
fstp st(1)
fstp st(0)
fstp st(0)
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
fld st(5)
faddp st(3)
fld qword [0x4493a0]
fmul st(3), st(0)
fxch st(3)
fstp dword [esp + 0x24]
fld st(1)
fadd st(5)
fmul st(3)
fstp dword [esp + 0x28]
fld st(0)
fadd st(4)
fmulp st(3)
fxch st(2)
fstp dword [esp + 0x2c]
fsubrp st(3)
fsubrp st(1)
fcom st(1)
fnstsw ax
test ah, 5
jp 0x402e7d
fld st(1)
jmp 0x402e7f
fld st(0)
fld dword [esp + 0x30]
fsubrp st(4)
fcomp st(3)
fnstsw ax
test ah, 5
jp 0x402eba
fstp st(1)
fstp st(0)
cmp edi, ebp
fdiv qword [0x4493b0]
mov dword [esp + 0x1c], ebp
fstp dword [esp + 0x30]
jle 0x40325b
fld dword [esp + 0x24]
fld dword [esp + 0x28]
fld dword [esp + 0x2c]
fld dword [esp + 0x30]
jmp 0x402eee
fstp st(2)
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x402e90
fstp st(1)
jmp 0x402e92
fld dword [esp + 0x30]
mov ecx, dword [0x4574e4]
fld dword [esp + 0x2c]
fld dword [esp + 0x28]
fld dword [esp + 0x24]
fxch st(3)
fxch st(1)
fxch st(2)
fxch st(1)
mov eax, dword [0x4574dc]
mov esi, dword [eax + ebp]
lea esi, [esi + esi*4]
add esi, esi
add esi, esi
fld dword [esi + ecx + 8]
mov edi, dword [eax + ebp + 4]
fsub st(4)
mov ebx, dword [eax + ebp + 8]
mov eax, dword [eax + ebp + 0xc]
lea edi, [edi + edi*4]
fdiv st(1)
add edi, edi
add edi, edi
lea ebx, [ebx + ebx*4]
add ebx, ebx
add ebx, ebx
mov dword [esp + 0x20], eax
fstp dword [esp + 0x38]
fld dword [esi + ecx + 0xc]
fsub st(3)
fdiv st(1)
fstp dword [esp + 0x3c]
fld dword [esi + ecx + 0x10]
fsub st(2)
fdiv st(1)
fstp dword [esp + 0x40]
fld dword [edi + ecx + 8]
fsub st(4)
fdiv st(1)
fstp dword [esp + 0x44]
fld dword [edi + ecx + 0xc]
fsub st(3)
fdiv st(1)
fstp dword [esp + 0x48]
fld dword [edi + ecx + 0x10]
fsub st(2)
fdiv st(1)
fstp dword [esp + 0x4c]
fld dword [ebx + ecx + 8]
fsubrp st(4)
fld st(0)
fdivp st(4)
fxch st(3)
fstp dword [esp + 0x50]
fld dword [ebx + ecx + 0xc]
fsubrp st(2)
fld st(2)
fdivp st(2)
fxch st(1)
fstp dword [esp + 0x54]
fsubr dword [ebx + ecx + 0x10]
fdivrp st(1)
fstp dword [esp + 0x58]
fld dword [esp + 0x44]
fld dword [esp + 0x38]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x68]
fld dword [esp + 0x48]
fld dword [esp + 0x3c]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x6c]
fld dword [esp + 0x4c]
fld dword [esp + 0x40]
fld st(0)
fsubp st(2)
fxch st(1)
fstp dword [esp + 0x70]
fld dword [esp + 0x50]
fsubrp st(3)
fxch st(2)
fstp dword [esp + 0x5c]
fsubr dword [esp + 0x54]
fstp dword [esp + 0x60]
fsubr dword [esp + 0x58]
fstp dword [esp + 0x64]
fld dword [esp + 0x64]
cmp dword [0x457490], 0
fld st(0)
fld dword [esp + 0x6c]
fld st(0)
fmulp st(2)
fld dword [esp + 0x60]
fld st(0)
fld dword [esp + 0x70]
fld st(0)
fmulp st(2)
fxch st(4)
fsubrp st(1)
fstp dword [esp + 0x74]
fld dword [esp + 0x5c]
fld st(0)
fmulp st(4)
fld dword [esp + 0x68]
fld st(0)
fmulp st(6)
fxch st(4)
fsubrp st(5)
fxch st(4)
fstp dword [esp + 0x78]
fmulp st(2)
fmulp st(2)
fsubrp st(1)
fstp dword [esp + 0x7c]
je 0x403187
cmp dword [0x44f00c], 0
je 0x403187
test eax, eax
jl 0x403187
mov eax, 0xffffff
cmp dword [section..data], eax
je 0x403070
push 0xff
push 0xff
push 0xff
mov dword [section..data], eax
call dword [sym.imp.OPENGL32.dll_glColor3ub]
push 0xde1
call dword [sym.imp.OPENGL32.dll_glEnable]
mov eax, dword [0x457788]
mov ecx, dword [esp + 0x20]
mov edx, dword [eax + ecx*4]
push edx
push 0xde1
call dword [sym.imp.OPENGL32.dll_glBindTexture]
push 4
call dword [sym.imp.OPENGL32.dll_glBegin]
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.OPENGL32.dll_glNormal3fv]
mov eax, dword [0x4574e4]
fld dword [esi + eax + 4]
sub esp, 0x10
fstp qword [esp + 8]
fld dword [esi + eax]
fstp qword [esp]
call dword [sym.imp.OPENGL32.dll_glTexCoord2d]
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.OPENGL32.dll_glVertex3fv]
mov eax, dword [0x4574e4]
fld dword [edi + eax + 4]
sub esp, 0x10
fstp qword [esp + 8]
fld dword [edi + eax]
fstp qword [esp]
call dword [sym.imp.OPENGL32.dll_glTexCoord2d]
lea edx, [esp + 0x44]
push edx
call dword [sym.imp.OPENGL32.dll_glVertex3fv]
mov eax, dword [0x4574e4]
fld dword [ebx + eax + 4]
sub esp, 0x10
fstp qword [esp + 8]
fld dword [ebx + eax]
fstp qword [esp]
call dword [sym.imp.OPENGL32.dll_glTexCoord2d]
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.OPENGL32.dll_glVertex3fv]
call dword [sym.imp.OPENGL32.dll_glEnd]
cmp dword [0x4574d8], 0
jne 0x403243
mov eax, dword [0x4574e4]
fld dword [ebx + eax + 4]
mov ecx, dword [esp + 0x20]
sub esp, 0x18
fstp dword [esp + 0x14]
fld dword [ebx + eax]
fstp dword [esp + 0x10]
fld dword [edi + eax + 4]
fstp dword [esp + 0xc]
fld dword [edi + eax]
fstp dword [esp + 8]
fld dword [esi + eax + 4]
fstp dword [esp + 4]
fld dword [esi + eax]
fstp dword [esp]
push ecx
call fcn.004029f0
mov edx, dword [0x4574dc]
mov dword [edx + ebp + 0x10], eax
mov eax, dword [0x457490]
add esp, 0x1c
mov dword [esp + 0x34], eax
jmp 0x403243
push 0xde1
call dword [sym.imp.OPENGL32.dll_glDisable]
cmp dword [0x44f00c], 0
mov ecx, dword [0x4574dc]
jne 0x4031ed
mov eax, dword [ecx + ebp + 0x10]
mov edx, eax
shr edx, 0x10
mov ebx, eax
movzx edx, dl
shr ebx, 8
movzx esi, bl
movzx eax, al
add edx, esi
add edx, eax
mov eax, 0xaaaaaaab
mul edx
shr edx, 1
cmp dl, 0x1f
ja 0x4031ed
mov eax, 0xffffff
cmp dword [section..data], eax
je 0x40320f
push 0xff
push 0xff
mov dword [section..data], eax
push 0xff
jmp 0x403209
mov eax, dword [ecx + ebp + 0x10]
cmp eax, dword [section..data]
je 0x40320f
mov ecx, eax
push eax
shr ecx, 8
mov dword [section..data], eax
push ecx
shr eax, 0x10
push eax
call dword [sym.imp.OPENGL32.dll_glColor3ub]
push 4
call dword [sym.imp.OPENGL32.dll_glBegin]
lea edx, [esp + 0x74]
push edx
call dword [sym.imp.OPENGL32.dll_glNormal3fv]
mov esi, dword [sym.imp.OPENGL32.dll_glVertex3fv]
lea eax, [esp + 0x38]
push eax
call esi
lea ecx, [esp + 0x44]
push ecx
call esi
lea edx, [esp + 0x50]
push edx
call esi
call dword [sym.imp.OPENGL32.dll_glEnd]
mov eax, dword [esp + 0x1c]
inc eax
add ebp, 0x14
cmp eax, dword [0x4574c0]
mov dword [esp + 0x1c], eax
jl 0x402ed0
mov eax, dword [esp + 0x34]
pop edi
mov dword [0x4574d8], eax
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret