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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa8
mov eax, dword [0x12ff7a0]
push ebx
push ebp
push esi
test eax, eax
push edi
je 0x4ae93c
mov ecx, dword [eax + 0xec]
test ecx, ecx
je 0x4ae93c
mov ecx, dword [eax + 0xe8]
test ecx, ecx
je 0x4ae93c
push str.showgrid
call fcn.004a1cd0
mov ebp, eax
push ebp
call fcn.004a1eb0
mov ecx, dword [0x12ff7a0]
add esp, 8
xor esi, esi
fld dword [esi + 0x1300170]
fsub dword [0x532200]
sub esp, 8
lea edi, [esi + ecx + 0xb8]
fsub dword [esi + ecx + 0xb8]
fmul dword [esi + ecx + 0xd0]
fstp qword [esp]
call fcn.00516e53
mov eax, dword [0x12ff7a0]
fmul dword [esi + eax + 0xc4]
fadd dword [edi]
fstp dword [esp + esi + 0x44]
fld dword [esi + 0x1300170]
fadd dword [0x532200]
fsub dword [edi]
fmul dword [esi + eax + 0xd0]
fstp qword [esp]
call fcn.00516e53
mov ecx, dword [0x12ff7a0]
add esi, 4
add esp, 8
cmp esi, 0xc
fmul dword [esi + ecx + 0xc0]
fadd dword [esi + ecx + 0xb4]
fstp dword [esp + esi + 0x2c]
jl 0x4ae536
fld dword [esp + 0x44]
fcomp dword [esp + 0x38]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x1c], eax
fnstsw ax
test ah, 5
jp 0x4ae93c
fld dword [esp + 0x40]
fcomp dword [esp + 0x34]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x18], edx
fnstsw ax
test ah, 5
jp 0x4ae91f
fld dword [esp + 0x3c]
fcomp dword [esp + 0x30]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x14], eax
fnstsw ax
test ah, 5
jp 0x4ae902
lea ecx, [esp + 0x24]
mov dword [esp + 0x48], ecx
fld dword [esp + 0x14]
fsub dword [0x1300170]
fstp dword [esp + 0x24]
fld dword [esp + 0x18]
fsub dword [0x1300174]
fstp dword [esp + 0x28]
fld dword [esp + 0x1c]
fsub dword [0x1300178]
fstp dword [esp + 0x2c]
push esi
mov esi, dword [esp + 0x4c]
fld dword [esi]
fld dword [esi + 4]
fxch st(1)
fmul dword [esi]
fxch st(1)
fld dword [esi + 8]
fxch st(1)
fmul dword [esi + 4]
fxch st(1)
fmul dword [esi + 8]
fxch st(2)
faddp st(1)
faddp st(1)
fsqrt
fld1
fdivrp st(1)
fld st(0)
fxch st(1)
fld st(0)
fxch st(1)
fmul dword [esi]
fxch st(1)
fmul dword [esi + 4]
fxch st(2)
fmul dword [esi + 8]
fxch st(1)
fstp dword [esi]
fstp dword [esi + 8]
fstp dword [esi + 4]
pop esi
fld dword [0x1300184]
fmul dword [esp + 0x2c]
fld dword [0x1300180]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [0x130017c]
fmul dword [esp + 0x24]
faddp st(1)
fcomp qword [0x531a78]
fnstsw ax
test ah, 5
jnp 0x4ae8df
lea edx, [esp + 0x4c]
lea eax, [esp + 0x14]
push edx
push eax
call fcn.004bb110
fld dword [esp + 0x1c]
fsub dword [0x5315ec]
mov ecx, dword [esp + 0x24]
add esp, 8
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
fst dword [esp + 0x58]
fld dword [esp + 0x18]
fsub dword [0x5315ec]
fst dword [esp + 0x5c]
fld dword [esp + 0x4c]
call fcn.00516e2c
fld dword [esp + 0x50]
mov bl, al
mov byte [esp + 0x6c], bl
call fcn.00516e2c
fld dword [esp + 0x54]
mov byte [esp + 0x23], al
mov byte [esp + 0x6d], al
call fcn.00516e2c
fld dword [esp + 0x14]
fadd dword [0x5315ec]
mov edx, dword [esp + 0x1c]
mov cl, byte [esp + 0x23]
mov byte [esp + 0x6e], al
mov byte [esp + 0x86], al
mov byte [esp + 0x9e], al
mov byte [esp + 0xb6], al
fst dword [esp + 0x70]
fxch st(1)
fstp dword [esp + 0x74]
mov eax, dword [0x12ff780]
mov byte [esp + 0x6f], 0xff
fstp dword [esp + 0x88]
fld dword [esp + 0x18]
fadd dword [0x5315ec]
test eax, eax
mov dword [esp + 0x78], edx
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0x3f800000
mov byte [esp + 0x84], bl
fst dword [esp + 0x8c]
fxch st(1)
fstp dword [esp + 0xa0]
mov byte [esp + 0x85], cl
mov byte [esp + 0x87], 0xff
fstp dword [esp + 0xa4]
mov dword [esp + 0x90], edx
mov dword [esp + 0x94], 0x3f800000
mov dword [esp + 0x98], 0x3f800000
mov byte [esp + 0x9c], bl
mov byte [esp + 0x9d], cl
mov byte [esp + 0x9f], 0xff
mov dword [esp + 0xa8], edx
mov dword [esp + 0xac], 0x3f800000
mov dword [esp + 0xb0], 0
mov byte [esp + 0xb4], bl
mov byte [esp + 0xb5], cl
mov byte [esp + 0xb7], 0xff
je 0x4ae8df
mov eax, dword [0x12ff364]
mov ecx, dword [0x13d3650]
add eax, 4
cmp eax, ecx
jg 0x4ae8cf
mov eax, dword [0x12ff35c]
mov ecx, dword [0x13d0cac]
cmp eax, ecx
jge 0x4ae8cf
mov ecx, dword [0x12ff794]
lea eax, [eax + eax*4]
mov esi, 4
push 0x60
mov edx, dword [ecx*4 + 0x136bbe8]
mov ecx, dword [edx + 0x12f3c8]
mov dword [ecx + eax*4], 3
mov dword [ecx + eax*4 + 4], ebp
mov dword [ecx + eax*4 + 8], esi
mov edx, dword [0x12ff794]
lea eax, [ecx + eax*4]
mov ecx, dword [0x12ff364]
mov edx, dword [edx*4 + 0x136bbe8]
lea ecx, [ecx + ecx*2]
mov edx, dword [edx + 0x12f3cc]
mov dword [eax + 0x10], 0
lea ecx, [edx + ecx*8]
lea edx, [esp + 0x5c]
mov dword [eax + 0xc], ecx
mov eax, ecx
push edx
push eax
call fcn.0044c6a0
mov ecx, dword [0x12ff35c]
mov eax, dword [0x12ff364]
add esp, 0xc
inc ecx
add eax, esi
mov dword [0x12ff35c], ecx
mov dword [0x12ff364], eax
jmp 0x4ae8df
push str.Exceeded_MAX_POLYS_n
push 3
call dword [0x12ff6a0]
add esp, 8
mov ecx, dword [0x12ff7a0]
fld dword [esp + 0x14]
fadd dword [ecx + 0xc4]
fst dword [esp + 0x14]
fcomp dword [esp + 0x30]
fnstsw ax
test ah, 5
jnp 0x4ae60d
fld dword [esp + 0x18]
fadd dword [ecx + 0xc8]
fst dword [esp + 0x18]
fcomp dword [esp + 0x34]
fnstsw ax
test ah, 5
jnp 0x4ae5ea
fld dword [esp + 0x1c]
fadd dword [ecx + 0xcc]
fst dword [esp + 0x1c]
fcomp dword [esp + 0x38]
fnstsw ax
test ah, 5
jnp 0x4ae5cf
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret