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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x74
movss xmm0, dword [0x7389bc]
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x15d8]
mov edx, dword [ebx + 0x178c]
push esi
push edi
lea esi, [ebx + 0x1010]
mov ecx, 8
lea edi, [esp + 0x60]
rep movsd dword es:[edi], dword [esi]
movss xmm1, dword [esp + 0x60]
subss xmm1, xmm0
movss dword [esp + 0x60], xmm1
movss xmm1, dword [esp + 0x64]
subss xmm1, xmm0
movss dword [esp + 0x64], xmm1
movss xmm1, dword [esp + 0x68]
push eax
mov eax, dword [ebx + 0x1788]
subss xmm1, xmm0
movss dword [esp + 0x6c], xmm1
movss xmm1, dword [esp + 0x74]
addss xmm1, xmm0
lea ecx, [ebx + 0x14d8]
push ecx
mov ecx, dword [ebx + 0x1784]
movss dword [esp + 0x78], xmm1
movss xmm1, dword [esp + 0x7c]
push edx
push eax
addss xmm1, xmm0
movss dword [esp + 0x84], xmm1
movss xmm1, dword [esp + 0x88]
push ecx
addss xmm1, xmm0
push 0x91afe0
lea eax, [esp + 0x78]
movss dword [esp + 0x90], xmm1
call fcn.00515820
mov eax, dword [0x91bfe0]
xor ecx, ecx
cmp eax, ecx
je 0x509db1
movss xmm0, dword [ebx + 0x13c0]
lea edx, [ebx + 0x13a0]
mov esi, dword [edx]
mov dword [esp + 0x30], esi
mov esi, dword [edx + 4]
mov dword [esp + 0x34], esi
mov esi, dword [edx + 8]
mov edx, dword [edx + 0xc]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], esi
lea edx, [ebx + 0x13b0]
mov esi, dword [edx]
mov dword [esp + 0x40], esi
mov esi, dword [edx + 4]
movss xmm1, dword [esp + 0x40]
subss xmm1, dword [esp + 0x30]
mov dword [esp + 0x44], esi
mov esi, dword [edx + 8]
movss xmm2, dword [esp + 0x44]
subss xmm2, dword [esp + 0x34]
mov edx, dword [edx + 0xc]
movss dword [esp + 0x14], xmm0
mov dword [esp + 0x48], esi
movss xmm3, dword [esp + 0x48]
subss xmm3, dword [esp + 0x38]
movaps xmm0, xmm3
mulss xmm0, xmm3
movaps xmm4, xmm2
mulss xmm4, xmm2
addss xmm0, xmm4
movaps xmm4, xmm1
mulss xmm4, xmm1
addss xmm0, xmm4
comiss xmm0, dword [0x738d48]
mov dword [esp + 0x4c], edx
mov dword [esp + 0xc], ecx
movss dword [esp + 0x20], xmm1
movss dword [esp + 0x24], xmm2
movss dword [esp + 0x28], xmm3
movss dword [esp + 0x18], xmm0
jbe 0x509b35
fld dword [esp + 0x18]
fsqrt
fdivr dword [0x7389bc]
fld dword [esp + 0x20]
fmul st(1)
fstp dword [esp + 0x20]
movss xmm1, dword [esp + 0x20]
fld dword [esp + 0x24]
fmul st(1)
fstp dword [esp + 0x24]
movss xmm2, dword [esp + 0x24]
fld dword [esp + 0x28]
fmul st(1)
fstp dword [esp + 0x28]
movss xmm3, dword [esp + 0x28]
fstp st(0)
movss xmm4, dword [0x738ac0]
comiss xmm1, xmm4
jbe 0x509b4a
mov dword [esp + 0xc], 1
movss xmm0, dword [0x738c30]
comiss xmm0, xmm1
jbe 0x509b5c
or dword [esp + 0xc], 2
comiss xmm2, xmm4
jbe 0x509b66
or dword [esp + 0xc], 4
comiss xmm0, xmm2
jbe 0x509b70
or dword [esp + 0xc], 8
comiss xmm3, xmm4
jbe 0x509b7a
or dword [esp + 0xc], 0x10
comiss xmm0, xmm3
jbe 0x509b84
or dword [esp + 0xc], 0x20
cmp eax, ecx
mov dword [esp + 0x18], ecx
jle 0x509db1
mov ebx, dword [ecx*4 + 0x91afe0]
mov eax, dword [ebx + 0x24]
mov ecx, dword [ebx + 0x20]
push eax
mov eax, dword [ebp + 8]
push ecx
call fcn.0043f950
or edx, 0xffffffff
jmp 0x509bb0
mov edx, dword [esp + 0x10]
movzx ecx, byte [ebx + 0x36]
inc edx
cmp edx, ecx
mov dword [esp + 0x10], edx
jge 0x509c2a
mov esi, dword [ebx + 0x50]
lea eax, [edx + edx*2]
shl eax, 4
add eax, esi
mov esi, dword [esp + 0xc]
lea esp, [esp]
test dword [eax + 0x20], esi
jne 0x509c1c
movss xmm0, dword [eax]
comiss xmm0, dword [esp + 0x70]
ja 0x509c1c
movss xmm0, dword [esp + 0x60]
comiss xmm0, dword [eax + 0x10]
ja 0x509c1c
movss xmm0, dword [eax + 8]
comiss xmm0, dword [esp + 0x78]
ja 0x509c1c
movss xmm0, dword [esp + 0x68]
comiss xmm0, dword [eax + 0x18]
ja 0x509c1c
movss xmm0, dword [eax + 4]
comiss xmm0, dword [esp + 0x74]
ja 0x509c1c
movss xmm0, dword [esp + 0x64]
comiss xmm0, dword [eax + 0x14]
jbe 0x509c24
inc edx
add eax, 0x30
cmp edx, ecx
jl 0x509bd0
mov dword [esp + 0x10], edx
cmp edx, ecx
je 0x509d6c
mov ecx, dword [ebx + 0x4c]
mov esi, dword [ebx + 0x48]
lea eax, [edx + edx*4]
add eax, ecx
movzx ecx, byte [eax + 4]
shl ecx, 4
movss xmm0, dword [ecx + esi + 8]
mulss xmm0, dword [esp + 0x28]
movss xmm1, dword [ecx + esi + 4]
mulss xmm1, dword [esp + 0x24]
add ecx, esi
addss xmm0, xmm1
movss xmm1, dword [ecx]
mulss xmm1, dword [esp + 0x20]
addss xmm0, xmm1
comiss xmm0, dword [0x738a54]
ja 0x509bb0
movss xmm0, dword [ecx + 8]
mulss xmm0, dword [esp + 0x38]
movss xmm1, dword [ecx + 4]
mulss xmm1, dword [esp + 0x34]
mov edi, dword [ebx + 0x50]
addss xmm0, xmm1
movss xmm1, dword [ecx]
mulss xmm1, dword [esp + 0x30]
lea esi, [edx + edx*2]
shl esi, 4
addss xmm0, xmm1
xorps xmm1, xmm1
addss xmm0, dword [esi + edi + 0x24]
subss xmm1, dword [esp + 0x14]
comiss xmm1, xmm0
mov dword [esp + 0x1c], esi
lea esi, [esi + edi + 0x24]
ja 0x509bb0
movss xmm0, dword [ecx + 8]
mulss xmm0, dword [esp + 0x48]
movss xmm1, dword [ecx + 4]
mulss xmm1, dword [esp + 0x44]
addss xmm0, xmm1
movss xmm1, dword [ecx]
mulss xmm1, dword [esp + 0x40]
addss xmm0, xmm1
addss xmm0, dword [esi]
comiss xmm0, dword [esp + 0x14]
ja 0x509bb0
movzx esi, byte [eax]
movzx edx, byte [eax + 1]
movzx edi, byte [eax + 2]
movzx eax, byte [eax + 3]
mov ecx, dword [ebx + 0x44]
shl eax, 4
add eax, ecx
mov dword [esp + 0x5c], eax
mov eax, dword [ebx + 0x2c]
push eax
shl edx, 4
push 0
add edx, ecx
shl esi, 4
add esi, ecx
push edx
shl edi, 4
add edi, ecx
mov ecx, dword [ebp + 8]
push esi
push ecx
mov eax, edi
call fcn.00508b80
mov edx, dword [ebx + 0x50]
mov eax, dword [esp + 0x1c]
test byte [eax + edx + 0x20], 0x40
je 0x509bac
mov ecx, dword [ebx + 0x2c]
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x5c]
push ecx
push 0
push edi
push esi
push edx
call fcn.00508b80
jmp 0x509bac
mov ecx, dword [ebp + 8]
xor eax, eax
xor edx, edx
mov dword [ecx + 0x1448], eax
mov dword [ecx + 0x144c], eax
cmp dword [ecx + 0x1000], edx
mov dword [ecx + 0x1058], edx
mov dword [ecx + 0x1440], edx
jle 0x509d9b
cmp dword [ecx + 0x1770], edx
jne 0x509db1
mov ecx, dword [esp + 0x18]
mov eax, dword [0x91bfe0]
inc ecx
cmp ecx, eax
mov dword [esp + 0x18], ecx
jl 0x509b90
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4