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

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
fild dword [esi + 0x38]
push edi
mov edi, dword [esi + 0x3c]
mov dword [esp + 0x18], edi
fidiv dword [esp + 0x18]
fstp qword [esp + 0x20]
fild dword [esi + 0x40]
fidiv dword [esi + 0x44]
fst qword [esp + 0x28]
fld qword [esp + 0x20]
fcomp qword [0x59b860]
fnstsw ax
test ah, 5
jp 0x5054b0
fld qword [0x59b860]
fstp qword [esp + 0x20]
fcom qword [0x59b860]
fnstsw ax
test ah, 5
jp 0x5054c9
fstp st(0)
fld qword [0x59b860]
fst qword [esp + 0x28]
fld qword [esp + 0x20]
call fcn.00558260
mov ecx, eax
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
mov dword [esi + 0x48], ecx
fld qword [esp + 0x20]
fucompp
fnstsw ax
test ah, 0x44
jp 0x5054f2
dec ecx
mov dword [esi + 0x48], ecx
jmp 0x5054ff
inc ecx
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fstp qword [esp + 0x20]
fld st(0)
call fcn.00558260
mov ecx, eax
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
mov dword [esi + 0x50], ecx
fxch st(1)
fucompp
fnstsw ax
test ah, 0x44
jp 0x505524
dec ecx
mov dword [esi + 0x50], ecx
jmp 0x505531
inc ecx
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
fstp qword [esp + 0x28]
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
lea edx, [ecx + ecx + 2]
mov cl, byte [esi + 0x34]
test cl, cl
lea eax, [eax + eax + 2]
mov dword [esi + 0x4c], eax
mov dword [esi + 0x54], edx
je 0x50576c
add eax, 3
and eax, 0xfffffffc
mov dword [esi + 0x4c], eax
cdq
and edx, 3
add eax, edx
sar eax, 2
imul eax, edi
mov edi, dword [sym.imp.MSVCR71.dll_malloc]
shl eax, 3
push eax
call edi
mov dword [esi + 0x70], eax
mov eax, dword [esi + 0x4c]
shl eax, 2
push eax
call edi
mov ecx, dword [esi + 0x4c]
shl ecx, 3
push ecx
mov dword [esp + 0x20], eax
call edi
mov ebp, eax
mov eax, dword [esi + 0x3c]
add esp, 0xc
test eax, eax
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x10], 0
jle 0x505749
fld qword [esp + 0x20]
lea ebx, [ebx]
mov eax, dword [esi + 0x4c]
xor ebx, ebx
xor edi, edi
test eax, eax
jle 0x505635
fild dword [esp + 0x10]
fld qword [0x59b860]
fdiv st(2)
mov eax, dword [esi + 0x48]
mov edx, edi
sub edx, eax
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
fild dword [esi + 0x3c]
fdivr st(3)
fsubp st(1)
fabs
fcom st(3)
fnstsw ax
test ah, 1
jne 0x5055f2
fstp st(0)
fld qword [0x598a28]
jmp 0x5055fc
fld st(1)
fmulp st(1)
fsubr qword [0x59b860]
fld st(1)
fmulp st(1)
fmul qword [0x5c33e8]
fld st(0)
call fcn.00558260
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
mov dword [ecx + edi*4], eax
fsubr st(1)
fstp qword [ebp + edi*8]
mov edx, dword [ecx + edi*4]
mov eax, dword [esi + 0x4c]
add ebx, edx
fstp st(0)
inc edi
cmp edi, eax
jl 0x5055c7
fstp st(0)
fstp st(0)
mov eax, 0x80
sub eax, ebx
test eax, eax
jle 0x505699
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x18], eax
jmp 0x505650
mov eax, dword [esi + 0x4c]
fld qword [0x598a28]
xor edx, edx
xor ecx, ecx
test eax, eax
jle 0x50567b
mov edi, eax
fcom qword [ebp + ecx*8]
fnstsw ax
test ah, 5
jp 0x505676
fstp st(0)
mov edx, ecx
fld qword [ebp + ecx*8]
inc ecx
cmp ecx, edi
jl 0x505663
mov ecx, dword [ebx + edx*4]
fstp st(0)
mov eax, dword [esp + 0x18]
fld qword [0x598a28]
inc ecx
dec eax
mov dword [ebx + edx*4], ecx
fstp qword [ebp + edx*8]
mov dword [esp + 0x18], eax
jne 0x505650
mov eax, dword [esi + 0x4c]
cdq
and edx, 3
add eax, edx
sar eax, 2
xor edi, edi
test eax, eax
jle 0x505733
mov ecx, dword [esp + 0x14]
add ecx, 8
mov eax, dword [ecx + 4]
and eax, 0xffff
cdq
shld edx, eax, 0x10
shl eax, 0x10
mov ebx, eax
mov eax, dword [ecx]
and eax, 0xffff
mov ebp, edx
cdq
or ebx, eax
mov eax, dword [ecx - 4]
or ebp, edx
and eax, 0xffff
cdq
shld ebp, ebx, 0x10
or ebp, edx
shl ebx, 0x10
or ebx, eax
mov eax, dword [ecx - 8]
and eax, 0xffff
cdq
shld ebp, ebx, 0x10
shl ebx, 0x10
or ebx, eax
mov eax, dword [esi + 0x4c]
imul eax, dword [esp + 0x10]
or ebp, edx
cdq
and edx, 3
add eax, edx
mov edx, dword [esi + 0x70]
sar eax, 2
add eax, edi
mov dword [edx + eax*8], ebx
mov dword [edx + eax*8 + 4], ebp
mov eax, dword [esi + 0x4c]
cdq
and edx, 3
add eax, edx
inc edi
sar eax, 2
add ecx, 0x10
cmp edi, eax
jl 0x5056b6
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x3c]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x5055b0
fstp st(0)
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.MSVCR71.dll_free]
push eax
call edi
push ebp
call edi
mov ecx, dword [esi + 0x4c]
mov edi, dword [sym.imp.MSVCR71.dll_malloc]
shl ecx, 1
push ecx
call edi
jmp 0x505923
imul eax, edi
mov edi, dword [sym.imp.MSVCR71.dll_malloc]
shl eax, 3
push eax
call edi
mov edx, dword [esi + 0x4c]
shl edx, 2
push edx
mov dword [esi + 0x70], eax
call edi
mov ebx, eax
mov eax, dword [esi + 0x4c]
shl eax, 3
push eax
call edi
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x3c]
add esp, 0xc
test eax, eax
mov dword [esp + 0x14], 0
jle 0x505900
fld qword [esp + 0x20]
mov eax, dword [esi + 0x4c]
xor ebp, ebp
xor edi, edi
test eax, eax
jle 0x505834
fild dword [esp + 0x14]
fld qword [0x59b860]
fdiv st(2)
mov eax, dword [esi + 0x48]
mov ecx, edi
sub ecx, eax
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
fild dword [esi + 0x3c]
fdivr st(3)
fsubp st(1)
fabs
fcom st(3)
fnstsw ax
test ah, 1
jne 0x5057f2
fstp st(0)
fld qword [0x598a28]
jmp 0x5057fc
fld st(1)
fmulp st(1)
fsubr qword [0x59b860]
fld st(1)
fmulp st(1)
fmul qword [0x5c33e8]
fld st(0)
call fcn.00558260
mov edx, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
mov dword [ebx + edi*4], eax
fsubr st(1)
fstp qword [edx + edi*8]
mov edx, dword [ebx + edi*4]
mov eax, dword [esi + 0x4c]
add ebp, edx
fstp st(0)
inc edi
cmp edi, eax
jl 0x5057c7
fstp st(0)
fstp st(0)
mov eax, 0x80
sub eax, ebp
test eax, eax
jle 0x505896
mov edi, dword [esp + 0x10]
mov dword [esp + 0x18], eax
jmp 0x505850
mov eax, dword [esi + 0x4c]
fld qword [0x598a28]
xor edx, edx
xor ecx, ecx
test eax, eax
jle 0x505879
mov ebp, eax
fcom qword [edi + ecx*8]
fnstsw ax
test ah, 5
jp 0x505874
fstp st(0)
mov edx, ecx
fld qword [edi + ecx*8]
inc ecx
cmp ecx, ebp
jl 0x505863
mov ecx, dword [ebx + edx*4]
fstp st(0)
mov eax, dword [esp + 0x18]
fld qword [0x598a28]
inc ecx
dec eax
mov dword [ebx + edx*4], ecx
fstp qword [edi + edx*8]
mov dword [esp + 0x18], eax
jne 0x505850
mov eax, dword [esi + 0x4c]
xor ecx, ecx
test eax, eax
jle 0x5058ea
nop
mov eax, dword [ebx + ecx*4]
and eax, 0xffff
cdq
mov edi, eax
mov ebp, edx
shld ebp, edi, 0x10
shl edi, 0x10
or edi, eax
or ebp, edx
shld ebp, edi, 0x10
shl edi, 0x10
or edi, eax
or ebp, edx
shld ebp, edi, 0x10
shl edi, 0x10
or edi, eax
mov eax, dword [esi + 0x4c]
imul eax, dword [esp + 0x14]
or ebp, edx
mov edx, dword [esi + 0x70]
add eax, ecx
mov dword [edx + eax*8], edi
mov dword [edx + eax*8 + 4], ebp
mov eax, dword [esi + 0x4c]
inc ecx
cmp ecx, eax
jl 0x5058a0
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x3c]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x5057b0
fstp st(0)
mov edi, dword [sym.imp.MSVCR71.dll_free]
push ebx
call edi
mov eax, dword [esp + 0x14]
push eax
call edi
mov ecx, dword [esi + 0x4c]
shl ecx, 3
push ecx
call dword [sym.imp.MSVCR71.dll_malloc]
mov edi, dword [sym.imp.MSVCR71.dll_malloc]
mov edx, dword [esi + 0x44]
imul edx, dword [esi + 0x54]
shl edx, 3
add esp, 0xc
push edx
mov dword [esi + 0x78], eax
call edi
mov dword [esi + 0x74], eax
mov eax, dword [esi + 0x54]
shl eax, 2
push eax
call edi
mov ecx, dword [esi + 0x54]
shl ecx, 3
push ecx
mov ebp, eax
call edi
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x44]
add esp, 0xc
test eax, eax
mov dword [esp + 0x14], 0
jle 0x505ac2
fld qword [esp + 0x28]
jmp 0x505970
mov eax, dword [esi + 0x54]
xor ebx, ebx
xor edi, edi
test eax, eax
jle 0x5059f6
fild dword [esp + 0x14]
fld qword [0x59b860]
fdiv st(2)
mov eax, dword [esi + 0x50]
mov edx, edi
sub edx, eax
mov dword [esp + 0x1c], edx
fild dword [esp + 0x1c]
fild dword [esi + 0x44]
fdivr st(3)
fsubp st(1)
fabs
fcom st(3)
fnstsw ax
test ah, 1
jne 0x5059b2
fstp st(0)
fld qword [0x598a28]
jmp 0x5059bc
fld st(1)
fmulp st(1)
fsubr qword [0x59b860]
fld st(1)
fmulp st(1)
fmul qword [0x5c33e8]
fld st(0)
call fcn.00558260
mov dword [esp + 0x1c], eax
fild dword [esp + 0x1c]
mov dword [ebp + edi*4], eax
mov eax, dword [esp + 0x10]
fsubr st(1)
fstp qword [eax + edi*8]
mov edx, dword [ebp + edi*4]
mov eax, dword [esi + 0x54]
add ebx, edx
fstp st(0)
inc edi
cmp edi, eax
jl 0x505987
fstp st(0)
fstp st(0)
mov eax, 0x80
sub eax, ebx
test eax, eax
jle 0x505a58
mov edi, dword [esp + 0x10]
mov dword [esp + 0x18], eax
lea esp, [esp]
mov eax, dword [esi + 0x54]
fld qword [0x598a28]
xor edx, edx
xor ecx, ecx
test eax, eax
jle 0x505a39
mov ebx, eax
fcom qword [edi + ecx*8]
fnstsw ax
test ah, 5
jp 0x505a34
fstp st(0)
mov edx, ecx
fld qword [edi + ecx*8]
inc ecx
cmp ecx, ebx
jl 0x505a23
mov ecx, dword [ebp + edx*4]
fstp st(0)
mov eax, dword [esp + 0x18]
fld qword [0x598a28]
inc ecx
dec eax
mov dword [ebp + edx*4], ecx
fstp qword [edi + edx*8]
mov dword [esp + 0x18], eax
jne 0x505a10
mov eax, dword [esi + 0x54]
xor ecx, ecx
test eax, eax
jle 0x505aac
mov eax, dword [ebp + ecx*4]
and eax, 0xffff
cdq
mov ebx, edx
mov edi, eax
shld ebx, edi, 0x10
shl edi, 0x10
or edi, eax
or ebx, edx
shld ebx, edi, 0x10
shl edi, 0x10
or edi, eax
or ebx, edx
shld ebx, edi, 0x10
or ebx, edx
mov edx, dword [esi + 0x54]
imul edx, dword [esp + 0x14]
shl edi, 0x10
or edi, eax
mov eax, dword [esi + 0x74]
add edx, ecx
mov dword [eax + edx*8], edi
mov dword [eax + edx*8 + 4], ebx
mov eax, dword [esi + 0x54]
inc ecx
cmp ecx, eax
jl 0x505a61
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x44]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x505970
fstp st(0)
mov edi, dword [sym.imp.MSVCR71.dll_free]
push ebp
call edi
mov ecx, dword [esp + 0x14]
push ecx
call edi
mov edi, dword [esi + 0x58]
mov edx, dword [esi + 0x5c]
add edx, edi
imul edx, dword [esi + 0x54]
mov edi, dword [sym.imp.MSVCR71.dll_malloc]
shl edx, 2
push edx
call edi
mov dword [esi + 0x7c], eax
mov eax, dword [esi + 0x54]
shl eax, 2
push eax
call edi
add esp, 0x10
pop edi
mov dword [esi + 0x80], eax
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x20
ret