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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x98
mov eax, dword [0x160cd60]
push ebx
push ebp
push esi
test eax, eax
push edi
je 0x4c67de
mov ecx, dword [eax + 0xec]
test ecx, ecx
je 0x4c67de
mov ecx, dword [eax + 0xe8]
test ecx, ecx
je 0x4c67de
push str.showgrid
call fcn.004beae0
mov ebp, eax
push ebp
call fcn.004becc0
add esp, 8
xor esi, esi
fld dword [esi + 0x160d734]
fsub dword [0x54ef00]
mov eax, dword [0x160cd60]
sub esp, 8
fsub dword [esi + eax + 0xb8]
lea edi, [esi + eax + 0xb8]
fmul dword [esi + eax + 0xd0]
fstp qword [esp]
call fcn.00532e83
mov eax, dword [0x160cd60]
fmul dword [esi + eax + 0xc4]
fadd dword [edi]
fstp dword [esp + esi + 0x28]
fld dword [esi + 0x160d734]
fadd dword [0x54ef00]
fsub dword [edi]
fmul dword [esi + eax + 0xd0]
fstp qword [esp]
call fcn.00532e83
mov ecx, dword [0x160cd60]
add esi, 4
add esp, 8
cmp esi, 0xc
fmul dword [esi + ecx + 0xc0]
fadd dword [esi + ecx + 0xb4]
fstp dword [esp + esi + 0x28]
jl 0x4c6410
fld dword [esp + 0x28]
fcomp dword [esp + 0x34]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
fnstsw ax
test ah, 5
jp 0x4c67de
fld dword [esp + 0x24]
fcomp dword [esp + 0x30]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x18], edx
fnstsw ax
test ah, 5
jp 0x4c67c1
fld dword [esp + 0x20]
fcomp dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], eax
fnstsw ax
test ah, 5
jp 0x4c67a4
fld dword [esp + 0x14]
fsub dword [0x160d734]
fld dword [esp + 0x18]
fsub dword [0x160d738]
fld dword [esp + 0x1c]
fsub dword [0x160d73c]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld st(3)
fmul st(4)
faddp st(1)
fcom dword [0x54eee0]
fnstsw ax
and eax, 0x4100
jne 0x4c6539
fsqrt
fdivr dword [0x54e504]
fld st(0)
fmulp st(4)
fld st(0)
fmulp st(3)
fmulp st(1)
jmp 0x4c653b
fstp st(0)
fld dword [0x160d748]
fmul st(1)
fld dword [0x160d744]
fmul st(3)
faddp st(1)
fld dword [0x160d740]
fmul st(4)
faddp st(1)
fcomp qword [0x54ed38]
fstp st(0)
fnstsw ax
fstp st(0)
test ah, 5
fstp st(0)
jnp 0x4c6781
lea ecx, [esp + 0x9c]
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.004d33a0
fld dword [esp + 0x1c]
fsub dword [0x54e61c]
mov eax, dword [esp + 0x24]
add esp, 8
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
fst dword [esp + 0x38]
fld dword [esp + 0x18]
fsub dword [0x54e61c]
fst dword [esp + 0x3c]
fld dword [esp + 0x9c]
call fcn.00532e5c
fld dword [esp + 0xa0]
mov bl, al
mov byte [esp + 0x4c], bl
call fcn.00532e5c
fld dword [esp + 0xa4]
mov byte [esp + 0x13], al
mov byte [esp + 0x4d], al
call fcn.00532e5c
fld dword [esp + 0x14]
fadd dword [0x54e61c]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x1c]
mov byte [esp + 0x4e], al
mov byte [esp + 0x66], al
mov byte [esp + 0x7e], al
mov byte [esp + 0x96], al
fst dword [esp + 0x50]
fxch st(1)
fstp dword [esp + 0x54]
mov eax, dword [0x160cd40]
mov dword [esp + 0x58], ecx
fstp dword [esp + 0x68]
fld dword [esp + 0x18]
fadd dword [0x54e61c]
mov cl, byte [esp + 0x13]
mov byte [esp + 0x4f], 0xff
test eax, eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0x3f800000
fst dword [esp + 0x6c]
fxch st(1)
fstp dword [esp + 0x80]
mov byte [esp + 0x64], bl
mov byte [esp + 0x65], cl
fstp dword [esp + 0x84]
mov byte [esp + 0x67], 0xff
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], 0x3f800000
mov dword [esp + 0x78], 0x3f800000
mov byte [esp + 0x7c], bl
mov byte [esp + 0x7d], cl
mov byte [esp + 0x7f], 0xff
mov dword [esp + 0x88], edx
mov dword [esp + 0x8c], 0x3f800000
mov dword [esp + 0x90], 0
mov byte [esp + 0x94], bl
mov byte [esp + 0x95], cl
mov byte [esp + 0x97], 0xff
je 0x4c6781
mov eax, dword [0x160c924]
mov ecx, dword [0x16e0c48]
add eax, 4
cmp eax, ecx
jg 0x4c6771
mov eax, dword [0x160c91c]
mov ecx, dword [0x16dd290]
cmp eax, ecx
jge 0x4c6771
mov ecx, dword [0x160cd54]
lea eax, [eax + eax*4]
mov esi, 4
push 0x60
mov edx, dword [ecx*4 + 0x16781b0]
mov ecx, dword [edx + 0x12e3cc]
mov dword [ecx + eax*4], 3
mov dword [ecx + eax*4 + 4], ebp
mov dword [ecx + eax*4 + 8], esi
mov edx, dword [0x160cd54]
lea eax, [ecx + eax*4]
mov ecx, dword [0x160c924]
mov edx, dword [edx*4 + 0x16781b0]
lea ecx, [ecx + ecx*2]
mov edx, dword [edx + 0x12e3d0]
mov dword [eax + 0x10], 0
lea ecx, [edx + ecx*8]
lea edx, [esp + 0x3c]
mov dword [eax + 0xc], ecx
mov eax, ecx
push edx
push eax
call fcn.0045d2d0
mov ecx, dword [0x160c91c]
mov eax, dword [0x160c924]
add esp, 0xc
inc ecx
add eax, esi
mov dword [0x160c91c], ecx
mov dword [0x160c924], eax
jmp 0x4c6781
push str.Exceeded_MAX_POLYS_n
push 3
call dword [0x160cc60]
add esp, 8
mov ecx, dword [0x160cd60]
fld dword [esp + 0x14]
fadd dword [ecx + 0xc4]
fst dword [esp + 0x14]
fcomp dword [esp + 0x2c]
fnstsw ax
test ah, 5
jnp 0x4c64e8
fld dword [esp + 0x18]
fadd dword [ecx + 0xc8]
fst dword [esp + 0x18]
fcomp dword [esp + 0x30]
fnstsw ax
test ah, 5
jnp 0x4c64cd
fld dword [esp + 0x1c]
fadd dword [ecx + 0xcc]
fst dword [esp + 0x1c]
fcomp dword [esp + 0x34]
fnstsw ax
test ah, 5
jnp 0x4c64b2
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret