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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
test ecx, ecx
je 0x46d7df
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x46d7df
mov edx, dword [ebp + 0x10]
cmp edx, 1
jl 0x46d7df
mov eax, dword [ebp + 0x14]
test eax, eax
jl 0x46d7df
mov ebx, dword [ebp + 0x18]
test ebx, ebx
jl 0x46d7df
cmp eax, edx
jge 0x46d7df
cmp ebx, edx
jg 0x46d7df
cmp ebx, eax
jle 0x46d7df
lea eax, [eax + eax*2]
lea edi, [esp + 0x78]
shl eax, 3
lea edx, [ebx + ebx*2]
push 0
lea esi, [eax + ecx]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 8]
lea edi, [esp + 0x4c]
shl edx, 3
lea esi, [edx + ecx]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0xc]
lea edi, [esp + 0x64]
lea esi, [eax + ecx]
mov eax, dword [ebp + 0xc]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
lea esi, [edx + eax]
mov edx, dword [ebp + 0x20]
mov ecx, 6
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x24]
mov edi, dword [ebp + 0x1c]
push ecx
push edx
lea eax, [esp + 0x3c]
push edi
lea ecx, [esp + 0x58]
push eax
lea edx, [esp + 0x74]
push ecx
lea eax, [esp + 0x90]
push edx
push eax
call fcn.0046c580
add esp, 0x20
cmp eax, 0xffffffff
je 0x46d7df
cmp eax, 3
jne 0x46d62e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x46d684
mov ecx, dword [ebp + 0x14]
lea esi, [ecx + 1]
cmp esi, ebx
jge 0x46d678
mov eax, dword [ebp + 8]
lea edx, [esi + esi*2]
lea edi, [eax + edx*8]
mov ecx, dword [ebp + 0x20]
lea eax, [ecx + 0x68]
push eax
push edi
call dword [0x50090c]
mov edx, dword [ebp + 0x20]
add esp, 8
fsub qword [edx + 0xb0]
fabs
fcomp qword [ebp + 0x28]
fnstsw ax
test ah, 0x41
je 0x46d7df
inc esi
add edi, 0x18
cmp esi, ebx
jl 0x46d646
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
mov eax, dword [ebp + 0x14]
jne 0x46d6df
lea esi, [eax + 1]
cmp esi, ebx
jge 0x46d6d6
mov eax, dword [ebp + 8]
lea ecx, [edi + 0x80]
add edi, 0x68
lea edx, [esi + esi*2]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], ecx
lea edi, [eax + edx*8]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push ecx
push edx
push edi
call dword [0x500a7c]
fcomp qword [ebp + 0x28]
add esp, 0xc
fnstsw ax
test ah, 0x41
je 0x46d7df
inc esi
add edi, 0x18
cmp esi, ebx
jl 0x46d6ac
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
inc eax
cmp eax, ebx
mov dword [esp + 0x10], eax
jge 0x46d7d3
mov edx, dword [ebp + 8]
lea ecx, [eax + eax*2]
lea esi, [edx + ecx*8 - 0x10]
fld qword [esi - 8]
fadd qword [esi + 0x10]
lea edi, [esi + 0x10]
mov eax, dword [ebp + 0x24]
mov ecx, dword [ebp + 0x20]
push eax
fmul qword [0x502630]
lea edx, [esp + 0x1c]
push ecx
push edx
fstp qword [esp + 0x24]
fld qword [esi]
fadd qword [esi + 0x18]
fmul qword [0x502630]
fstp qword [esp + 0x2c]
fld qword [esi + 8]
fadd qword [esi + 0x20]
fmul qword [0x502630]
fstp qword [esp + 0x34]
call fcn.0046d230
fcomp qword [ebp + 0x28]
add esp, 0xc
fnstsw ax
test ah, 0x41
je 0x46d7df
mov ecx, dword [esp + 0x10]
lea eax, [ebx - 1]
cmp ecx, eax
jne 0x46d7a4
fld qword [esi + 0x28]
fadd qword [edi]
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
push ecx
lea eax, [esp + 0x1c]
fmul qword [0x502630]
push edx
push eax
fstp qword [esp + 0x24]
fld qword [esi + 0x30]
fadd qword [esi + 0x18]
fmul qword [0x502630]
fstp qword [esp + 0x2c]
fld qword [esi + 0x38]
fadd qword [esi + 0x20]
fmul qword [0x502630]
fstp qword [esp + 0x34]
call fcn.0046d230
fcomp qword [ebp + 0x28]
add esp, 0xc
fnstsw ax
test ah, 0x41
je 0x46d7df
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
push ecx
push edx
push edi
call fcn.0046d230
fcomp qword [ebp + 0x28]
add esp, 0xc
fnstsw ax
test ah, 0x41
je 0x46d7df
mov eax, dword [esp + 0x10]
add esi, 0x18
inc eax
cmp eax, ebx
mov dword [esp + 0x10], eax
jl 0x46d6f6
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret