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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x74
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
jle 0x1003d63e
mov ebx, dword [ebp + 0x14]
test ebx, ebx
jle 0x1003d63e
mov edx, dword [ebp + 0x18]
test edx, edx
jle 0x1003d63e
mov eax, dword [ebp + 0x1c]
xorps xmm1, xmm1
comisd xmm1, xmmword [eax]
ja 0x1003d63e
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
mov eax, edi
imul eax, ebx
sar ecx, 1
imul eax, edx
cmp ecx, eax
jne 0x1003d632
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
mov eax, ebx
imul eax, edx
cmp ecx, eax
jne 0x1003d632
push 0x100c5c50
mov ecx, 0x100c5c68
call fcn.100475c0
test al, al
je 0x1003cf56
push 0x100c5c44
mov ecx, 0x100c5c68
call fcn.100475c0
test al, al
jne 0x1003d632
mov eax, dword [ebp + 0x28]
mov ecx, 0x100c5c68
push 0x100c5c44
mov byte [esp + 0x30], 0
mov byte [eax], 0
mov eax, dword [ebp + 0x2c]
mov byte [eax], 0
mov eax, dword [ebp + 0x30]
mov byte [eax], 0
call fcn.100475a0
movsd xmm5, qword [0x100af6d0]
xor ah, ah
mov edx, 1
mov cl, al
mov dword [esp + 0x1c], edx
mov byte [esp + 0x1a], ah
movsd qword [esp + 0x60], xmm5
cmp byte [ebp + 0x20], ah
je 0x1003cfd1
mov eax, dword [ebp + 0x24]
test cl, cl
je 0x1003cfcb
movsd xmm1, qword [eax]
movsd xmm0, qword [0x100af6c0]
comisd xmm0, xmm1
ja 0x1003d63e
comisd xmm1, xmmword [0x100af680]
ja 0x1003d63e
movsd xmm0, qword [eax]
jmp 0x1003cfe2
test cl, cl
je 0x1003cfdf
movsd xmm0, qword [0x100af6c0]
jmp 0x1003cfe2
movaps xmm0, xmm5
movsd xmm4, qword [0x100af690]
xor ebx, ebx
cvttsd2si eax, xmm0
xor esi, esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], esi
movsd qword [esp + 0x58], xmm4
mov word [esp + 0x20], ax
test cl, cl
je 0x1003d01b
movsd xmm6, qword [0x100af6a8]
movsd xmm7, qword [0x100af658]
jmp 0x1003d031
movsd xmm6, qword [0x100af6b8]
movsd xmm7, qword [0x100af678]
movsd qword [esp + 0x60], xmm5
mov ecx, edi
movsd qword [esp + 0x68], xmm7
imul ecx, dword [ebp + 0x14]
xor eax, eax
movsd qword [esp + 0x70], xmm6
mov dword [esp + 0x3c], eax
add ecx, ecx
mov dword [esp + 0x54], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x50], ecx
jmp 0x1003d068
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x3c]
mov ecx, dword [ebp + 8]
movsd xmm2, qword [0x100af628]
mov ecx, dword [ecx]
add ecx, eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
cmp byte [esi + eax], 0
je 0x1003d2b7
inc ebx
xor esi, esi
mov dword [esp + 0x24], ebx
mov ebx, ecx
mov ecx, edi
cmp edi, 1
jle 0x1003d1b8
mov dword [esp + 0x40], ecx
jmp 0x1003d0b6
movsd xmm4, qword [esp + 0x58]
movzx edi, word [ebx]
movsx eax, di
movd xmm1, eax
cvtdq2pd xmm1, xmm1
ucomisd xmm1, xmm1
setp al
cmp al, 1
jne 0x1003d0e7
inc esi
mov byte [esp + 0x1a], al
cmp byte [ebp + 0x20], 0
je 0x1003d163
mov eax, dword [esp + 0x20]
mov word [ebx], ax
jmp 0x1003d15f
cmp byte [ebp + 0x20], 0
je 0x1003d0f7
cmp di, word [esp + 0x20]
jne 0x1003d0f7
inc esi
jmp 0x1003d15f
comisd xmm4, xmm1
jbe 0x1003d105
movsd qword [esp + 0x58], xmm1
jmp 0x1003d112
movaps xmm0, xmm1
maxsd xmm0, xmm5
movsd qword [esp + 0x60], xmm0
test dl, dl
je 0x1003d15f
addsd xmm1, xmm2
sub esp, 8
movsd qword [esp + 0x80], xmm1
fld qword [esp + 0x80]
fstp qword [esp]
call fcn.100928a0
mov edx, dword [esp + 0x24]
xor ecx, ecx
fstp qword [esp + 0x80]
cvttsd2si eax, qword [esp + 0x80]
add esp, 8
movzx edx, dl
cmp di, ax
cmovne edx, ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x1c], edx
mov al, byte [esp + 0x1a]
movsd xmm5, qword [esp + 0x60]
add ebx, 2
movsd xmm2, qword [0x100af628]
sub ecx, 1
mov dword [esp + 0x40], ecx
jne 0x1003d0b0
movsd xmm0, qword [esp + 0x58]
movsd qword [esp + 0x58], xmm0
movsd xmm0, qword [esp + 0x68]
movsd qword [esp + 0x68], xmm0
movsd xmm0, qword [esp + 0x70]
mov dword [esp + 0x1c], edx
mov byte [esp + 0x1a], al
movsd qword [esp + 0x60], xmm5
movsd qword [esp + 0x70], xmm0
jmp 0x1003d27e
mov dword [esp + 0x40], edi
nop dword [eax]
movzx edi, word [ebx]
movsx eax, di
movd xmm1, eax
cvtdq2pd xmm1, xmm1
ucomisd xmm1, xmm1
setp al
cmp al, 1
jne 0x1003d1e0
mov byte [esp + 0x1a], al
inc esi
jmp 0x1003d25a
cmp byte [ebp + 0x20], 0
je 0x1003d1f0
cmp di, word [esp + 0x20]
jne 0x1003d1f0
inc esi
jmp 0x1003d25a
comisd xmm4, xmm1
jbe 0x1003d1fe
movsd qword [esp + 0x58], xmm1
jmp 0x1003d20b
movaps xmm0, xmm1
maxsd xmm0, xmm5
movsd qword [esp + 0x60], xmm0
test dl, dl
je 0x1003d25a
addsd xmm1, xmm2
sub esp, 8
movsd qword [esp + 0x80], xmm1
fld qword [esp + 0x80]
fstp qword [esp]
call fcn.100928a0
mov ecx, dword [esp + 0x24]
xor edx, edx
fstp qword [esp + 0x80]
cvttsd2si eax, qword [esp + 0x80]
add esp, 8
movzx ecx, cl
cmp di, ax
cmovne ecx, edx
mov dl, cl
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x1c], edx
movsd xmm4, qword [esp + 0x58]
add ebx, 2
movsd xmm5, qword [esp + 0x60]
sub ecx, 1
movsd xmm2, qword [0x100af628]
mov dword [esp + 0x40], ecx
jne 0x1003d1c0
mov edi, dword [ebp + 0x10]
mov ecx, dword [esp + 0x30]
cmp esi, edi
jne 0x1003d29e
mov eax, dword [ebp + 0xc]
mov esi, dword [esp + 0x28]
mov eax, dword [eax]
mov byte [esi + eax], 0
mov eax, dword [ebp + 0x28]
mov byte [eax], 1
jmp 0x1003d2b7
mov ebx, dword [esp + 0x2c]
test esi, esi
mov esi, dword [esp + 0x28]
mov eax, 1
movzx ebx, bl
cmovg ebx, eax
mov dword [esp + 0x2c], ebx
movsd xmm4, qword [esp + 0x58]
lea ecx, [ecx + edi*2]
movsd xmm2, qword [0x100af628]
inc esi
sub dword [esp + 0x48], 1
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x28], esi
mov dword [esp + 0x30], ecx
jne 0x1003d082
movsd xmm6, qword [esp + 0x70]
mov edx, ebx
mov ebx, dword [esp + 0x1c]
movaps xmm3, xmm6
movsd xmm7, qword [esp + 0x68]
mov al, bl
mov ebx, dword [esp + 0x2c]
movaps xmm2, xmm7
mov edi, dword [esp + 0x54]
mov cl, bl
mov ah, byte [esp + 0x1a]
movaps xmm0, xmm5
add dword [esp + 0x3c], edi
movaps xmm1, xmm4
sub dword [esp + 0x50], 1
mov ch, ah
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x1c], ebx
mov ebx, edx
movsd qword [esp + 0x40], xmm3
movsd qword [esp + 0x78], xmm2
movsd qword [esp + 0x30], xmm0
movsd qword [esp + 0x48], xmm1
mov byte [esp + 0x1b], cl
mov byte [esp + 0x1a], ah
movsd qword [esp + 0x58], xmm4
movsd qword [esp + 0x60], xmm5
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], esi
movsd qword [esp + 0x68], xmm7
movsd qword [esp + 0x70], xmm6
jne 0x1003d060
mov esi, dword [ebp + 0x2c]
xor ebx, ebx
test edx, edx
movzx eax, al
cmovne ebx, eax
mov byte [esi], cl
test ch, ch
je 0x1003d39e
cmp edi, 1
jle 0x1003d39e
test cl, cl
je 0x1003d39e
cmp byte [ebp + 0x20], 0
jne 0x1003d39e
mov eax, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x1c]
mov byte [esp + 0x3c], bl
movsd xmm4, qword [edi]
movsd qword [esp + 0x60], xmm4
test bl, bl
je 0x1003d453
comisd xmm1, xmm3
jb 0x1003d3d3
comisd xmm2, xmm1
jb 0x1003d3d3
comisd xmm0, xmm3
jb 0x1003d3d3
comisd xmm2, xmm0
jb 0x1003d3d3
mov al, 1
jmp 0x1003d3d5
xor al, al
and bl, al
mov byte [esp + 0x3c], bl
test cl, cl
je 0x1003d421
mov esi, dword [esp + 0x20]
push esi
call fcn.10042710
add esp, 4
test al, al
je 0x1003d413
movsx eax, si
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm0, xmmword [esp + 0x40]
jb 0x1003d413
movsd xmm1, qword [esp + 0x78]
comisd xmm1, xmm0
jb 0x1003d413
mov al, 1
jmp 0x1003d415
xor al, al
movsd xmm4, qword [esp + 0x60]
and bl, al
mov byte [esp + 0x3c], bl
test bl, bl
je 0x1003d453
fld qword [edi]
sub esp, 8
fstp qword [esp]
call fcn.100928a0
fstp qword [esp + 0x80]
movsd xmm4, qword [esp + 0x80]
add esp, 8
maxsd xmm4, qword [0x100af628]
movsd qword [esp + 0x60], xmm4
mov eax, dword [ebp + 0x30]
xorps xmm5, xmm5
ucomisd xmm4, xmm5
mov byte [eax], bl
lahf
test ah, 0x44
jnp 0x1003d4f4
cmp byte [ebp + 0x20], 0
je 0x1003d4fd
test bl, bl
je 0x1003d49b
fld qword [esp + 0x60]
sub esp, 8
fstp qword [esp]
call fcn.100928a0
movsd xmm4, qword [esp + 0x68]
add esp, 8
fstp qword [esp + 0x78]
movsd xmm1, qword [esp + 0x78]
jmp 0x1003d4a2
movaps xmm1, xmm4
addsd xmm1, xmm4
mov esi, dword [esp + 0x20]
movsd xmm2, qword [esp + 0x48]
movsx eax, si
movaps xmm0, xmm2
subsd xmm0, xmm1
movd xmm3, eax
cvtdq2pd xmm3, xmm3
comisd xmm3, xmm0
jb 0x1003d507
movsd xmm0, qword [esp + 0x30]
addsd xmm0, xmm1
comisd xmm0, xmm3
jb 0x1003d507
test bl, bl
je 0x1003d4ed
movsd xmm0, qword [0x100af628]
xor eax, eax
movsd qword [edi], xmm0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xorps xmm0, xmm0
movsd qword [edi], xmm0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsd xmm2, qword [esp + 0x48]
mov esi, dword [esp + 0x20]
cmp byte [esp + 0x1b], 0
je 0x1003d5eb
movsd xmm0, qword [esp + 0x40]
movzx eax, si
mov dword [esp + 0x50], eax
lea eax, [esp + 0x50]
push eax
sub esp, 8
movsd qword [esp], xmm0
push dword [esp + 0x48]
sub esp, 0x10
movsd qword [esp + 8], xmm4
movsd qword [esp], xmm2
call fcn.100407f0
add esp, 0x20
test al, al
je 0x1003d60c
mov edx, dword [esp + 0x50]
cmp dx, si
je 0x1003d5eb
mov ecx, dword [ebp + 0x10]
xor eax, eax
mov ebx, dword [ebp + 0x14]
xor edi, edi
imul ecx, ebx
mov dword [esp + 0x40], eax
add ecx, ecx
mov dword [esp + 0x54], ecx
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov dword [esp + 0x48], ebx
mov esi, dword [esi]
add esi, eax
mov dword [esp + 0x50], esi
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
cmp byte [edi + eax], 0
je 0x1003d5b0
mov eax, esi
mov esi, dword [esp + 0x20]
cmp word [eax], si
jne 0x1003d59d
mov word [eax], dx
add eax, 2
sub ecx, 1
jne 0x1003d595
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 0x48]
mov ecx, dword [ebp + 0x10]
inc edi
lea esi, [esi + ecx*2]
sub ebx, 1
mov dword [esp + 0x50], esi
mov dword [esp + 0x48], ebx
jne 0x1003d584
mov eax, dword [esp + 0x40]
add eax, dword [esp + 0x54]
sub dword [ebp + 0x18], 1
mov ebx, dword [ebp + 0x14]
mov dword [esp + 0x40], eax
jne 0x1003d575
mov edi, dword [ebp + 0x1c]
movsx eax, dx
movd xmm0, eax
mov eax, dword [ebp + 0x24]
cvtdq2pd xmm0, xmm0
movsd qword [eax], xmm0
movsd xmm1, qword [esp + 0x60]
movsd xmm0, qword [edi]
ucomisd xmm0, xmm1
lahf
test ah, 0x44
jnp 0x1003d603
movsd qword [edi], xmm1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsx eax, si
movd xmm0, eax
cvtdq2pd xmm0, xmm0
comisd xmm0, xmmword [esp + 0x48]
jb 0x1003d5eb
test bl, bl
je 0x1003d62d
movsd xmm1, qword [0x100af628]
jmp 0x1003d5f1
xorps xmm1, xmm1
jmp 0x1003d5f1
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret