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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x20
movss xmm0, dword [ebx + 0x48]
xorps xmm5, xmm5
push esi
mov esi, dword [ebx + 8]
push edi
mov dword [ebp - 4], edx
mov edi, ecx
mov ecx, dword [ebx + 0x10]
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
sub esi, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x14]
cdq
sub eax, edx
mov dword [ebx + 8], esi
mov edx, dword [ebx + 0xc]
sar eax, 1
sub edx, eax
comiss xmm0, xmm5
mov dword [ebx + 0xc], edx
jbe 0x500d72
push ecx
movss dword [esp], xmm0
push 0xff000000
push dword [ebx + 0x14]
push ecx
push edx
lea ecx, [edi + 0x1321280]
mov edx, esi
call fcn.004084c0
add esp, 0x14
mov ecx, dword [ebx + 0x30]
mov eax, dword [ebx + 0x2c]
mov esi, eax
cmp ecx, eax
mov dword [ebp - 0x1c], 0
cmovl esi, ecx
dec eax
add eax, ecx
mov dword [ebp - 0xc], esi
cdq
idiv ecx
mov dword [ebp - 8], eax
cmp esi, 1
je 0x500dae
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x20], eax
lea ecx, [eax + eax]
mov eax, dword [ebx + 0x10]
sub eax, ecx
lea ecx, [esi - 1]
cdq
idiv ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebx + 0x3c]
xor esi, esi
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x18], esi
mov eax, dword [eax]
test ecx, ecx
jle 0x500e45
cdq
idiv ecx
cmp byte [ebx + 0x24], 0
mov esi, eax
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x18], esi
je 0x500e33
cmp byte [ebx + 0x28], 0
je 0x500e33
push 0
push ecx
lea edx, [ebp - 0x14]
mov ecx, edi
call fcn.004f3ec0
add esp, 8
cmp byte [ebx + 0x44], 0
jne 0x500e17
mov ecx, edi
call fcn.004f25a0
test al, al
je 0x500e02
test esi, esi
je 0x500e2d
call fcn.004f25d0
mov ecx, dword [ebp - 8]
test al, al
je 0x500e1a
lea eax, [ecx - 1]
cmp esi, eax
jne 0x500e1a
jmp 0x500e2d
mov ecx, dword [ebp - 8]
push 1
push ecx
lea edx, [ebp - 0x10]
mov ecx, edi
call fcn.004f3ec0
mov esi, dword [ebp - 0x10]
add esp, 8
mov ecx, dword [ebp - 0xc]
xorps xmm5, xmm5
mov eax, esi
imul eax, ecx
mov ecx, dword [ebx + 0x2c]
add eax, dword [ebp - 0x14]
cmp eax, ecx
jl 0x500e45
lea eax, [ecx - 1]
mov ecx, dword [ebx + 0x3c]
movd xmm0, dword [ebx + 8]
mov edx, dword [ebx + 0x10]
cvtdq2ps xmm0, xmm0
mov dword [ecx], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov byte [ebp - 0x10], 0
imul ecx, dword [ebx + 0x20]
movss dword [eax + 0x68], xmm0
movd xmm0, dword [ebx + 0xc]
cvtdq2ps xmm0, xmm0
mov dword [eax + 0x78], 1
sub ecx, dword [ebx + 0x14]
add ecx, 4
mov byte [eax + 0x7c], 1
mov dword [eax + 0x84], 0
mov dword [eax + 0x98], 0x41a00000
movss dword [eax + 0x6c], xmm0
movd xmm0, edx
cvtdq2ps xmm0, xmm0
movss dword [eax + 0x70], xmm0
movd xmm0, dword [ebx + 0x14]
cvtdq2ps xmm0, xmm0
movss dword [eax + 0x74], xmm0
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
comiss xmm5, xmm0
movss dword [eax + 0x8c], xmm0
jbe 0x500ed1
mov dword [eax + 0x8c], 0
push ecx
push dword [ebx + 0x14]
mov ecx, edi
push edx
push dword [ebx + 0xc]
mov edx, dword [ebx + 8]
call fcn.004e37c0
mov edx, dword [ebp - 4]
add esp, 0x10
mov ecx, edi
call fcn.004bb7f0
mov al, byte [ebx + 0x40]
cmp dword [ebp - 0x18], esi
jne 0x500efc
test al, al
je 0x500f35
test al, al
xorps xmm2, xmm2
mov ecx, edi
sete al
imul esi, dword [ebx + 0x20]
movzx eax, al
push eax
mov eax, dword [ebp - 4]
mov edx, eax
movss xmm3, dword [eax + 0x8c]
movd xmm0, esi
cvtdq2ps xmm0, xmm0
minss xmm3, xmm0
xorps xmm3, xmmword [0x53ec80]
call fcn.004bb2a0
add esp, 4
mov eax, dword [ebp - 4]
push ecx
movss xmm0, dword [eax + 0x44]
movss dword [esp], xmm0
call fcn.005238b2
fstp dword [ebp - 0x18]
cvttss2si eax, dword [ebp - 0x18]
xor ecx, ecx
add esp, 4
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
cmp dword [ebx + 0x2c], ecx
jle 0x500fb1
mov esi, dword [ebp - 0xc]
mov eax, ecx
cdq
idiv esi
push dword [ebx + 0x28]
imul eax, dword [ebx + 0x20]
imul edx, dword [ebp - 0x1c]
push dword [ebx + 0x24]
add eax, dword [ebp - 0x14]
add eax, dword [ebx + 0xc]
add eax, dword [ebx + 0x1c]
add edx, dword [ebx + 8]
add edx, dword [ebp - 0x20]
push eax
push edx
push ecx
push dword [ebx + 0x38]
push edi
call dword [ebx + 0x34]
mov ecx, dword [ebp - 0x10]
add esp, 0x1c
test al, al
movzx ecx, cl
mov eax, 1
cmovne ecx, eax
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x18]
inc ecx
mov dword [ebp - 0x18], ecx
cmp ecx, dword [ebx + 0x2c]
jl 0x500f63
mov eax, dword [edi + 0x13212b4]
cmp dword [edi + 0x1321280], eax
jne 0x501008
mov eax, dword [edi + 0x13212bc]
mov esi, dword [edi + 0x13212b8]
mov edx, dword [edi + 0x1321284]
mov ecx, dword [edi + 0x13212b0]
push eax
push esi
push dword [edi + 0x13212c4]
mov dword [edi + 0x1321280], ecx
push dword [edi + 0x13212c0]
push edx
push dword [edi + 0x13212b4]
push eax
push esi
push dword [edi + 0x132128c]
push dword [edi + 0x1321288]
call fcn.00406ba0
add esp, 0x28
mov eax, dword [ebp - 4]
cmp byte [eax + 0x64], 0
je 0x50101c
xor al, al
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov al, byte [ebp - 0x10]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret