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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xf0
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x20]
mov dword [esp + 0x38], ecx
movupd xmm0, xmmword [eax]
movupd xmm1, xmmword [eax + 0x10]
movupd xmmword [esp + 0x28], xmm1
movupd xmmword [esp + 0x18], xmm0
xorpd xmm0, xmm0
movapd xmmword [esp + 0x60], xmm0
movapd xmmword [esp + 0x50], xmm0
mov ebx, dword [esp + 0x1c]
test ebx, ebx
js 0x51cdf5
mov edi, dword [esp + 0x28]
test edi, edi
js 0x51cdf5
mov esi, dword [esp + 0x34]
test esi, esi
js 0x51cdf5
mov eax, dword [esp + 0x18]
test eax, eax
js 0x51cdf5
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x40], ecx
test ecx, ecx
js 0x51cdf5
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x3c], ecx
test ecx, ecx
js 0x51cdf5
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x4c], ecx
test ecx, ecx
js 0x51cdf5
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x48], ecx
test ecx, ecx
js 0x51cdf5
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x44], ecx
test ecx, ecx
js 0x51cdf5
mov ecx, 0x7fffffff
sub ecx, ebx
cmp ecx, dword [esp + 0x40]
jb 0x51cdf5
lea ecx, [edi + ebx]
mov edx, 0x7fffffff
sub edx, ecx
cmp edx, dword [esp + 0x3c]
mov edx, dword [ebp + 0xc]
jb 0x51cdf5
add ecx, esi
je 0x51cdf5
cmp ecx, 0x186a0
jne 0x51ca16
lea ecx, [esp + 0x50]
lea edx, [esp + 0x18]
call fcn.0051fd40
test eax, eax
jne 0x51c957
mov eax, dword [esp + 0x38]
mov dword [esp + 0xe0], eax
movupd xmm0, xmmword [esp + 0x18]
movupd xmm1, xmmword [esp + 0x28]
movapd xmmword [esp + 0xd0], xmm1
movapd xmmword [esp + 0xc0], xmm0
lea ecx, [esp + 0xc0]
lea edx, [esp + 0x50]
call fcn.0051bd40
cmp eax, 1
mov edx, dword [ebp + 0xc]
je 0x51cdf5
test eax, eax
jne 0x51ce4c
movzx edi, word [edx + 0x4a]
xor esi, esi
test edi, 0x8000
jne 0x51ce0e
mov ebx, dword [ebp + 0x14]
cmp ebx, 1
jg 0x51c9b2
mov eax, edi
and eax, 2
je 0x51c9b2
add edx, 4
mov dword [esp], 0x64
lea ecx, [esp + 0x50]
call fcn.0051d200
test eax, eax
je 0x51ce18
test ebx, ebx
mov edx, dword [ebp + 0xc]
je 0x51ce3a
movaps xmm0, xmmword [esp + 0x50]
movaps xmm1, xmmword [esp + 0x60]
movups xmmword [edx + 0x14], xmm1
movups xmmword [edx + 4], xmm0
movupd xmm0, xmmword [esp + 0x18]
movupd xmm1, xmmword [esp + 0x28]
movupd xmmword [edx + 0x24], xmm0
movupd xmmword [edx + 0x34], xmm1
mov eax, dword [esp + 0x38]
mov dword [edx + 0x44], eax
mov dword [esp], 0x3e8
lea ecx, [esp + 0x50]
mov esi, edx
mov edx, 0x56f134
call fcn.0051d200
mov ecx, edi
and ecx, 0xffffffbd
or ecx, 2
or edi, 0x42
test eax, eax
cmove edi, ecx
mov word [esi + 0x4a], di
mov esi, 2
jmp 0x51ce0e
xor edx, edx
xorps xmm1, xmm1
cvtsi2sd xmm1, ecx
mov ecx, 0
test eax, eax
movsd qword [esp + 0x10], xmm1
je 0x51ca92
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
mov edx, dword [ebp + 0xc]
fstp qword [esp + 0xb8]
movsd xmm0, qword [esp + 0xb8]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si ecx, xmm0
movsd xmm1, qword [esp + 0x10]
xor edx, edx
mov dword [esp + 0x18], ecx
test ebx, ebx
je 0x51cafc
xorps xmm0, xmm0
cvtsi2sd xmm0, ebx
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
mov edx, dword [ebp + 0xc]
fstp qword [esp + 0xb0]
movsd xmm0, qword [esp + 0xb0]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si edx, xmm0
movsd xmm1, qword [esp + 0x10]
mov dword [esp + 0x1c], edx
xor ebx, ebx
mov eax, 0
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x51cb71
xorps xmm0, xmm0
cvtsi2sd xmm0, ecx
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
mov edx, dword [ebp + 0xc]
fstp qword [esp + 0xa8]
movsd xmm0, qword [esp + 0xa8]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si eax, xmm0
movsd xmm1, qword [esp + 0x10]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x40]
test eax, eax
je 0x51cbdf
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
mov edx, dword [ebp + 0xc]
fstp qword [esp + 0xa0]
movsd xmm0, qword [esp + 0xa0]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si ebx, xmm0
movsd xmm1, qword [esp + 0x10]
mov dword [esp + 0x24], ebx
xor ebx, ebx
mov eax, 0
test edi, edi
je 0x51cc50
xorps xmm0, xmm0
cvtsi2sd xmm0, edi
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
mov edx, dword [ebp + 0xc]
fstp qword [esp + 0x98]
movsd xmm0, qword [esp + 0x98]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si eax, xmm0
movsd xmm1, qword [esp + 0x10]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x48]
test eax, eax
je 0x51ccbe
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
mov edx, dword [ebp + 0xc]
fstp qword [esp + 0x90]
movsd xmm0, qword [esp + 0x90]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si ebx, xmm0
movsd xmm1, qword [esp + 0x10]
mov dword [esp + 0x2c], ebx
xor edi, edi
mov eax, 0
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x51cd33
xorps xmm0, xmm0
cvtsi2sd xmm0, ecx
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
mov edx, dword [ebp + 0xc]
fstp qword [esp + 0x88]
movsd xmm0, qword [esp + 0x88]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si eax, xmm0
movsd xmm1, qword [esp + 0x10]
mov dword [esp + 0x30], eax
test esi, esi
je 0x51cd95
xorps xmm0, xmm0
cvtsi2sd xmm0, esi
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
fstp qword [esp + 0x80]
movsd xmm0, qword [esp + 0x80]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
mov edx, dword [ebp + 0xc]
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si edi, xmm0
movsd xmm1, qword [esp + 0x10]
mov dword [esp + 0x34], edi
mov eax, dword [esp + 0x44]
test eax, eax
je 0x51ce41
xorps xmm0, xmm0
cvtsi2sd xmm0, eax
mulsd xmm0, qword [0x56e938]
divsd xmm0, xmm1
addsd xmm0, qword [0x56e940]
movsd qword [esp], xmm0
call fcn.00547f60
fstp qword [esp + 0x78]
movsd xmm0, qword [esp + 0x78]
movsd xmm1, qword [0x56e948]
ucomisd xmm1, xmm0
mov edx, dword [ebp + 0xc]
jb 0x51cdf5
ucomisd xmm0, qword [0x56e950]
jb 0x51cdf5
cvttsd2si eax, xmm0
jmp 0x51ce43
or byte [edx + 0x4b], 0x80
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], str.invalid_end_points
call fcn.00522d10
xor esi, esi
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
or edi, 0x8000
mov eax, dword [ebp + 0xc]
mov word [eax + 0x4a], di
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], str.inconsistent_chromaticities
call fcn.00522d10
jmp 0x51ce0e
mov esi, 1
jmp 0x51ce0e
xor eax, eax
mov dword [esp + 0x38], eax
jmp 0x51c90d
or byte [edx + 0x4b], 0x80
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov dword [esp + 4], str.internal_error_checking_chromaticities
call fcn.00522ad0
nop word cs:[eax + eax]
nop dword [eax]