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

Disassembly:
sub esp, 0xd8
mov eax, dword [edx]
mov ecx, dword [0x85ff50]
mov ecx, dword [ecx + 0x34]
push ebx
mov dword [esp + 0x9c], eax
and eax, 0xffff
push ebp
mov ebp, dword [esp + 0xe4]
mov ebx, dword [ebp + 4]
fld dword [ebx + 8]
lea eax, [eax + eax*2]
push esi
push edi
mov edi, dword [ecx + eax*4 + 8]
mov eax, dword [ebp]
and eax, 0xffff
lea eax, [eax + eax*2]
mov esi, dword [ecx + eax*4 + 8]
mov ecx, dword [edx + 4]
fmul dword [ecx + 8]
mov eax, dword [ecx + 0x74]
test eax, eax
mov byte [esp + 0x13], 0
fsqrt
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0xd8], eax
fstp dword [esp + 0xb8]
jle 0x509876
mov ecx, dword [ecx + 0x78]
xor eax, eax
add edx, 8
mov dword [esp + 0xc8], edx
mov edx, dword [ebx + 0x74]
mov dword [esp + 0x98], ecx
mov dword [esp + 0x70], edx
nop
mov edx, dword [esp + 0x98]
shl eax, 7
add eax, edx
mov ebx, eax
mov eax, dword [esp + 0xc8]
push eax
lea edx, [ebx + 0x38]
lea eax, [esp + 0x84]
call fcn.004cbe20
mov eax, dword [esp + 0x74]
add esp, 4
xor edx, edx
test eax, eax
jle 0x509724
mov ecx, dword [ebp + 4]
mov ecx, dword [ecx + 0x78]
xor eax, eax
mov edi, edi
shl eax, 7
fld dword [eax + ecx + 0x68]
add eax, ecx
fadd dword [ebx + 0x68]
fstp dword [esp + 0x6c]
fld dword [eax + 0x38]
fld dword [eax + 0x3c]
fld dword [eax + 0x40]
mov eax, dword [ebp + 8]
cmp eax, 0x3f800000
je 0x5093c4
fxch st(2)
fmul dword [ebp + 8]
fxch st(2)
fxch st(1)
fmul dword [ebp + 8]
fxch st(1)
fmul dword [ebp + 8]
fld st(0)
fmul dword [ebp + 0x24]
fld st(2)
fmul dword [ebp + 0x18]
faddp st(1)
fld st(3)
fmul dword [ebp + 0xc]
faddp st(1)
fadd dword [ebp + 0x30]
fstp dword [esp + 0xdc]
fld st(0)
fmul dword [ebp + 0x28]
fld st(2)
fmul dword [ebp + 0x1c]
faddp st(1)
fld st(3)
fmul dword [ebp + 0x10]
faddp st(1)
fadd dword [ebp + 0x34]
fstp dword [esp + 0xe0]
fmul dword [ebp + 0x2c]
fxch st(1)
fmul dword [ebp + 0x20]
faddp st(1)
fxch st(1)
fmul dword [ebp + 0x14]
faddp st(1)
fadd dword [ebp + 0x38]
fld dword [esp + 0xdc]
fsub dword [esp + 0x80]
fstp dword [esp + 0x14]
fld dword [esp + 0xe0]
fsub dword [esp + 0x84]
fstp dword [esp + 0x18]
fsub dword [esp + 0x88]
fst dword [esp + 0x1c]
fmul dword [esp + 0x1c]
fld dword [esp + 0x18]
fmul dword [esp + 0x18]
faddp st(1)
fld dword [esp + 0x14]
fmul dword [esp + 0x14]
faddp st(1)
fsqrt
fld st(0)
fabs
fcomp qword [0x672c10]
fnstsw ax
test ah, 5
jnp 0x509496
fld dword [0x672afc]
fdiv st(1)
fld dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x14]
fld dword [esp + 0x18]
fmul st(1)
fstp dword [esp + 0x18]
fld dword [esp + 0x1c]
fmul st(1)
fstp dword [esp + 0x1c]
fstp st(0)
jmp 0x50949e
fstp st(0)
fld dword [0x672af8]
fcom dword [esp + 0x6c]
fnstsw ax
test ah, 5
jp 0x509714
fcom dword [0x672af8]
fnstsw ax
test ah, 0x41
jne 0x509714
fsubr dword [esp + 0x6c]
fmul dword [0x672af4]
fld dword [0x69c53c]
fdiv dword [0x69c548]
fmul st(1)
fmul dword [esp + 0xb8]
fadd st(0), st(0)
fld st(0)
fchs
fld dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x38]
fld dword [esp + 0x18]
fmul st(1)
fstp dword [esp + 0x3c]
fld dword [esp + 0x1c]
fmul st(1)
fstp dword [esp + 0x40]
fstp st(0)
fld dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x74]
fld dword [esp + 0x18]
fmul st(1)
fstp dword [esp + 0x78]
fmul dword [esp + 0x1c]
fld dword [ebx + 0x68]
fsub st(2)
fld dword [esp + 0x14]
fmul st(1)
fadd dword [esp + 0x80]
fld dword [esp + 0x18]
fmul st(2)
fadd dword [esp + 0x84]
fstp dword [esp + 0x90]
fld dword [esp + 0x1c]
fmul st(2)
fadd dword [esp + 0x88]
fstp dword [esp + 0x94]
fld st(0)
fsub dword [edi + 0x5c]
fstp dword [esp + 0x60]
fld dword [esp + 0x90]
fsub dword [edi + 0x60]
fstp dword [esp + 0x64]
fld dword [esp + 0x94]
fsub dword [edi + 0x64]
fstp dword [esp + 0x68]
fsub dword [esi + 0x5c]
fstp st(1)
fld dword [esp + 0x90]
fsub dword [esi + 0x60]
fld dword [esp + 0x94]
fsub dword [esi + 0x64]
fld dword [esp + 0x64]
fmul dword [esp + 0x40]
fld dword [esp + 0x68]
fmul dword [esp + 0x3c]
fsubp st(1)
fstp dword [esp + 0x9c]
mov eax, dword [esp + 0x9c]
fld dword [esp + 0x68]
mov dword [esp + 0xbc], eax
fmul dword [esp + 0x38]
fld dword [esp + 0x40]
fmul dword [esp + 0x60]
fsubp st(1)
fstp dword [esp + 0xa0]
mov eax, dword [esp + 0xa0]
fld dword [esp + 0x3c]
mov dword [esp + 0xc0], eax
fmul dword [esp + 0x60]
fld dword [esp + 0x64]
fmul dword [esp + 0x38]
fsubp st(1)
fstp dword [esp + 0xa4]
mov eax, dword [esp + 0xa4]
fld st(1)
mov dword [esp + 0xc4], eax
fmul st(4)
fld st(1)
mov byte [esp + 0x13], 1
fmul dword [esp + 0x78]
fsubp st(1)
fstp dword [esp + 0xac]
mov eax, dword [esp + 0xac]
mov dword [esp + 0xcc], eax
fmul dword [esp + 0x74]
fld st(3)
fmul st(3)
fsubp st(1)
fstp dword [esp + 0xb0]
mov eax, dword [esp + 0xb0]
fld dword [esp + 0x78]
mov dword [esp + 0xd0], eax
fmul st(2)
fxch st(1)
fmul dword [esp + 0x74]
fsubp st(1)
fstp dword [esp + 0xb4]
mov eax, dword [esp + 0xb4]
mov dword [esp + 0xd4], eax
fstp st(0)
fld dword [esp + 0x38]
fadd dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [esp + 0x3c]
fadd dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esp + 0x40]
fadd dword [esp + 0x28]
fstp dword [esp + 0x28]
fld dword [esp + 0x74]
fadd dword [esp + 0x2c]
fstp dword [esp + 0x2c]
fld dword [esp + 0x78]
fadd dword [esp + 0x30]
fstp dword [esp + 0x30]
fadd dword [esp + 0x34]
fstp dword [esp + 0x34]
fstp st(0)
fld dword [esp + 0xbc]
fadd dword [esp + 0x50]
fstp dword [esp + 0x50]
fld dword [esp + 0xc0]
fadd dword [esp + 0x54]
fstp dword [esp + 0x54]
fld dword [esp + 0xc4]
fadd dword [esp + 0x58]
fstp dword [esp + 0x58]
fld dword [esp + 0xcc]
fadd dword [esp + 0x44]
fstp dword [esp + 0x44]
fld dword [esp + 0xd0]
fadd dword [esp + 0x48]
fstp dword [esp + 0x48]
fld dword [esp + 0xd4]
fadd dword [esp + 0x4c]
fstp dword [esp + 0x4c]
jmp 0x509716
fstp st(0)
inc edx
movsx eax, dx
cmp eax, dword [esp + 0x70]
jl 0x509390
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0xd8]
inc eax
mov dword [esp + 0x5c], eax
movsx eax, ax
cmp eax, ecx
jl 0x509350
mov bl, byte [esp + 0x13]
test bl, bl
je 0x509869
cmp dword [edi + 4], 1
jne 0x509761
mov eax, dword [esp + 0xa8]
call fcn.0056d0b0
cmp al, 1
jne 0x5097d1
fld dword [esp + 0x20]
fadd dword [edi + 0x508]
fstp dword [edi + 0x508]
fld dword [esp + 0x24]
fadd dword [edi + 0x50c]
fstp dword [edi + 0x50c]
fld dword [esp + 0x28]
fadd dword [edi + 0x510]
fstp dword [edi + 0x510]
fld dword [esp + 0x50]
fadd dword [edi + 0x514]
fstp dword [edi + 0x514]
fld dword [esp + 0x54]
fadd dword [edi + 0x518]
fstp dword [edi + 0x518]
fld dword [esp + 0x58]
fadd dword [edi + 0x51c]
fstp dword [edi + 0x51c]
mov eax, dword [edi + 0x10]
and eax, 0xffffffdf
mov dword [edi + 0x10], eax
mov byte [edi + 0x524], 1
mov ecx, dword [ebp + 4]
fld dword [ecx]
fcomp dword [0x672af8]
fnstsw ax
test ah, 0x41
je 0x509869
cmp dword [esi + 4], 1
jne 0x5097f9
mov eax, dword [ebp]
call fcn.0056d0b0
cmp al, 1
jne 0x509869
fld dword [esp + 0x2c]
fadd dword [esi + 0x508]
fstp dword [esi + 0x508]
fld dword [esp + 0x30]
fadd dword [esi + 0x50c]
fstp dword [esi + 0x50c]
fld dword [esp + 0x34]
fadd dword [esi + 0x510]
fstp dword [esi + 0x510]
fld dword [esp + 0x44]
fadd dword [esi + 0x514]
fstp dword [esi + 0x514]
fld dword [esp + 0x48]
fadd dword [esi + 0x518]
fstp dword [esi + 0x518]
fld dword [esp + 0x4c]
fadd dword [esi + 0x51c]
fstp dword [esi + 0x51c]
mov eax, dword [esi + 0x10]
and eax, 0xffffffdf
mov dword [esi + 0x10], eax
mov byte [esi + 0x524], 1
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0xd8
ret
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd8
ret