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

Disassembly:
push ebx
push esi
push edi
push ebp
sub esp, 0xa8
cmp dword [esp + 0xc0], 2
fldz
fldz
mov ebx, dword [esp + 0xc4]
jge 0x539820
fcompp
add esp, 0xa8
pop ebp
pop edi
pop esi
pop ebx
ret
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x48], eax
fild dword [esp + 0x48]
fdivr dword [0x694dec]
fstp dword [esp + 0x18]
fld dword [esp + 0x18]
fcos
fnstsw ax
test eax, 0x400
je 0x53984f
call fcn.00642920
fcos
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fstp st(2)
fld dword [0x694dd8]
fsub st(2)
fdivr dword [0x694df0]
fsqrt
fstp dword [esp + 0x48]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x3c], eax
fld dword [ebx + 8]
fstp st(1)
fld dword [ebx + 4]
fstp st(2)
fld dword [ebx]
fstp dword [esp + 0x9c]
fld st(1)
lea eax, [esp + 0x9c]
lea edx, [esp + 0x9c]
fstp dword [esp + 0xa0]
fst dword [esp + 0xa4]
fcompp
push 0x7e4ea8
push 1
push edx
push eax
call fcn.00647160
fldz
fldz
fld dword [esp + 0xb0]
fstp st(2)
add esp, 0x10
fld st(1)
fadd dword [esp + 0x3c]
fcomp dword [0x978534]
fnstsw ax
and ah, 5
cmp ah, 1
jne 0x5398e3
xor al, al
jmp 0x5399a2
fld st(1)
fsub dword [esp + 0x3c]
fcomp dword [0xa10678]
fnstsw ax
test ah, 0x45
jne 0x539900
xor al, al
jmp 0x5399a2
fld st(1)
fmul dword [0x7e4f44]
fld dword [esp + 0x9c]
fmul dword [0x7e4f40]
faddp st(1)
fcomp dword [esp + 0x3c]
fnstsw ax
test ah, 0x45
jne 0x539926
xor al, al
jmp 0x5399a2
fld st(1)
fmul dword [0x7e4f50]
fld dword [esp + 0x9c]
fmul dword [0x7e4f4c]
faddp st(1)
fcomp dword [esp + 0x3c]
fnstsw ax
test ah, 0x45
jne 0x539950
xor al, al
jmp 0x5399a2
fld dword [esp + 0xa4]
fst st(1)
fmul dword [0x7e4f60]
fld st(2)
fmul dword [0x7e4f5c]
faddp st(1)
fcomp dword [esp + 0x3c]
fnstsw ax
test ah, 0x45
jne 0x539978
xor al, al
jmp 0x5399a2
fld st(0)
fmul dword [0x7e4f6c]
fld st(2)
fmul dword [0x7e4f68]
faddp st(1)
fcomp dword [esp + 0x3c]
fnstsw ax
test ah, 0x45
jne 0x5399a0
xor al, al
jmp 0x5399a2
mov al, 1
test al, al
je 0x539f97
fcompp
call fcn.004bc120
add eax, 0x34
fldz
fldz
fld dword [ebx + 4]
fsub dword [eax + 4]
fstp st(2)
fld dword [ebx]
fsub dword [eax]
fstp st(1)
fld st(1)
fstp st(2)
fld st(1)
fmul st(0)
fld st(1)
fmul st(0)
faddp st(1)
fsqrt
fstp dword [esp + 0x48]
mov eax, dword [esp + 0x48]
fcompp
mov dword [esp + 0x40], eax
call fcn.004bc1e0
test eax, eax
je 0x539a80
call fcn.004bc1e0
fld dword [eax + 0x74]
fstp dword [esp + 0x38]
call fcn.004bc1e0
fld dword [eax + 0x74]
fmul dword [esp + 0x38]
fstp dword [esp + 0x44]
call fcn.004bc1e0
fld dword [eax + 0x70]
fstp dword [esp + 0x34]
call fcn.004bc1e0
fldz
fld dword [eax + 0x70]
fmul dword [esp + 0x34]
fadd dword [esp + 0x44]
fsqrt
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fstp st(1)
fsub dword [0x694dd4]
fadd dword [0x694dd8]
fld dword [0x694dd8]
fcomp st(1)
fnstsw ax
test ah, 0x45
jne 0x539a5a
fld dword [0x694dd8]
fstp st(1)
fld dword [0x694dd0]
fcomp st(1)
fnstsw ax
and ah, 5
cmp ah, 1
jne 0x539a74
fld dword [0x694dd0]
fstp st(1)
fst dword [esp + 0x30]
jmp 0x539f90
fld dword [0x694dd8]
fstp dword [esp + 0x30]
fld dword [0x694ddc]
fmul dword [esp + 0x30]
fcomp dword [esp + 0x40]
fnstsw ax
test ah, 0x45
jne 0x539ab0
add esp, 0xa8
pop ebp
pop edi
pop esi
pop ebx
ret
push 0
push 0xffffffffffffffff
push dword [esp + 0x44]
push ebx
call fcn.0052fbd0
add esp, 0x10
test al, al
jne 0x539ad0
add esp, 0xa8
pop ebp
pop edi
pop esi
pop ebx
ret
xor ebp, ebp
cmp dword [esp + 0xc0], 0
mov dword [esp + 0x14], 0
jle 0x539e6c
call fcn.006499f0
mov edi, eax
call fcn.006499f0
mov esi, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x48], eax
and edi, 0xffff
fldz
fldz
fldz
fild dword [esp + 0x48]
mov dword [esp + 0x48], edi
fmul dword [esp + 0x18]
fild dword [esp + 0x48]
fmul dword [0x694de4]
fmul dword [0x694df4]
fadd dword [0x694df8]
fmul dword [esp + 0x18]
faddp st(1)
fstp st(3)
fld st(2)
fcos
fnstsw ax
test eax, 0x400
je 0x539b48
call fcn.00642920
fcos
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
and esi, 0xffff
mov dword [esp + 0x48], esi
fstp st(2)
fild dword [esp + 0x48]
fmul dword [0x694de4]
fmul dword [0x694df4]
fadd dword [0x694df8]
fmul dword [esp + 0x3c]
fadd dword [esp + 0x3c]
fst st(1)
fmul st(2)
fstp dword [esp + 0x1c]
fld st(2)
fsin
fnstsw ax
test eax, 0x400
je 0x539b96
call fcn.00642920
fsin
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fstp st(3)
fld st(0)
fmul st(3)
fstp dword [esp + 0x20]
fld dword [0x694dd8]
fadd dword [ebx + 8]
lea eax, [esp + 0x77]
push eax
push eax
fstp dword [esp]
fld dword [ebx + 4]
fadd dword [esp + 0x28]
push eax
fstp dword [esp]
fld dword [ebx]
fadd dword [esp + 0x28]
push eax
fstp dword [esp]
fcompp
fstp st(0)
call fcn.004d53a0
fadd dword [0x694dd8]
add esp, 0x10
cmp byte [esp + 0x77], 0
fstp dword [esp + 0x24]
je 0x539e57
fldz
fldz
fld dword [ebx + 8]
fstp st(2)
fld st(1)
fcomp dword [esp + 0x24]
fnstsw ax
test ah, 0x45
jne 0x539c10
fld st(1)
jmp 0x539c14
fld dword [esp + 0x24]
fstp st(1)
fld dword [ebx + 4]
fadd dword [esp + 0x20]
cmp dword [esp + 0x14], 0
fstp st(2)
fld dword [ebx]
fadd dword [esp + 0x1c]
fstp dword [esp + 0x78]
fld st(1)
fstp dword [esp + 0x7c]
fst dword [esp + 0x80]
jne 0x539c58
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], edx
mov eax, dword [esp + 0xbc]
fcompp
add eax, 0xfffffff9
push eax
call fcn.004eed20
pop ecx
mov ecx, dword [eax*4 + 0x92d4c8]
mov dword [esp + 4], eax
mov edi, dword [ecx]
call dword [edi + 0x14]
test eax, eax
je 0x539e57
mov dword [esp + 0x84], 0
lea eax, [esp + 0x84]
push eax
mov eax, dword [esp + 8]
mov eax, dword [eax*4 + 0x92d4c8]
mov dword [esp + 0x8c], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x94], 0
mov esi, dword [eax + 0x1c]
lea eax, [esp + 0x7c]
push 6
push dword [esi + 0xc]
push eax
call fcn.0052fbd0
mov byte [esp + 0x20], 0
add esp, 0x10
xor edi, edi
mov ecx, dword [esp + edi*4 + 0x84]
test ecx, ecx
je 0x539d21
xor edx, edx
xor al, al
test ebp, ebp
jle 0x539d16
cmp ecx, dword [esp + edx*4 + 0x54]
jne 0x539d11
mov al, 1
jmp 0x539d16
inc edx
cmp edx, ebp
jl 0x539d07
test al, al
jne 0x539d21
mov byte [esp + 0x10], 1
jmp 0x539d27
inc edi
cmp edi, 6
jl 0x539cf4
cmp dword [esp + 0x14], 0
jne 0x539d32
mov cl, 1
jmp 0x539d54
lea eax, [esp + 0x78]
lea ecx, [esp + 0x68]
push 0
push 0
push 0
push 0
push 0
push 0
push 1
push ecx
push eax
call fcn.004da560
add esp, 0x24
mov cl, al
cmp dword [esp + 0x14], 0
fldz
jne 0x539d61
mov dl, 1
jmp 0x539da4
fld dword [esp + 0x80]
fsub dword [esp + 0x70]
fabs
fstp dword [esp + 0x48]
fld dword [esp + 0x48]
fst st(1)
fcomp dword [0x694dd8]
fnstsw ax
and ah, 5
cmp ah, 1
jne 0x539d90
mov esi, 1
jmp 0x539d92
xor esi, esi
xor eax, eax
xor edx, edx
test esi, esi
jne 0x539d9b
inc eax
test al, al
jne 0x539da4
mov edx, 1
cmp byte [esp + 0x10], 0
jne 0x539fa0
test cl, cl
je 0x539fa7
test dl, dl
je 0x539fb0
lea eax, [esp + 0x78]
push 0
push eax
push dword [esp + 0xc]
push dword [esp + 0xc8]
fstp st(0)
call fcn.0053b600
mov edi, eax
add esp, 0x10
test edi, edi
je 0x539e43
mov dword [esp + ebp*4 + 0x54], edi
inc ebp
push dword [esp + 0x7c]
push dword [esp + 0x7c]
push dword [ebx + 4]
push dword [ebx]
call fcn.004a58e0
fstp dword [esp + 0x38]
fld dword [esp + 0x38]
add esp, 0x10
fstp dword [edi + 0x374]
fld dword [esp + 0x28]
fstp dword [edi + 0x378]
push dword [esp + 0xbc]
call fcn.004eef10
test al, al
pop ecx
je 0x539e34
mov al, byte [edi + 0x158]
and al, 0x7f
or al, 0x80
mov byte [edi + 0x158], al
mov eax, dword [edi + 0x4c]
push 0
push eax
call fcn.00581500
pop ecx
pop ecx
jmp 0x539e57
push edi
call fcn.004db310
test edi, edi
pop ecx
je 0x539e57
mov ecx, edi
mov esi, dword [ecx]
push 1
call dword [esi + 8]
inc dword [esp + 0x14]
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0xc0]
jl 0x539ae8
cmp ebp, 3
jge 0x539ea0
xor edi, edi
test ebp, ebp
jle 0x539e94
mov ebx, dword [esp + edi*4 + 0x54]
push ebx
call fcn.004db310
test ebx, ebx
pop ecx
je 0x539e8f
mov ecx, ebx
mov esi, dword [ecx]
push 1
call dword [esi + 8]
inc edi
cmp edi, ebp
jl 0x539e77
add esp, 0xa8
pop ebp
pop edi
pop esi
pop ebx
ret
xor ebx, ebx
cmp ebp, 0x80000000
mov dword [esp + 0xc], ebp
sbb dword [esp + 0xc], 0xffffffff
sar dword [esp + 0xc], 1
jmp 0x539edf
mov eax, ebp
mov edi, dword [esp + ebx*4 + 0x54]
dec eax
mov ecx, edi
sub eax, ebx
mov esi, dword [esp + eax*4 + 0x54]
push 0x186a0
push esi
call fcn.004f6220
mov ecx, esi
push 0x186a0
push edi
call fcn.004f6220
inc ebx
cmp ebx, dword [esp + 0xc]
jl 0x539eb7
mov eax, ebp
cdq
and eax, 1
xor eax, edx
sub eax, edx
test eax, eax
je 0x539f4a
mov eax, ebp
mov edx, dword [esp + 0x54]
dec eax
cmp eax, 0x80000000
sbb eax, 0xffffffff
add edx, 0x34
sar eax, 1
mov edi, dword [esp + eax*4 + 0x54]
lea eax, [edi + 0x34]
push dword [edx + 4]
push dword [edx]
push dword [eax + 4]
push dword [eax]
call fcn.004a58e0
add esp, 0x10
fstp dword [esp + 0x2c]
lea ecx, [edi + 4]
push dword [esp + 0x2c]
call fcn.004bba80
cmp dword [edi + 0x244], 0xb
jne 0x539f40
mov ecx, edi
call fcn.004f7920
mov dword [edi + 0x244], 0x25
cmp ebp, 1
jle 0x539f83
mov ecx, dword [esp + 0x54]
mov esi, 1
mov al, byte [ecx + 0x151]
and al, 0xfd
or al, 2
cmp ebp, 1
mov byte [ecx + 0x151], al
jle 0x539f83
lea eax, [eax]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + esi*4 + 0x54]
push eax
call fcn.004f07d0
inc esi
cmp esi, ebp
jl 0x539f70
add esp, 0xa8
pop ebp
pop edi
pop esi
pop ebx
ret
fstp st(0)
jmp 0x539a8a
fcompp
jmp 0x539ab0
fstp st(0)
jmp 0x539e57
fstp st(0)
jmp 0x539e57
fstp st(0)
jmp 0x539e57