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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x98
mov eax, dword [0x481014]
xor eax, esp
mov dword [esp + 0x94], eax
cmp byte [ebp + 0x18], 2
xorps xmm0, xmm0
movsd xmm1, qword [ebp + 8]
push esi
sete al
comisd xmm0, xmm1
push edi
mov edi, dword [ebp + 0x24]
mov byte [esp + 0x1b], al
jb 0x409047
mov esi, dword [ebp + 0x10]
test esi, esi
jle 0x409012
test al, al
je 0x409012
mov eax, dword [edi + 0xc]
cmp esi, eax
jbe 0x408fe6
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax]
mov eax, dword [edi + 0xc]
cmp esi, eax
push esi
cmovbe eax, esi
mov dword [edi + 8], eax
push 0x30
push dword [edi + 4]
call fcn.00447050
add esp, 0xc
neg esi
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.0042f2f9
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 8]
lea edx, [ecx + 1]
cmp edx, dword [edi + 0xc]
jbe 0x409027
mov eax, dword [edi]
mov ecx, edi
push edx
call dword [eax]
mov ecx, dword [edi + 8]
mov eax, dword [edi + 4]
mov byte [ecx + eax], 0x30
inc dword [edi + 8]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.0042f2f9
mov esp, ebp
pop ebp
ret
mov al, byte [ebp + 0x20]
test al, 8
jne 0x40907e
movups xmm0, xmmword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
sub esp, 0x10
mov eax, esp
movaps xmm2, xmm1
mov edx, edi
movups xmmword [eax], xmm0
call fcn.00409c60
add esp, 0x10
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.0042f2f9
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
test esi, esi
jns 0x409113
test al, 4
je 0x4090bd
cvtpd2ps xmm0, xmm1
call fcn.0040ace0
mov esi, edx
lea ecx, [esp + 0x3c]
push edi
mov edx, eax
call fcn.0040cc50
add esp, 4
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.0042f2f9
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x40]
push eax
call fcn.0040b140
add esp, 4
lea ecx, [esp + 0x3c]
movups xmm1, xmmword [eax]
movaps xmm0, xmm1
movaps xmmword [esp + 0x40], xmm1
psrldq xmm0, 4
movd eax, xmm0
push eax
movd eax, xmm1
push eax
push edi
call fcn.0040ccf0
movaps xmm0, xmmword [esp + 0x4c]
add esp, 0xc
psrldq xmm0, 8
movd eax, xmm0
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.0042f2f9
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x40]
call fcn.0040dcb0
movups xmm0, xmmword [esp + 0x40]
sub esp, 0x10
lea ecx, [esp + 0x90]
mov eax, esp
movups xmmword [eax], xmm0
call fcn.0040cdd0
mov eax, 0xffffffc3
mov ecx, 0x4d104d42
sub eax, dword [esp + 0x98]
imul ecx
add eax, 0xffffffff
adc edx, 0
lea eax, [edx + 0x15b]
cdq
and edx, 7
add edx, eax
sar edx, 3
mov ecx, dword [edx*8 + 0x476b88]
lea eax, [edx*8 - 0x154]
mov dword [esp + 0x64], eax
mov eax, dword [edx*8 + 0x476b8c]
mov dword [esp + 0x54], eax
movsx eax, word [edx*2 + 0x476ad2]
mov dword [esp + 0x58], eax
mov eax, esp
mov dword [esp + 0x50], ecx
sub esp, 0x10
movups xmm0, xmmword [esp + 0x60]
lea ecx, [esp + 0x60]
movups xmmword [eax], xmm0
mov eax, esp
movups xmm0, xmmword [esp + 0xa0]
movups xmmword [eax], xmm0
call fcn.00407610
mov ecx, dword [edi + 4]
mov edx, eax
mov eax, dword [esp + 0x74]
add esp, 0x20
mov dword [esp + 0x5c], ecx
mov ecx, 0x2ff
cmp esi, ecx
mov dword [esp + 0x60], 0
movups xmm2, xmmword [edx]
cmovle ecx, esi
mov dword [esp + 0x34], 1
neg eax
mov dword [esp + 0x64], ecx
movaps xmm0, xmm2
mov dword [esp + 0x68], eax
mov al, byte [esp + 0x1b]
xor edx, edx
psrldq xmm0, 8
xor edi, edi
movd ecx, xmm0
mov byte [esp + 0x6c], al
xor eax, eax
mov dword [esp + 0x24], eax
neg ecx
movaps xmmword [esp + 0x40], xmm2
movq xmm1, qword [esp + 0x40]
mov eax, ecx
bts edx, eax
mov dword [esp + 0x28], ecx
cmp eax, 0x20
movd xmm0, ecx
cmovae edi, edx
movd ecx, xmm2
xor edx, edi
cmp eax, 0x40
psrlq xmm1, xmm0
cmovae edi, edx
mov dword [esp + 0x3c], edx
add edx, 0xffffffff
movd esi, xmm1
mov dword [esp + 0x7c], edi
adc edi, 0xffffffff
mov dword [esp + 0x74], edx
mov dword [esp + 0x10], esi
mov dword [esp + 0x78], edi
mov eax, ecx
psrldq xmm2, 4
and eax, edx
mov dword [esp + 0x58], 0
mov dword [esp + 0x38], eax
movd eax, xmm2
mov dword [esp + 0x20], eax
and eax, edi
mov dword [esp + 0x1c], eax
mov eax, esi
or eax, 1
bsr eax, eax
movzx edx, word [eax*2 + 0x476430]
cmp esi, dword [edx*4 + 0x477018]
sbb eax, eax
neg eax
sub edx, eax
lea eax, [esp + 0x14]
mov dword [esp + 0x58], edx
mov dword [esp + 0x14], edx
mov edx, 0xcccccccd
push eax
mov eax, ecx
sub esp, 8
lea edi, [edx - 1]
mul edx
mov dword [esp + 0x4c], eax
mov esi, edx
mov eax, ecx
mov ecx, 0xcccccccd
mul edi
mov edi, eax
mov dword [esp + 0x7c], edx
mov eax, dword [esp + 0x2c]
mul ecx
mov dword [esp + 0x8c], edx
mov ecx, eax
mov eax, dword [esp + 0x2c]
mov edx, 0xcccccccc
mul edx
add ecx, esi
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x8c]
adc edx, 0
mov dword [esp + 0x2c], eax
mov esi, eax
add edi, ecx
mov ecx, dword [esp + 0x7c]
adc ecx, 0
mov dword [esp + 0x8c], edi
mov edi, dword [esp + 0x64]
xor eax, eax
add edx, ecx
mov ecx, dword [esp + 0x4c]
adc eax, eax
add esi, edx
mov edx, dword [edi*8 + 0x476f14]
adc ecx, eax
mov eax, dword [edi*8 + 0x476f10]
shrd esi, ecx, 3
shr ecx, 3
push ecx
mov ecx, dword [esp + 0x38]
push esi
call fcn.00463450
push edx
push eax
lea ecx, [esp + 0x78]
call fcn.004080f0
test eax, eax
jne 0x40955e
mov esi, dword [esp + 0x38]
xor eax, eax
dec edi
mov dword [esp + 0x14], eax
mov ecx, 0x3b9aca00
cmp edi, 9
ja case.default.0x40935f
jmp dword [edi*4 + 0x409634]
mov eax, dword [esp + 0x10]
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
mov ecx, 0x5f5e100
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
mov ecx, 0x989680
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
mov ecx, 0xf4240
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
mov ecx, 0x186a0
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
mov ecx, 0x2710
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
mov ecx, 0x3e8
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
mov ecx, 0x64
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
mov ecx, 0xa
xor edx, edx
div ecx
mov ecx, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ecx
jmp 0x409462
mov ecx, dword [esp + 0x10]
push 1
push ecx
push 0
mov eax, ecx
mov dword [esp + 0x2c], edi
mov ecx, dword [esp + 0x34]
xor edx, edx
push 1
call fcn.00463450
add eax, esi
mov ecx, edi
adc edx, dword [esp + 0x2c]
push edx
mov edx, dword [ecx*8 + 0x476f1c]
push eax
mov eax, dword [ecx*8 + 0x476f18]
mov ecx, dword [esp + 0x40]
call fcn.00463450
push edx
push eax
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x7c]
add al, 0x30
movzx eax, al
push eax
call fcn.00408160
test eax, eax
jne 0x40955e
test edi, edi
jg 0x40934a
mov edi, dword [esp + 0x1c]
mov eax, esi
mov edx, dword [esp + 0x34]
mov ecx, edi
shld ecx, eax, 2
shl eax, 2
add esi, eax
mov eax, edx
adc edi, ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x24], ecx
shld ecx, eax, 2
shld edi, esi, 1
shl eax, 2
add esi, esi
add edx, eax
mov eax, dword [esp + 0x24]
adc eax, ecx
mov ecx, dword [esp + 0x28]
shld eax, edx, 1
add edx, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], edx
mov eax, esi
mov edx, edi
call fcn.00463470
and edi, dword [esp + 0x78]
add al, 0x30
and esi, dword [esp + 0x74]
push 0
push ecx
mov byte [esp + 0x40], al
lea ecx, [esp + 0x64]
mov eax, dword [esp + 0x2c]
push eax
mov eax, dword [esp + 0x40]
push eax
mov dword [esp + 0x2c], edi
push dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
push esi
push dword [esp + 0x94]
dec edi
push dword [esp + 0x58]
mov dword [esp + 0x40], edi
push dword [esp + 0x58]
call fcn.00408160
test eax, eax
je 0x4094c0
mov esi, dword [ebp + 0x24]
cmp eax, 2
jne 0x4095a7
mov eax, dword [esp + 0x60]
sub esp, 8
sub eax, dword [esp + 0x5c]
movsd xmm0, qword [ebp + 8]
dec eax
mov dl, byte [ebp + 0x20]
add eax, edi
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
movsd qword [esp], xmm0
push eax
shr dl, 2
push esi
and dl, 1
call fcn.0040ce30
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov dword [esp + 0x1c], ecx
jmp 0x4095d2
mov ecx, dword [esp + 0x68]
mov eax, dword [esi + 0xc]
add ecx, edi
mov edi, dword [esp + 0x60]
mov dword [esp + 0x1c], ecx
cmp edi, eax
jbe 0x4095cc
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax]
mov eax, dword [esi + 0xc]
cmp edi, eax
mov ecx, dword [esp + 0x1c]
cmova edi, eax
mov dword [esi + 8], edi
cmp byte [esp + 0x1b], 0
jne 0x409619
test byte [ebp + 0x20], 0x10
jne 0x409619
mov edi, dword [esi + 8]
test edi, edi
je 0x409600
mov eax, dword [esi + 4]
dec eax
add eax, edi
nop dword [eax]
cmp byte [eax], 0x30
jne 0x4095fc
dec eax
inc ecx
sub edi, 1
jne 0x4095f0
mov dword [esp + 0x1c], ecx
mov eax, dword [esi + 0xc]
cmp edi, eax
jbe 0x409613
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax]
mov eax, dword [esi + 0xc]
cmp edi, eax
cmova edi, eax
mov dword [esi + 8], edi
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
xor ecx, esp
call fcn.0042f2f9
mov esp, ebp
pop ebp
ret