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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x58
mov eax, dword [0x4ef400]
xor eax, esp
mov dword [esp + 0x54], eax
push esi
push edi
mov edi, dword [0x4f0690]
mov dword [esp + 0x18], edi
mov edx, dword [edi + 0x1dfc]
sub edx, 1
js 0x40a47b
mov eax, dword [edi + 0x1e04]
lea ecx, [edx + edx*8]
lea eax, [eax + ecx*4]
add eax, 4
nop word [eax + eax]
mov esi, dword [eax]
test esi, esi
je 0x40a473
test dword [esi + 8], 0x8000000
jne 0x40a50c
sub eax, 0x24
sub edx, 1
jns 0x40a460
mov eax, dword [edi + 0x1fb0]
xor esi, esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x40a999
xor edx, edx
mov dword [esp + 0x1c], edx
cmp dword [edi + 0x1e14], edx
jle 0x40a6a2
mov eax, dword [edi + 0x1e1c]
mov edx, dword [eax + edx*4]
mov dword [esp + 0x14], edx
test esi, esi
je 0x40a4bb
cmp edx, dword [esi + 0x2c]
je 0x40a68d
mov eax, dword [edi + 0x1fb4]
test eax, eax
je 0x40a4ce
cmp edx, dword [eax + 0x2c]
je 0x40a68d
mov eax, dword [edi + 0x1fb0]
test eax, eax
je 0x40a4e1
cmp edx, dword [eax + 0x2c]
je 0x40a68d
mov edi, dword [edx + 0x6c]
test edi, edi
je 0x40a54a
test esi, esi
je 0x40a54a
mov ecx, dword [edi + 8]
mov eax, dword [esi + 8]
shr ecx, 0x19
shr eax, 0x19
and ecx, 1
and eax, 1
sub ecx, eax
je 0x40a51b
test ecx, ecx
jg 0x40a689
jmp 0x40a54a
mov eax, dword [edi + 0x1fb0]
mov dword [esp + 0x10], eax
jmp 0x40a48f
mov eax, dword [0x4f0690]
mov ecx, dword [eax + 0x1c04]
sub ecx, 1
js 0x40a54a
mov eax, dword [eax + 0x1c0c]
lea eax, [eax + ecx*4]
mov edx, dword [eax]
cmp edx, edi
je 0x40a689
cmp edx, esi
je 0x40a54a
sub eax, 4
sub ecx, 1
jns 0x40a534
mov edi, dword [esp + 0x14]
mov edx, 1
push str.Foreground
mov ecx, edi
call fcn.00406fd0
mov edx, dword [0x4f0690]
add esp, 4
movss xmm4, dword [0x4e6934]
test esi, esi
mov dword [esp + 0x14], eax
mov ecx, 0x418
mov eax, 0x428
xorps xmm1, xmm1
cmovne ecx, eax
mov eax, dword [esp + 0x18]
movups xmm2, xmmword [ecx + edx + 0x15a0]
movss xmm3, dword [eax + 0x1fc4]
comiss xmm1, xmm2
mulss xmm3, dword [edx + 0x15a0]
movaps xmm0, xmm2
shufps xmm0, xmm2, 0xff
movaps xmmword [esp + 0x20], xmm2
mulss xmm3, xmm0
jbe 0x40a5bc
xorps xmm0, xmm0
jmp 0x40a5c3
movaps xmm0, xmm4
minss xmm0, xmm2
movss xmm5, dword [0x4e6a50]
movss xmm6, dword [0x4e68f0]
movss xmm2, dword [esp + 0x24]
comiss xmm1, xmm2
mulss xmm0, xmm5
addss xmm0, xmm6
cvttss2si edx, xmm0
jbe 0x40a5ef
xorps xmm0, xmm0
jmp 0x40a5f6
movaps xmm0, xmm4
minss xmm0, xmm2
movss xmm2, dword [esp + 0x28]
mulss xmm0, xmm5
addss xmm0, xmm6
cvttss2si eax, xmm0
shl eax, 8
or edx, eax
comiss xmm1, xmm2
jbe 0x40a617
xorps xmm0, xmm0
jmp 0x40a61e
movaps xmm0, xmm4
minss xmm0, xmm2
mulss xmm0, xmm5
addss xmm0, xmm6
cvttss2si eax, xmm0
shl eax, 0x10
or edx, eax
comiss xmm1, xmm3
ja 0x40a63b
movaps xmm1, xmm4
minss xmm1, xmm3
movss xmm0, dword [edi + 8]
lea ecx, [edi + 8]
addss xmm0, dword [edi + 0x10]
mulss xmm1, xmm5
push 0
push ecx
mov dword [esp], 0
addss xmm1, xmm6
movss dword [esp + 0x48], xmm0
movss xmm0, dword [ecx + 4]
addss xmm0, dword [edi + 0x14]
cvttss2si eax, xmm1
movss dword [esp + 0x4c], xmm0
shl eax, 0x18
or eax, edx
push eax
lea eax, [esp + 0x4c]
push eax
push ecx
mov ecx, dword [esp + 0x28]
call fcn.0042eb30
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x1c], edx
cmp edx, dword [edi + 0x1e14]
jl 0x40a4a1
cmp dword [esp + 0x10], 0
je 0x40a999
mov esi, dword [edi + 0x1fb0]
mov dword [esp + 0x10], esi
cmp byte [esi + 0xbf], 0
je 0x40a999
mov esi, dword [esi + 0x318]
mov edx, dword [esi + 0x18c]
sub edx, 1
js 0x40a70e
mov eax, dword [esi + 0x194]
lea eax, [eax + edx*4]
nop
mov ecx, dword [eax]
cmp byte [ecx + 0xbf], 0
je 0x40a6f4
cmp byte [ecx + 0xc6], 0
je 0x40a6fe
sub eax, 4
sub edx, 1
jns 0x40a6e0
jmp 0x40a70e
mov ecx, dword [esi + 0x194]
mov ecx, dword [ecx + edx*4]
call fcn.0040a3f0
mov esi, eax
mov esi, dword [esi + 0x278]
mov edx, dword [esi + 0x3c]
lea ecx, [esi + 0x3c]
mov eax, dword [esi + 0x2c]
movss xmm0, dword [eax + 0x18]
movss xmm1, dword [eax + 0x1c]
movss dword [esp + 0x40], xmm0
maxss xmm0, dword [eax + 0x20]
movss dword [esp + 0x44], xmm1
maxss xmm1, dword [eax + 0x24]
mov eax, dword [ecx + 4]
movss dword [esp + 0x48], xmm0
movss dword [esp + 0x4c], xmm1
cmp edx, eax
jne 0x40a77a
inc edx
mov dword [esp + 0x14], edx
test eax, eax
je 0x40a767
cdq
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
add eax, dword [ecx + 4]
jmp 0x40a76c
mov eax, 8
cmp eax, edx
cmovg edx, eax
push edx
call fcn.00423d80
lea ecx, [esi + 0x3c]
mov eax, dword [ecx]
movaps xmm0, xmmword [esp + 0x40]
shl eax, 4
add eax, dword [ecx + 8]
movups xmmword [eax], xmm0
inc dword [ecx]
mov ecx, esi
movups xmmword [esi + 0x60], xmm0
call fcn.0042c6f0
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 0x310]
test byte [eax + 0x359], 1
je 0x40a858
mov edx, dword [ecx + 0x318]
cmp edx, eax
je 0x40a858
movss xmm0, dword [eax + 0x44]
sub esp, 0x10
movss xmm1, dword [eax + 0x40]
mov ecx, 0x35
movss dword [esp + 0x54], xmm0
addss xmm0, dword [eax + 0x4c]
movss dword [esp + 0x50], xmm1
addss xmm1, dword [eax + 0x48]
mov eax, esp
sub esp, 0x10
movss dword [esp + 0x6c], xmm0
movss xmm0, dword [edx + 0x44]
movss dword [esp + 0x44], xmm0
addss xmm0, dword [edx + 0x4c]
movss dword [esp + 0x68], xmm1
movss xmm1, dword [edx + 0x40]
movss dword [esp + 0x40], xmm1
addss xmm1, dword [edx + 0x48]
movss dword [esp + 0x4c], xmm0
movups xmm0, xmmword [esp + 0x60]
movups xmmword [eax], xmm0
mov eax, esp
movss dword [esp + 0x48], xmm1
movups xmm0, xmmword [esp + 0x40]
movss xmm1, dword [edi + 0x1fc4]
movups xmmword [eax], xmm0
call fcn.00404de0
movss xmm2, dword [edi + 0x15b0]
mov edx, eax
mov ecx, esi
call fcn.00433920
mov ecx, dword [esp + 0x30]
add esp, 0x20
movss xmm6, dword [ecx + 0x78]
maxss xmm6, dword [edi + 0x15b0]
mov eax, dword [ecx + 0x2c]
movss xmm5, dword [ecx + 0x40]
movss xmm4, dword [ecx + 0x44]
movaps xmm3, xmm5
movss xmm1, dword [edi + 0x19e4]
movaps xmm2, xmm4
addss xmm5, dword [ecx + 0x48]
addss xmm4, dword [ecx + 0x4c]
movss xmm0, dword [eax + 8]
subss xmm3, xmm1
movss dword [esp + 0x14], xmm6
subss xmm2, xmm1
movss xmm6, dword [eax + 0xc]
movaps xmm7, xmm0
addss xmm6, dword [eax + 0x14]
addss xmm7, dword [eax + 0x10]
comiss xmm0, xmm3
addss xmm5, xmm1
movss dword [esp + 0x40], xmm3
addss xmm4, xmm1
movss dword [esp + 0x10], xmm6
movss xmm6, dword [esp + 0x14]
movss dword [esp + 0x44], xmm2
movss dword [esp + 0x48], xmm5
movss dword [esp + 0x4c], xmm4
jb 0x40a935
movss xmm0, dword [eax + 0xc]
comiss xmm0, xmm2
jb 0x40a935
comiss xmm5, xmm7
jb 0x40a935
comiss xmm4, dword [esp + 0x10]
jb 0x40a935
xorps xmm1, xmmword [0x4e7230]
subss xmm1, dword [0x4e6934]
movss xmm6, dword [ecx + 0x78]
movaps xmm0, xmm1
subss xmm3, xmm1
subss xmm2, xmm1
addss xmm0, xmm5
addss xmm1, xmm4
movss dword [esp + 0x40], xmm3
movss dword [esp + 0x44], xmm2
movss dword [esp + 0x48], xmm0
movss dword [esp + 0x4c], xmm1
movss xmm1, dword [edi + 0x1fbc]
sub esp, 0x10
mov ecx, 0x34
mov dword [esp + 0xc], 0x40400000
movss dword [esp + 4], xmm6
call fcn.00404de0
add esp, 4
mov ecx, esi
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.0042ea40
mov ecx, dword [esi + 0x3c]
sub ecx, 1
mov dword [esi + 0x3c], ecx
jne 0x40a980
mov eax, dword [esi + 0x2c]
add eax, 0x18
jmp 0x40a98b
mov eax, dword [esi + 0x44]
shl ecx, 4
add eax, 0xfffffff0
add eax, ecx
movups xmm0, xmmword [eax]
mov ecx, esi
movups xmmword [esi + 0x60], xmm0
call fcn.0042c6f0
mov ecx, dword [esp + 0x5c]
pop edi
pop esi
xor ecx, esp
call fcn.004ca5c5
mov esp, ebp
pop ebp
ret