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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54c
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov eax, edi
mov ebx, ecx
cdq
sub eax, edx
mov dword [esp + 0x54], ebx
sar eax, 1
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], eax
cmp dword [ebp + 0x20], 0x14
jle 0x47ce79
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28
mov eax, dword [ebp + 0x24]
xor edx, edx
test eax, eax
mov eax, dword [ebp + 0x28]
setne dl
inc edx
neg eax
sbb eax, eax
xor ecx, ecx
and eax, 3
mov dword [esp + 0x40], edx
inc eax
mov dword [esp + 0x28], ecx
test edx, edx
mov dword [esp + 0x34], eax
jle 0x47d322
test ecx, ecx
je 0x47cf15
test edi, edi
jle 0x47cf15
mov edx, dword [ebp + 8]
lea ecx, [edi*4]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x24], edi
lea eax, [esp + ecx + 0x354]
mov dword [esp + 0x10], eax
jmp 0x47ced0
mov ecx, dword [esp + 0xc]
mov eax, ecx
mov esi, edx
lea edi, [esp + 0x358]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov esi, dword [ebp + 0xc]
mov edi, dword [ecx]
sub ecx, 4
mov dword [eax], edi
add eax, 4
dec esi
jne 0x47cef0
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x24]
add edx, ecx
dec eax
mov dword [esp + 0x24], eax
jne 0x47cecc
mov edi, dword [ebp + 0xc]
mov eax, dword [esp + 0x34]
test eax, eax
mov dword [esp + 0x14], 0
jle 0x47d30d
mov eax, edi
imul eax, edi
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x47cf63
fild dword [esp + 0x14]
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x18]
fmul dword [0x51c8b8]
mov edx, dword [ecx]
push esi
push edx
push ecx
fsubr dword [eax]
mov ecx, dword [ebp + 8]
fchs
fstp dword [esp]
push edi
push ecx
mov ecx, ebx
call fcn.0047cb20
jmp 0x47cf8f
fild dword [esp + 0x14]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x14]
push edx
mov edx, dword [ebp + 0x10]
fmul dword [0x51c8b8]
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
push ecx
push ecx
fsubr dword [edx]
mov ecx, ebx
fstp dword [esp]
push edi
push eax
call fcn.0047cb20
mov esi, dword [ebp + 0x18]
mov ecx, dword [esp + 0x48]
mov eax, esi
fld dword [0x51c7ec]
test ecx, ecx
jle 0x47cfa9
mov edx, ecx
fadd dword [eax]
add eax, 4
dec edx
jne 0x47cfa1
fild dword [esp + 0x48]
test ecx, ecx
mov eax, esi
fdivr st(1)
fstp dword [esp + 0x10]
fstp st(0)
jle 0x47cfca
fld dword [eax]
fsub dword [esp + 0x10]
add eax, 4
dec ecx
fstp dword [eax - 4]
jne 0x47cfbb
lea ecx, [esp + 0x158]
push ecx
push edi
call fcn.0047bc60
add esp, 8
lea ecx, [esp + 0x158]
test edi, edi
jle 0x47d013
mov dword [esp + 0xc], edi
lea eax, [esp + 0x158]
mov edx, edi
fld dword [esi]
fmul dword [eax]
add eax, 4
add esi, 4
dec edx
fmul dword [ecx]
fstp dword [esi - 4]
jne 0x47cff3
mov eax, dword [esp + 0xc]
add ecx, 4
dec eax
mov dword [esp + 0xc], eax
jne 0x47cfea
lea edx, [edi + 1]
mov dword [esp + 0x10], edx
fldln2
fild dword [esp + 0x10]
fyl2x
fldln2
fld qword [0x51c880]
fyl2x
fdivp st(1)
call fcn.004c22c8
mov edx, dword [ebp + 0x18]
mov esi, eax
lea eax, [ebx + 0x420]
lea ecx, [ebx + 0x20]
push eax
push ecx
push 0
push esi
push edx
call fcn.00479e00
add esp, 0x14
lea eax, [esp + 0x108]
lea ecx, [esp + 0x68]
lea edx, [esp + 0xb8]
push eax
mov eax, dword [ebp + 0x20]
push ecx
mov ecx, dword [ebp + 0x1c]
push edx
mov edx, dword [ebp + 0x18]
push eax
push esi
push edi
push ecx
push edx
mov ecx, ebx
call fcn.0047bcd0
mov eax, dword [ebp + 0x20]
xor esi, esi
test eax, eax
fstp st(0)
mov dword [esp + 0x10], esi
jle 0x47d2f6
fild dword [ebp + 0xc]
fild dword [esp + 0x5c]
fild dword [esp + 0x58]
fxch st(2)
fst dword [esp + 0x2c]
fmul dword [0x51c830]
fxch st(1)
fstp dword [esp + 0x44]
fxch st(1)
fstp dword [esp + 0x38]
fstp dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x47d0d0
mov eax, dword [ebp + 0x10]
fild dword [esp + 0x14]
fld dword [eax]
fchs
fxch st(1)
fmul dword [0x51c8bc]
jmp 0x47d0e1
mov ecx, dword [ebp + 0x10]
fild dword [esp + 0x14]
fld dword [ecx]
fxch st(1)
fmul dword [0x51c8b8]
fsubp st(1)
lea eax, [esi*4]
fstp dword [esp + 0x30]
fld dword [esp + 0x3c]
fsub dword [esp + eax + 0xb8]
fld dword [esp + 0x3c]
fsub dword [esp + eax + 0x68]
fxch st(1)
fsub dword [esp + 0x3c]
fxch st(1)
fsub dword [esp + 0x3c]
fld st(1)
fcomp dword [0x51c8c0]
fnstsw ax
test ah, 1
je 0x47d124
fxch st(1)
fadd dword [esp + 0x2c]
fxch st(1)
fcom dword [0x51c8c0]
fnstsw ax
test ah, 1
je 0x47d135
fadd dword [esp + 0x2c]
fld st(1)
fcomp dword [esp + 0x44]
fnstsw ax
test ah, 0x41
jne 0x47d14a
fxch st(1)
fsub dword [esp + 0x2c]
fxch st(1)
fcom dword [esp + 0x44]
fnstsw ax
test ah, 0x41
jne 0x47d159
fsub dword [esp + 0x2c]
fld dword [esp + 0x30]
fmul qword [0x51c7d8]
fxch st(2)
fadd dword [esp + 0x38]
fxch st(2)
mov ecx, dword [ebx + 0x1c]
lea edx, [esp + 0x4c]
lea eax, [esp + 0x50]
push edx
fst qword [esp + 0x1c]
fld qword [esp + 0x1c]
fxch st(1)
fcos
mov edx, dword [ebp + 0x2c]
push eax
push edx
push 2
lea eax, [ecx + 0xaf4]
push 1
push eax
mov eax, dword [ebp + 0x14]
lea edx, [esp + 0x7c]
lea esi, [esp + 0x78]
fxch st(1)
fsin
fxch st(1)
fst dword [esp + 0x30]
fxch st(1)
fst dword [esp + 0x30]
fxch st(1)
fdiv dword [eax]
fxch st(1)
fdiv dword [eax]
fxch st(2)
fadd dword [esp + 0x50]
fxch st(1)
fst dword [esp + 0x3c]
fxch st(2)
fst dword [esp + 0x24]
fld dword [esp + 0x24]
fxch st(4)
fstp dword [esp + 0x30]
fxch st(2)
fmul dword [esp + 0x30]
fld dword [esp + 0x3c]
fxch st(4)
fmul dword [esp + 0x30]
fxch st(2)
fst dword [esp + 0x30]
fxch st(3)
fchs
fxch st(1)
fsubr dword [esp + 0x50]
fxch st(2)
fsubr dword [esp + 0x50]
fxch st(4)
fmul dword [esp + 0x30]
fxch st(1)
fstp dword [esp + 0x30]
fxch st(2)
fmul dword [esp + 0x30]
fld dword [esp + 0x24]
fld dword [esp + 0x3c]
fstp dword [ebx + 0x828]
fld dword [esp + 0x30]
fxch st(1)
fstp dword [ebx + 0x82c]
fld dword [esp + 0x3c]
fxch st(1)
fstp dword [ebx + 0x830]
fxch st(1)
fsubp st(2)
fxch st(2)
fsubp st(3)
fxch st(1)
fstp dword [ebx + 0x834]
fstp dword [ebx + 0x820]
fstp dword [ebx + 0x824]
mov eax, dword [ecx + 0xb58]
mov edi, dword [ecx + 8]
mov ebx, dword [ecx + 4]
push eax
push edx
mov edx, dword [ebp + 8]
push esi
push edi
push ebx
push edx
call fcn.0047e000
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov ebx, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, dword [ebx + 0x1c]
push esi
push edi
push edx
mov edi, eax
push 0
mov dword [esp + 0x30], edi
call fcn.004727f0
test edi, edi
je 0x47d2e3
mov eax, dword [esp + 0x28]
test eax, eax
je 0x47d2b5
fld dword [esp + 0x30]
mov edx, dword [ebp + 0x10]
mov word [ebx + 0x838], 1
fchs
fstp dword [edx]
jmp 0x47d2c7
mov ecx, dword [ebp + 0x10]
mov eax, dword [esp + 0x30]
mov word [ebx + 0x838], 0
mov dword [ecx], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov esi, dword [ebp + 0x20]
mov dword [eax], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x28], edx
mov eax, dword [ebp + 0x20]
inc esi
cmp esi, eax
mov dword [esp + 0x10], esi
jl 0x47d0b3
mov edi, dword [ebp + 0xc]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x47cf2e
mov eax, ecx
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x40]
inc ecx
cmp ecx, edx
mov dword [esp + 0x28], ecx
jl 0x47cea5
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28