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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
je 0x402890
cmp dword [ebp + 0x18], edi
je 0x402890
mov ebx, dword [ebp + 0x1c]
cmp ebx, edi
je 0x402890
mov esi, dword [ebp + 8]
mov dword [esp + 0x20], 0x54442d18
push esi
mov dword [esp + 0x28], 0x401921fb
call fcn.004028a0
add esp, 4
test al, al
je 0x402890
mov al, byte [ebp + 0xc]
test al, al
je 0x402678
mov dword [esp + 0x20], 0x54442d18
mov dword [esp + 0x24], 0xc01921fb
push esi
call fcn.004028c0
add esp, 4
cmp esi, edi
mov dword [esp + 0x1c], eax
jbe 0x4026d8
mov esi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
sub ebx, esi
mov eax, dword [esp + 0x1c]
push eax
push edi
call fcn.004028f0
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebx + esi]
add esp, 8
mov dword [ecx + eax*8], edx
mov edx, dword [ebx + esi + 4]
mov dword [ecx + eax*8 + 4], edx
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jne 0x4026bf
fld qword [0x418c18]
jmp 0x4026c1
fld qword [esi]
mov ecx, dword [ebp + 0x1c]
inc edi
add esi, 8
fstp qword [ecx + eax*8]
mov eax, dword [ebp + 8]
cmp edi, eax
jb 0x402691
xor edi, edi
mov ebx, ecx
mov esi, eax
mov ecx, 2
mov dword [esp + 0xc], 1
cmp esi, ecx
mov dword [esp + 0x1c], ecx
jb 0x402859
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edi
fild qword [esp + 0x28]
cmp esi, edi
fdivr qword [esp + 0x20]
fld st(0)
fmul qword [0x418c10]
fst qword [esp + 0x10]
fsin
fstp qword [esp + 0x38]
fchs
fld st(0)
fsin
fstp qword [esp + 0x40]
fld qword [esp + 0x10]
fcos
mov dword [esp + 0x10], edi
fstp qword [esp + 0x30]
fcos
fld st(0)
fadd st(0), st(0)
jbe 0x402835
mov edx, dword [esp + 0xc]
mov edi, ebx
lea ebx, [ebx + edx*8]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x44]
test eax, eax
fld st(1)
mov dword [esp + 0x5c], edx
jbe 0x402831
mov edx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
sub edx, esi
mov esi, dword [esp + 0xc]
mov ecx, edi
mov eax, ebx
fld st(0)
fmul st(2)
add eax, 8
add ecx, 8
dec esi
fsub qword [esp + 0x78]
fstp qword [esp + 0x68]
fstp qword [esp + 0x78]
fld qword [esp + 0x68]
fld qword [esp + 0x58]
fld st(0)
fmul st(3)
fsub qword [esp + 0x60]
fxch st(1)
fstp qword [esp + 0x60]
fst qword [esp + 0x58]
fld qword [esp + 0x68]
fmul qword [edx + eax - 8]
fld st(1)
fmul qword [eax - 8]
fsubp st(1)
fstp qword [esp + 0x48]
fmul qword [edx + eax - 8]
fld qword [esp + 0x68]
fmul qword [eax - 8]
faddp st(1)
fld qword [edx + ecx - 8]
fsub qword [esp + 0x48]
fstp qword [edx + eax - 8]
fld qword [ecx - 8]
fsub st(1)
fstp qword [eax - 8]
fld qword [esp + 0x48]
fadd qword [edx + ecx - 8]
fstp qword [edx + ecx - 8]
fadd qword [ecx - 8]
fstp qword [ecx - 8]
jne 0x402790
mov ecx, dword [esp + 0x1c]
fstp st(0)
mov edx, dword [esp + 0x10]
lea eax, [ecx*8]
add edi, eax
add ebx, eax
mov eax, dword [ebp + 8]
add edx, ecx
cmp edx, eax
mov dword [esp + 0x10], edx
jb 0x402742
jmp 0x40283b
fstp st(0)
jmp 0x40280f
fstp st(0)
fstp st(0)
jmp 0x402847
mov ebx, dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
fstp st(0)
fstp st(0)
xor edi, edi
mov dword [esp + 0xc], ecx
shl ecx, 1
cmp ecx, esi
mov dword [esp + 0x1c], ecx
jbe 0x4026f1
mov al, byte [ebp + 0xc]
test al, al
je 0x402890
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], edi
fild qword [esp + 0x48]
cmp esi, edi
jbe 0x40288e
mov ecx, dword [ebp + 0x18]
mov eax, ebx
sub ecx, ebx
fld qword [eax + ecx]
fdiv st(1)
add eax, 8
dec esi
fstp qword [eax + ecx - 8]
fld qword [eax - 8]
fdiv st(1)
fstp qword [eax - 8]
jne 0x402877
fstp st(0)
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret