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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, dword [ebp + 0xc]
sub esp, 0x74
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
movzx esi, al
push edi
mov edi, ecx
mov dword [edi + 0x78], 0
mov dword [edi], eax
mov dword [edi + 0x80], 0
mov dword [edi + 4], esi
movzx eax, byte [ebx + 0x10]
mov dword [edi + 8], eax
mov eax, dword [ebx + 0x14]
shl eax, 8
add eax, dword [ebx + 0x10]
and eax, 0x200
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0x1c]
mov dword [edi + 0x48], eax
mov eax, dword [ebp + 8]
mov dword [edi + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x14], eax
mov eax, dword [ebp + 0x14]
mov dword [edi + 0x18], eax
mov eax, dword [ebp + 0x18]
mov dword [edi + 0x60], 0
mov dword [edi + 0x64], 0
mov dword [edi + 0x30], 0
movups xmm0, xmmword [eax]
movups xmmword [edi + 0x1c], xmm0
mov ecx, dword [eax + 8]
sub ecx, dword [eax]
je 0x10151a54
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp esi, eax
jg 0x10151daf
imul esi, ecx
cmp esi, 0x7fffffe0
ja 0x10151daf
add esi, 0x1f
shr esi, 5
shl esi, 2
test esi, esi
je 0x10151a7c
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
jmp 0x10151a7e
xor eax, eax
mov dword [edi + 0x2c], eax
test eax, eax
je 0x10151daf
push esi
xor edx, edx
mov ecx, eax
call fcn.100a44c0
add esp, 4
cmp dword [ebp + 0xc], 0x20
jne 0x10151aab
mov ecx, dword [edi + 0x2c]
or edx, 0xffffffff
push esi
call fcn.100a44c0
add esp, 4
mov eax, dword [edi + 0x24]
sub eax, dword [edi + 0x1c]
imul eax, dword [edi + 4]
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [edi + 0x58], eax
mov eax, dword [edi + 0x24]
sub eax, dword [edi + 0x1c]
mov dword [edi + 0x44], ebx
mov dword [edi + 0x60], 0
lea eax, [eax*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
mov dword [edi + 0x5c], eax
mov ecx, dword [ebx + 8]
mov eax, dword [edi + 8]
imul eax, ecx
mov dword [edi + 0x4c], ecx
mov esi, dword [ebx + 0xc]
mov ebx, dword [ebp + 0x20]
mov dword [esp + 0x4c], ecx
add eax, 0x1f
mov dword [esp + 0x48], esi
cdq
and edx, 0x1f
mov dword [edi + 0x50], esi
add eax, edx
sar eax, 5
shl eax, 2
mov dword [edi + 0x54], eax
test ebx, 0x100
jne 0x10151b65
test bl, 0xa0
jne 0x10151b60
mov eax, dword [ebp + 0x10]
cdq
mov esi, eax
xor esi, edx
sub esi, edx
je 0x10151b5c
mov eax, dword [ebp + 0x14]
cdq
mov ecx, eax
mov eax, dword [esp + 0x4c]
imul eax, dword [esp + 0x48]
xor ecx, edx
sub ecx, edx
shl eax, 3
cdq
idiv esi
mov edx, 0x20
cmp ecx, eax
mov ecx, dword [esp + 0x4c]
cmovl ebx, edx
mov esi, dword [esp + 0x48]
mov dword [edi + 0x6c], ebx
jmp 0x10151b78
test bl, 4
mov eax, 0x100
mov edx, 0x104
cmovne eax, edx
mov dword [edi + 0x6c], eax
mov eax, dword [edi + 0x14]
movd xmm0, ecx
mov ecx, dword [edi + 0x18]
cvtdq2ps xmm0, xmm0
movd xmm1, eax
movd xmm2, ecx
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm2, xmm2
divss xmm0, xmm1
cvtps2pd xmm6, xmm0
movd xmm0, esi
cvtdq2ps xmm0, xmm0
divss xmm0, xmm2
cvtps2pd xmm7, xmm0
xorps xmm0, xmm0
test eax, eax
jle 0x10151bb2
xorps xmm1, xmm1
cvtps2pd xmm3, xmm1
test ecx, ecx
jg 0x10151bbc
movaps xmm0, xmm2
mov eax, dword [ebp + 0x18]
cvtps2pd xmm1, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, dword [eax]
cvtps2pd xmm4, xmm0
xorps xmm0, xmm0
cvtsi2ss xmm0, dword [eax + 8]
addsd xmm4, xmm3
cvtps2pd xmm5, xmm0
xorps xmm0, xmm0
mulsd xmm4, xmm6
cvtsi2ss xmm0, dword [eax + 4]
addsd xmm5, xmm3
cvtps2pd xmm2, xmm0
xorps xmm0, xmm0
mulsd xmm5, xmm6
cvtsi2ss xmm0, dword [eax + 0xc]
comisd xmm4, xmm5
cvtps2pd xmm3, xmm0
addsd xmm2, xmm1
movsd qword [esp + 0x50], xmm5
addsd xmm3, xmm1
mulsd xmm2, xmm7
mulsd xmm3, xmm7
movsd qword [esp + 0x58], xmm2
movsd qword [esp + 0x60], xmm3
jbe 0x10151c31
movaps xmm0, xmm4
movaps xmm4, xmm5
movsd qword [esp + 0x50], xmm0
comisd xmm2, xmm3
jbe 0x10151c49
movaps xmm0, xmm2
movaps xmm2, xmm3
movsd qword [esp + 0x58], xmm2
movsd qword [esp + 0x60], xmm0
cvtpd2ps xmm0, xmm4
sub esp, 8
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x70], xmm0
fld qword [esp + 0x70]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
fstp qword [esp + 0x70]
movsd xmm0, qword [esp + 0x70]
cvtpd2ps xmm0, xmm0
cvttss2si eax, xmm0
movsd xmm0, qword [esp + 0x58]
cvtpd2ps xmm0, xmm0
mov dword [edi + 0x34], eax
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x70], xmm0
fld qword [esp + 0x70]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
fstp qword [esp + 0x70]
movsd xmm0, qword [esp + 0x70]
cvtpd2ps xmm0, xmm0
cvttss2si eax, xmm0
movsd xmm0, qword [esp + 0x60]
cvtpd2ps xmm0, xmm0
mov dword [edi + 0x3c], eax
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x70], xmm0
fld qword [esp + 0x70]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_floor
fstp qword [esp + 0x70]
movsd xmm0, qword [esp + 0x70]
cvtpd2ps xmm0, xmm0
cvttss2si eax, xmm0
movsd xmm0, qword [esp + 0x68]
cvtpd2ps xmm0, xmm0
mov dword [edi + 0x38], eax
cvtps2pd xmm0, xmm0
movsd qword [esp + 0x70], xmm0
fld qword [esp + 0x70]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
mov edx, dword [esp + 0x50]
lea ecx, [edi + 0x34]
fstp qword [esp + 0x70]
movsd xmm0, qword [esp + 0x70]
add esp, 8
cvtpd2ps xmm0, xmm0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x7c], edx
cvttss2si eax, xmm0
mov dword [edi + 0x40], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x78], eax
lea eax, [esp + 0x70]
push eax
call fcn.1008d4c0
mov eax, dword [edi + 8]
cmp eax, 1
jne 0x10151d66
xor eax, eax
cmp dword [edi + 4], 8
setne al
inc eax
mov dword [edi + 0x68], eax
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [edi + 0xc]
cmp eax, 8
jne 0x10151da2
xor eax, eax
cmp dword [edi + 4], 8
jne 0x10151d8c
test ecx, ecx
setne al
add eax, 3
mov dword [edi + 0x68], eax
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
test ecx, ecx
setne al
add eax, 5
mov dword [edi + 0x68], eax
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
xor eax, eax
test ecx, ecx
setne al
add eax, 7
mov dword [edi + 0x68], eax
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c