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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x198
mov eax, dword [0x5e000c]
xor eax, esp
mov dword [esp + 0x194], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x18]
push edi
mov edi, ecx
mov dword [esp + 0x2c], eax
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], ecx
mov edx, dword [edi + 0x78]
test edx, edx
je 0x40e858
mov ecx, dword [edi + 0x7c]
test ecx, ecx
je 0x40e858
push esi
push edx
push eax
call fcn.004cf1f0
movss xmm0, dword [edi + 8]
lea eax, [esp + 0x158]
push ecx
movss dword [esp], xmm0
push eax
call dword [0x5a6978]
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 0
push eax
lea eax, [edi + 0x20]
mov dword [esp + 0x4c], 0x3f800000
push eax
lea eax, [edi + 0x14]
mov dword [esp + 0x54], 0
push eax
lea eax, [esp + 0xa4]
push eax
call dword [0x5a6960]
mov eax, dword [edi + 0x78]
lea edx, [esp + 0x98]
push edx
push str.g_viewing
push eax
mov ecx, dword [eax]
call dword [ecx + 0x98]
movss xmm1, dword [edi + 0x28]
xor edx, edx
subss xmm1, dword [edi + 0x1c]
mov eax, dword [edi + 0x84]
mov ecx, dword [edi + 0x80]
sub eax, ecx
sar eax, 2
mov dword [esp + 0x1c], eax
mulss xmm1, dword [0x5c8ef4]
mov dword [esp + 0x14], edx
addss xmm1, dword [edi + 0x1c]
movss dword [esp + 0x10], xmm1
test eax, eax
je 0x40e6c6
nop word [eax + eax]
mov eax, dword [edi + 0x80]
sub esp, 0xc
mov esi, dword [eax + edx*4]
lea eax, [esp + 0x5c]
movss xmm0, dword [esi + 0x30]
movss dword [esp + 8], xmm0
movss dword [esp + 4], xmm0
movss dword [esp], xmm0
push eax
call dword [0x5a695c]
movss xmm0, dword [esi + 0x20]
lea eax, [esp + 0xd8]
sub esp, 0xc
movss dword [esp + 8], xmm0
movss xmm0, dword [esi + 0x1c]
movss dword [esp + 4], xmm0
movss xmm0, dword [esi + 0x18]
movss dword [esp], xmm0
push eax
call dword [0x5a6964]
movss xmm0, dword [esi + 8]
lea eax, [esp + 0x118]
sub esp, 0xc
movss dword [esp + 8], xmm0
movss xmm0, dword [esi + 4]
movss dword [esp + 4], xmm0
movss xmm0, dword [esi]
movss dword [esp], xmm0
push eax
call dword [0x5a6950]
lea eax, [esp + 0xd8]
push eax
lea eax, [esp + 0x54]
push eax
push eax
call dword [0x5a6954]
lea eax, [esp + 0x118]
push eax
lea eax, [esp + 0x54]
push eax
push eax
call dword [0x5a6954]
lea eax, [esp + 0x158]
push eax
lea eax, [esp + 0x54]
push eax
push eax
call dword [0x5a6954]
movaps xmm0, xmmword [0x5c9430]
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x34]
movaps xmmword [esp + 0x34], xmm0
push eax
push eax
call dword [0x5a6974]
movups xmm0, xmmword [esp + 0x50]
mov edx, dword [esp + 0x14]
inc edx
movups xmmword [esi + 0x5c], xmm0
mov dword [esp + 0x14], edx
movups xmm0, xmmword [esp + 0x60]
movups xmmword [esi + 0x6c], xmm0
movups xmm0, xmmword [esp + 0x70]
movups xmmword [esi + 0x7c], xmm0
movups xmm0, xmmword [esp + 0x80]
movups xmmword [esi + 0x8c], xmm0
movups xmm0, xmmword [esp + 0x30]
movups xmmword [esi + 0x9c], xmm0
cmp edx, dword [esp + 0x1c]
jb 0x40e590
mov ecx, dword [edi + 0x80]
mov edx, dword [edi + 0x84]
mov eax, edx
push dword [esp + 0x28]
sub eax, ecx
sar eax, 2
push eax
call fcn.0040ecd0
xor esi, esi
add esp, 8
mov dword [esp + 0x20], esi
cmp dword [esp + 0x1c], esi
jbe 0x40e82d
mov ecx, dword [ebp + 0x20]
xorps xmm2, xmm2
movss xmm1, dword [esp + 0x10]
nop dword [eax]
comiss xmm2, xmm1
mov eax, dword [edi + 0x80]
mov esi, dword [eax + esi*4]
mov eax, dword [esp + 0x24]
movss xmm0, dword [edi + 0x10]
mov edi, dword [edi + 0x78]
mov eax, dword [eax + 0x7c]
movss dword [esp + 0x14], xmm0
mov dword [esp + 0x18], eax
jbe 0x40e75a
xorps xmm1, xmmword [0x5c94e0]
cmp ecx, 1
jne 0x40e746
movss xmm0, dword [esi + 0xa4]
comiss xmm0, xmm1
jae 0x40e810
jmp 0x40e784
cmp ecx, 2
jne 0x40e784
comiss xmm1, dword [esi + 0xa4]
ja 0x40e810
jmp 0x40e784
cmp ecx, 1
jne 0x40e76e
comiss xmm1, dword [esi + 0xa4]
ja 0x40e816
jmp 0x40e784
cmp ecx, 2
jne 0x40e784
movss xmm0, dword [esi + 0xa4]
comiss xmm0, xmm1
jae 0x40e816
mov ecx, dword [edi]
lea eax, [esi + 0x5c]
push eax
push str.g_world
push edi
call dword [ecx + 0x98]
xorps xmm0, xmm0
comiss xmm0, dword [esi + 0x3c]
jbe 0x40e7cb
comiss xmm0, dword [esi + 0x40]
jbe 0x40e7cb
movss xmm3, dword [esi + 4]
movsd xmm1, qword [0x5c8f70]
cvtps2pd xmm0, xmm3
push edi
push ecx
mov ecx, dword [esp + 0x20]
comisd xmm1, xmm0
jbe 0x40e7ff
mulss xmm3, dword [0x5c9210]
jmp 0x40e805
movss xmm3, dword [esi + 0x48]
movss xmm1, dword [esi + 4]
movaps xmm0, xmm3
subss xmm0, dword [0x5c8ed4]
push edi
push ecx
mov ecx, dword [esp + 0x20]
comiss xmm1, xmm0
jbe 0x40e7ff
subss xmm3, xmm1
mulss xmm3, dword [0x5c9210]
mulss xmm3, dword [esp + 0x1c]
jmp 0x40e805
movss xmm3, dword [esp + 0x1c]
call fcn.004cf620
mov ecx, dword [ebp + 0x20]
xorps xmm2, xmm2
movss xmm1, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
inc esi
mov dword [esp + 0x20], esi
cmp esi, dword [esp + 0x1c]
jb 0x40e700
mov esi, dword [esp + 0x2c]
push 1
push 0x16
push esi
mov eax, dword [esi]
call dword [eax + 0xe4]
mov eax, dword [esi]
push 0
push 7
push esi
call dword [eax + 0xe4]
push dword [esp + 0x28]
mov eax, dword [esi]
push esi
call dword [eax + 0x15c]
mov ecx, dword [esp + 0x19c]
pop edi
pop esi
xor ecx, esp
call fcn.0052f4c5
mov esp, ebp
pop ebp
ret 0x1c