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

Disassembly:
mov eax, dword [0x197ffa8]
sub esp, 0x6c
test al, 3
je 0x514357
mov eax, dword [0x197ff90]
push eax
push str.Autosprite2_shader__s_had_odd_vertex_count_n
push 2
call dword [0x16d8920]
mov eax, dword [0x197ffa8]
add esp, 0xc
sar eax, 2
lea ecx, [eax + eax*2]
mov eax, dword [0x197ffa4]
shl ecx, 1
cmp eax, ecx
je 0x51437f
mov edx, dword [0x197ff90]
push edx
push str.Autosprite2_shader__s_had_odd_index_count_n
push 2
call dword [0x16d8920]
add esp, 0xc
cmp dword [0x16d8e5c], 0x16c508c
je 0x51439b
lea ecx, [esp + 0x2c]
mov eax, 0x16d8b54
call fcn.00514010
jmp 0x5143b8
mov eax, dword [0x16d8b54]
mov ecx, dword [0x16d8b58]
mov edx, dword [0x16d8b5c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
mov ecx, dword [0x197ffa4]
xor eax, eax
test ecx, ecx
mov dword [esp + 8], eax
jle 0x51499e
push ebx
mov ebx, dword [esp + 0x4c]
push ebp
mov ebp, dword [esp + 0x54]
push esi
push edi
mov edi, dword [esp + 0x54]
jmp 0x5143f0
mov eax, dword [esp + 0x18]
jmp 0x5143f0
movzx esi, word [eax*2 + 0x17a7f60]
movzx eax, word [eax*2 + 0x17a7f62]
mov edx, dword [0x197ff80]
imul eax, edx
imul esi, edx
fld dword [eax*4 + 0x17bff60]
fsub dword [esi*4 + 0x17bff60]
fstp dword [esp + 0x24]
fld dword [eax*4 + 0x17bff64]
fsub dword [esi*4 + 0x17bff64]
fstp dword [esp + 0x28]
fld dword [eax*4 + 0x17bff68]
fsub dword [esi*4 + 0x17bff68]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fmul dword [esp + 0x2c]
fld dword [esp + 0x28]
lea edx, [eax*4 + 0x17bff60]
fmul dword [esp + 0x28]
lea esi, [esi*4 + 0x17bff60]
mov ecx, 0x7f7fffff
mov dword [esp + 0x20], ecx
faddp st(1)
mov dword [esp + 0x1c], ecx
fld dword [esp + 0x24]
mov dword [esp + 0x14], esi
fmul dword [esp + 0x24]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcomp dword [0x569004]
fnstsw ax
test ah, 5
jp 0x5144a8
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov ebp, edi
mov dword [esp + 0x60], ebx
mov edi, esi
mov ebx, edx
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x18]
movzx esi, word [eax*2 + 0x17a7f64]
imul esi, dword [0x197ff80]
fld dword [esi*4 + 0x17bff60]
fsub dword [edx]
fstp dword [esp + 0x24]
fld dword [esi*4 + 0x17bff64]
fsub dword [edx + 4]
lea esi, [esi*4 + 0x17bff60]
fstp dword [esp + 0x28]
fld dword [esi + 8]
fsub dword [edx + 8]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fmul dword [esp + 0x2c]
fld dword [esp + 0x28]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x24]
fmul dword [esp + 0x24]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 5
jp 0x51452e
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov ebp, edi
mov dword [esp + 0x60], ebx
mov edi, edx
mov ebx, esi
mov dword [esp + 0x1c], ecx
jmp 0x51454d
fld dword [esp + 0x10]
fcomp dword [0x569004]
fnstsw ax
test ah, 5
jp 0x51454d
mov ebp, edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x60], esi
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x14]
fld dword [edx]
fsub dword [esi]
fstp dword [esp + 0x24]
fld dword [edx + 4]
fsub dword [esi + 4]
fstp dword [esp + 0x28]
fld dword [edx + 8]
fsub dword [esi + 8]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fmul dword [esp + 0x2c]
fld dword [esp + 0x28]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x24]
fmul dword [esp + 0x24]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 5
jp 0x5145b4
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov ebp, edi
mov dword [esp + 0x60], ebx
mov edi, esi
mov ebx, edx
mov dword [esp + 0x1c], ecx
jmp 0x5145d1
fld dword [esp + 0x10]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 5
jp 0x5145d1
mov eax, dword [esp + 0x10]
mov ebp, esi
mov dword [esp + 0x60], edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
movzx esi, word [eax*2 + 0x17a7f66]
movzx eax, word [eax*2 + 0x17a7f68]
mov edx, dword [0x197ff80]
imul eax, edx
imul esi, edx
fld dword [eax*4 + 0x17bff60]
fsub dword [esi*4 + 0x17bff60]
fstp dword [esp + 0x24]
fld dword [eax*4 + 0x17bff64]
fsub dword [esi*4 + 0x17bff64]
fstp dword [esp + 0x28]
fld dword [eax*4 + 0x17bff68]
fsub dword [esi*4 + 0x17bff68]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fmul dword [esp + 0x2c]
fld dword [esp + 0x28]
lea edx, [eax*4 + 0x17bff60]
fmul dword [esp + 0x28]
lea esi, [esi*4 + 0x17bff60]
mov dword [esp + 0x14], esi
faddp st(1)
fld dword [esp + 0x24]
fmul dword [esp + 0x24]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 5
jp 0x514680
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov ebp, edi
mov dword [esp + 0x60], ebx
mov edi, esi
mov ebx, edx
mov dword [esp + 0x1c], ecx
jmp 0x51469d
fld dword [esp + 0x10]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 5
jp 0x51469d
mov eax, dword [esp + 0x10]
mov ebp, esi
mov dword [esp + 0x60], edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
movzx esi, word [eax*2 + 0x17a7f6a]
imul esi, dword [0x197ff80]
fld dword [esi*4 + 0x17bff60]
fsub dword [edx]
fstp dword [esp + 0x24]
fld dword [esi*4 + 0x17bff64]
fsub dword [edx + 4]
lea esi, [esi*4 + 0x17bff60]
fstp dword [esp + 0x28]
fld dword [esi + 8]
fsub dword [edx + 8]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fmul dword [esp + 0x2c]
fld dword [esp + 0x28]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x24]
fmul dword [esp + 0x24]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 5
jp 0x514723
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov ebp, edi
mov dword [esp + 0x60], ebx
mov edi, edx
mov ebx, esi
mov dword [esp + 0x1c], ecx
jmp 0x514740
fld dword [esp + 0x10]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 5
jp 0x514740
mov ebp, edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x60], esi
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x14]
fld dword [edx]
fsub dword [esi]
fstp dword [esp + 0x24]
fld dword [edx + 4]
fsub dword [esi + 4]
fstp dword [esp + 0x28]
fld dword [edx + 8]
fsub dword [esi + 8]
fstp dword [esp + 0x2c]
fld dword [esp + 0x2c]
fmul dword [esp + 0x2c]
fld dword [esp + 0x28]
fmul dword [esp + 0x28]
faddp st(1)
fld dword [esp + 0x24]
fmul dword [esp + 0x24]
faddp st(1)
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fcomp dword [esp + 0x1c]
fnstsw ax
test ah, 5
jp 0x5147a3
mov eax, dword [esp + 0x10]
mov ebp, edi
mov dword [esp + 0x60], ebx
mov edi, esi
mov ebx, edx
mov dword [esp + 0x1c], eax
jmp 0x5147bc
fld dword [esp + 0x10]
fcomp dword [esp + 0x20]
fnstsw ax
test ah, 5
jp 0x5147c0
mov ecx, dword [esp + 0x10]
mov ebp, esi
mov dword [esp + 0x60], edx
mov dword [esp + 0x20], ecx
fld dword [ebx]
mov eax, dword [esp + 0x60]
fadd dword [edi]
lea esi, [esp + 0x30]
fmul dword [0x568e70]
fstp dword [esp + 0x64]
fld dword [edi + 4]
fadd dword [ebx + 4]
fmul dword [0x568e70]
fstp dword [esp + 0x68]
fld dword [edi + 8]
fadd dword [ebx + 8]
fmul dword [0x568e70]
fstp dword [esp + 0x6c]
fld dword [eax]
fadd dword [ebp]
fmul dword [0x568e70]
fstp dword [esp + 0x70]
fld dword [eax + 4]
fadd dword [ebp + 4]
fmul dword [0x568e70]
fstp dword [esp + 0x74]
fld dword [eax + 8]
fadd dword [ebp + 8]
fmul dword [0x568e70]
fstp dword [esp + 0x78]
fld dword [esp + 0x70]
fsub dword [esp + 0x64]
fstp dword [esp + 0x48]
fld dword [esp + 0x74]
fsub dword [esp + 0x68]
fstp dword [esp + 0x4c]
fld dword [esp + 0x78]
fsub dword [esp + 0x6c]
fstp dword [esp + 0x50]
fld dword [esp + 0x4c]
fmul dword [esp + 0x44]
fld dword [esp + 0x50]
fmul dword [esp + 0x40]
fsubp st(1)
fstp dword [esp + 0x30]
fld dword [esp + 0x50]
fmul dword [esp + 0x3c]
fld dword [esp + 0x48]
fmul dword [esp + 0x44]
fsubp st(1)
fstp dword [esp + 0x34]
fld dword [esp + 0x48]
fmul dword [esp + 0x40]
fld dword [esp + 0x4c]
fmul dword [esp + 0x3c]
fsubp st(1)
fstp dword [esp + 0x38]
call fcn.0042db90
fstp st(0)
fld dword [esp + 0x1c]
call fcn.00538fe0
fmul qword [0x568f38]
fstp dword [esp + 0x10]
fld dword [esp + 0x10]
fchs
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fmul dword [esp + 0x30]
fadd dword [esp + 0x64]
fstp dword [edi]
fld dword [esp + 0x14]
fmul dword [esp + 0x34]
fadd dword [esp + 0x68]
fstp dword [edi + 4]
fld dword [esp + 0x14]
fmul dword [esp + 0x38]
fadd dword [esp + 0x6c]
fstp dword [edi + 8]
fld dword [esp + 0x30]
fmul dword [esp + 0x10]
fadd dword [esp + 0x64]
fstp dword [ebx]
fld dword [esp + 0x34]
fmul dword [esp + 0x10]
fadd dword [esp + 0x68]
fstp dword [ebx + 4]
fld dword [esp + 0x38]
fmul dword [esp + 0x10]
fadd dword [esp + 0x6c]
fstp dword [ebx + 8]
fld dword [esp + 0x20]
call fcn.00538fe0
fmul qword [0x568f38]
fstp dword [esp + 0x10]
mov eax, dword [esp + 0x60]
fld dword [esp + 0x30]
fmul dword [esp + 0x10]
fadd dword [esp + 0x70]
fstp dword [ebp]
fld dword [esp + 0x34]
fmul dword [esp + 0x10]
fadd dword [esp + 0x74]
fstp dword [ebp + 4]
fld dword [esp + 0x38]
fmul dword [esp + 0x10]
fadd dword [esp + 0x78]
fstp dword [ebp + 8]
fld dword [esp + 0x10]
fchs
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fmul dword [esp + 0x30]
fadd dword [esp + 0x70]
fstp dword [eax]
fld dword [esp + 0x14]
fmul dword [esp + 0x34]
fadd dword [esp + 0x74]
fstp dword [eax + 4]
fld dword [esp + 0x14]
fmul dword [esp + 0x38]
fadd dword [esp + 0x78]
fstp dword [eax + 8]
mov eax, dword [esp + 0x18]
mov ecx, dword [0x197ffa4]
add eax, 6
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x5143de
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret