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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x3b4
mov edx, dword [ebp + 8]
fldz
fld st(0)
fst qword [esp + 0x84]
mov eax, dword [edx + 0x1c]
fld qword [0x5c1e80]
mov dword [esp + 0x58], eax
mov eax, dword [edx + 0x14]
push ebx
push esi
xor esi, esi
mov ecx, dword [eax]
fst qword [esp + 0x64]
push edi
mov edi, dword [edx + 0x20]
fxch st(2)
fst qword [esp + 0x98]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x44], edi
mov dword [ecx + 0x18], 0
mov dword [esp + 0x78], esi
cmp dword [ecx + 0x10], esi
jbe 0x521e77
fld1
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x58], eax
mov edx, dword [ecx + 0x14]
add edx, eax
xor eax, eax
mov dword [esp + 0x50], edx
mov dword [esp + 0x60], eax
mov dword [edx + 0x48], 0
cmp dword [edx + 0x14], eax
jbe 0x521e08
xor ebx, ebx
mov dword [esp + 0x90], ebx
mov ecx, dword [edx + 0x1c]
add ecx, ebx
xor ebx, ebx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x88], ebx
cmp dword [ecx + 0x18], ebx
jbe 0x521dde
lea edi, [ecx + 0x28]
mov dword [esp + 0x3c], edi
mov eax, dword [edi - 4]
sub eax, dword [edi - 0xc]
je 0x521dc2
mov eax, dword [edi]
sub eax, dword [edi - 8]
je 0x521dc2
mov eax, dword [ecx + 0x10]
xor esi, esi
imul eax, dword [ecx + 0x14]
mov dword [esp + 0x74], esi
test eax, eax
je 0x521dc2
xor ebx, ebx
mov dword [esp + 0x80], ebx
mov ecx, dword [edi + 8]
xor edi, edi
add ecx, ebx
mov dword [esp + 0x8c], edi
mov dword [esp + 0x48], ecx
mov eax, dword [ecx + 0x10]
imul eax, dword [ecx + 0x14]
test eax, eax
je 0x521d95
xor ebx, ebx
mov dword [esp + 0x84], ebx
mov edx, dword [ecx + 0x18]
xor esi, esi
add edx, ebx
mov ebx, dword [edx + 0x30]
test ebx, ebx
je 0x521d32
mov edi, dword [edx + 8]
lea ecx, [esi + esi*2]
mov eax, dword [edi + ecx*8]
fld qword [edi + ecx*8 + 8]
test esi, esi
je 0x521cdb
sub eax, dword [edi + ecx*8 - 0x18]
fsub qword [edi + ecx*8 - 0x10]
mov dword [esp + 0x68], eax
test eax, eax
je 0x521d11
fild dword [esp + 0x68]
fstp qword [esp + 0x98]
fdiv qword [esp + 0x98]
fcom st(4)
fnstsw ax
test ah, 5
jp 0x521d04
fstp st(4)
fld st(3)
fxch st(4)
fcom st(2)
fnstsw ax
test ah, 0x41
jne 0x521d11
fstp st(2)
jmp 0x521d13
fstp st(0)
inc esi
cmp esi, ebx
jb 0x521cc5
mov edi, dword [esp + 0x8c]
fxch st(3)
fst qword [esp + 0x68]
fxch st(1)
fst qword [esp + 0x98]
fxch st(1)
fxch st(3)
mov ecx, dword [edx + 0x18]
inc edi
sub ecx, dword [edx + 0x10]
mov eax, dword [edx + 0x14]
sub eax, dword [edx + 0xc]
imul ecx, eax
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x84]
add ebx, 0x34
mov dword [esp + 0x8c], edi
mov dword [esp + 0x84], ebx
add dword [eax + 0x18], ecx
mov ecx, dword [edx + 0x18]
sub ecx, dword [edx + 0x10]
mov eax, dword [edx + 0x14]
sub eax, dword [edx + 0xc]
mov edx, dword [esp + 0x50]
imul ecx, eax
add dword [edx + 0x48], ecx
mov ecx, dword [esp + 0x48]
mov eax, dword [ecx + 0x10]
imul eax, dword [ecx + 0x14]
cmp edi, eax
jb 0x521cb4
mov ebx, dword [esp + 0x80]
mov esi, dword [esp + 0x74]
mov ecx, dword [esp + 0x30]
inc esi
mov edi, dword [esp + 0x3c]
add ebx, 0x28
mov dword [esp + 0x74], esi
mov dword [esp + 0x80], ebx
mov eax, dword [ecx + 0x10]
imul eax, dword [ecx + 0x14]
cmp esi, eax
jb 0x521c8a
mov ebx, dword [esp + 0x88]
inc ebx
add edi, 0x24
mov dword [esp + 0x88], ebx
mov dword [esp + 0x3c], edi
cmp ebx, dword [ecx + 0x18]
jb 0x521c55
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x90]
inc eax
add ebx, 0x98
mov dword [esp + 0x60], eax
mov dword [esp + 0x90], ebx
cmp eax, dword [edx + 0x14]
jb 0x521c33
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x78]
mov eax, dword [ebp + 8]
inc esi
mov dword [esp + 0x78], esi
mov eax, dword [eax + 0x18]
mov ecx, dword [eax + 0x18]
mov eax, 1
mov ecx, dword [ecx + ebx + 0x18]
add ebx, 0x34
shl eax, cl
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
fild dword [esp + 0x30]
mov eax, dword [esp + 0x58]
add eax, 0x4c
mov dword [esp + 0x40], ebx
mov dword [esp + 0x58], eax
fstp qword [esp + 0x30]
fld qword [esp + 0x30]
fsub st(1)
fmul st(0), st(0)
fild dword [edx + 0x48]
fstp qword [esp + 0x30]
fmul qword [esp + 0x30]
faddp st(3)
cmp esi, dword [ecx + 0x10]
jb 0x521c0b
mov edx, dword [ebp + 8]
fstp st(1)
mov edi, dword [esp + 0x44]
fstp st(2)
fstp st(1)
fstp qword [esp + 0x90]
jmp 0x521e7d
fstp st(0)
fstp st(1)
fstp st(0)
mov ebx, dword [ebp + 0x18]
test ebx, ebx
je 0x521ebe
imul esi, dword [edx + 0x24], 0x250
mov eax, dword [ecx + 0x18]
add esi, dword [ebx + 0x58]
mov dword [esi + 0x228], eax
fld qword [ecx + 0x20]
fstp qword [esi + 0x230]
mov eax, dword [edi + 8]
shl eax, 3
push eax
call fcn.0050ab30
add esp, 4
mov dword [esi], eax
test eax, eax
jne 0x521ebe
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
cmp dword [edi + 8], esi
jbe 0x522170
fldz
fld qword [esp + 0x68]
fstp qword [esp + 0x58]
fld qword [esp + 0x98]
fstp qword [esp + 0x48]
fcomp dword [edi + esi*4 + 0x14]
fnstsw ax
test ah, 5
jp 0x521f28
fld dword [edi + esi*4 + 0x14]
sub esp, 8
fstp qword [esp]
call sub.MSVCRT.dll_ceil
fnstcw word [esp + 0x44]
movzx eax, word [esp + 0x44]
add esp, 8
or eax, 0xc00
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x14]
fldcw word [esp + 0x30]
fistp qword [esp + 0x30]
mov edi, dword [esp + 0x30]
fldcw word [esp + 0x3c]
cmp edi, eax
jb 0x521f2b
mov edi, eax
jmp 0x521f2b
mov edi, dword [ebp + 0x14]
mov eax, dword [esp + 0x44]
fldz
fstp qword [esp + 0x50]
fld dword [eax + esi*4 + 0x1440]
fld qword [0x591860]
fdiv st(1), st(0)
fxch st(1)
call sub.MSVCRT.dll__CIpow
fdivr qword [esp + 0x90]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x64]
mov ecx, dword [edx + 0x60]
fsubr qword [eax + 0x20]
fstp qword [esp + 0x78]
fldz
test cl, 1
je 0x521f7a
mov eax, dword [esp + 0x44]
fcom dword [eax + esi*4 + 0x14]
fnstsw ax
test ah, 5
jnp 0x521f9b
test cl, 4
je 0x522110
mov eax, dword [esp + 0x44]
fcomp dword [eax + esi*4 + 0x1440]
fnstsw ax
test ah, 5
jp 0x522112
jmp 0x521f9d
fstp st(0)
mov eax, dword [ebp + 8]
push edx
push dword [eax + 0x18]
call fcn.00527970
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x521eb5
fld qword [esp + 0x48]
mov dword [esp + 0x40], pe_nt_image_headers32
jmp 0x521fc6
fstp st(0)
fadd qword [esp + 0x58]
push 0
sub esp, 8
fmul qword [0x58b3d8]
fst qword [esp + 0x3c]
fstp qword [esp]
push esi
push dword [ebp + 8]
call fcn.00520fe0
mov eax, dword [esp + 0x78]
add esp, 0x14
test byte [eax + 0x60], 4
je 0x52207f
movzx eax, word [eax]
cmp eax, 3
jb 0x52204a
cmp eax, 6
ja 0x52204a
push dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
lea eax, [esi + 1]
push 0
push dword [ecx + 0x10]
push dword [ecx]
push dword [ecx + 8]
push dword [ebp + 0x18]
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push dword [esp + 0x54]
push dword [ecx + 0x24]
push ebx
call fcn.00528400
add esp, 0x34
test eax, eax
jne 0x52204a
fld qword [esp + 0x30]
fstp qword [esp + 0x58]
fld qword [esp + 0x48]
fld qword [esp + 0x50]
jmp 0x5220cf
mov eax, dword [esp + 0x2c]
test esi, esi
jne 0x522057
fld qword [eax + 0x28]
jmp 0x522062
fld qword [eax + esi*8 + 0x28]
fadd qword [esp + esi*8 + 0x98]
fcomp qword [esp + 0x78]
fnstsw ax
fld qword [esp + 0x30]
test ah, 5
jnp 0x5220c3
fstp qword [esp + 0x58]
fld qword [esp + 0x48]
fld qword [esp + 0x50]
jmp 0x5220cf
push dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
lea eax, [esi + 1]
push 0
push dword [ecx + 0x10]
push dword [ecx]
push dword [ecx + 8]
push dword [ebp + 0x18]
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push dword [esp + 0x54]
push dword [ecx + 0x24]
push ebx
call fcn.00528400
fld qword [esp + 0x64]
add esp, 0x34
test eax, eax
jne 0x5220c3
fstp qword [esp + 0x58]
fld qword [esp + 0x48]
fld qword [esp + 0x50]
jmp 0x5220cf
fld st(0)
fst qword [esp + 0x48]
fxch st(1)
fst qword [esp + 0x50]
dec dword [esp + 0x40]
jne 0x521fc4
fstp st(1)
fldz
fucomp st(1)
fnstsw ax
test ah, 0x44
jp 0x5220fa
push ebx
fstp st(0)
call fcn.00527d30
fld qword [esp + 0x34]
add esp, 4
mov ebx, dword [ebp + 0x18]
jmp 0x522118
push ebx
fstp qword [esp + 0x34]
call fcn.00527d30
fld qword [esp + 0x34]
add esp, 4
mov ebx, dword [ebp + 0x18]
jmp 0x522118
fstp st(0)
fld qword [0x58bc40]
test ebx, ebx
je 0x52212f
mov eax, dword [ebp + 8]
imul ecx, dword [eax + 0x24], 0x250
mov eax, dword [ebx + 0x58]
mov eax, dword [ecx + eax]
fst qword [eax + esi*8]
push 1
sub esp, 8
fstp qword [esp]
push esi
push dword [ebp + 8]
call fcn.00520fe0
mov eax, dword [esp + 0x40]
add esp, 0x14
test esi, esi
jne 0x522150
fld qword [eax + 0x28]
jmp 0x52215b
fld qword [esp + esi*8 + 0x98]
fadd qword [eax + esi*8 + 0x28]
mov edi, dword [esp + 0x44]
fstp qword [esp + esi*8 + 0xa0]
inc esi
cmp esi, dword [edi + 8]
jb 0x521ec9
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret