Function at 0x539810
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 0x539840
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 0x53986f
call fcn.00642970
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 0x7e4eb0
push 1
push edx
push eax
call fcn.006471b0
fldz
fldz
fld dword [esp + 0xb0]
fstp st(2)
add esp, 0x10
fld st(1)
fadd dword [esp + 0x3c]
fcomp dword [0x97853c]
fnstsw ax
and ah, 5
cmp ah, 1
jne 0x539903
xor al, al
jmp 0x5399c2
fld st(1)
fsub dword [esp + 0x3c]
fcomp dword [0xa10680]
fnstsw ax
test ah, 0x45
jne 0x539920
xor al, al
jmp 0x5399c2
fld st(1)
fmul dword [0x7e4f4c]
fld dword [esp + 0x9c]
fmul dword [0x7e4f48]
faddp st(1)
fcomp dword [esp + 0x3c]
fnstsw ax
test ah, 0x45
jne 0x539946
xor al, al
jmp 0x5399c2
fld st(1)
fmul dword [0x7e4f58]
fld dword [esp + 0x9c]
fmul dword [0x7e4f54]
faddp st(1)
fcomp dword [esp + 0x3c]
fnstsw ax
test ah, 0x45
jne 0x539970
xor al, al
jmp 0x5399c2
fld dword [esp + 0xa4]
fst st(1)
fmul dword [0x7e4f68]
fld st(2)
fmul dword [0x7e4f64]
faddp st(1)
fcomp dword [esp + 0x3c]
fnstsw ax
test ah, 0x45
jne 0x539998
xor al, al
jmp 0x5399c2
fld st(0)
fmul dword [0x7e4f74]
fld st(2)
fmul dword [0x7e4f70]
faddp st(1)
fcomp dword [esp + 0x3c]
fnstsw ax
test ah, 0x45
jne 0x5399c0
xor al, al
jmp 0x5399c2
mov al, 1
test al, al
je 0x539fb7
fcompp
call fcn.004bc140
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.004bc200
test eax, eax
je 0x539aa0
call fcn.004bc200
fld dword [eax + 0x74]
fstp dword [esp + 0x38]
call fcn.004bc200
fld dword [eax + 0x74]
fmul dword [esp + 0x38]
fstp dword [esp + 0x44]
call fcn.004bc200
fld dword [eax + 0x70]
fstp dword [esp + 0x34]
call fcn.004bc200
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 0x539a7a
fld dword [0x694dd8]
fstp st(1)
fld dword [0x694dd0]
fcomp st(1)
fnstsw ax
and ah, 5
cmp ah, 1
jne 0x539a94
fld dword [0x694dd0]
fstp st(1)
fst dword [esp + 0x30]
jmp 0x539fb0
fld dword [0x694dd8]
fstp dword [esp + 0x30]
fld dword [0x694ddc]
fmul dword [esp + 0x30]
fcomp dword [esp + 0x40]
fnstsw ax
test ah, 0x45
jne 0x539ad0
add esp, 0xa8
pop ebp
pop edi
pop esi
pop ebx
ret
push 0
push 0xffffffffffffffff
push dword [esp + 0x44]
push ebx
call fcn.0052fbf0
add esp, 0x10
test al, al
jne 0x539af0
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 0x539e8c
call fcn.00649a40
mov edi, eax
call fcn.00649a40
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 0x539b68
call fcn.00642970
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 0x539bb6
call fcn.00642970
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.004d53c0
fadd dword [0x694dd8]
add esp, 0x10
cmp byte [esp + 0x77], 0
fstp dword [esp + 0x24]
je 0x539e77
fldz
fldz
fld dword [ebx + 8]
fstp st(2)
fld st(1)
fcomp dword [esp + 0x24]
fnstsw ax
test ah, 0x45
jne 0x539c30
fld st(1)
jmp 0x539c34
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 0x539c78
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.004eed40
pop ecx
mov ecx, dword [eax*4 + 0x92d4d0]
mov dword [esp + 4], eax
mov edi, dword [ecx]
call dword [edi + 0x14]
test eax, eax
je 0x539e77
mov dword [esp + 0x84], 0
lea eax, [esp + 0x84]
push eax
mov eax, dword [esp + 8]
mov eax, dword [eax*4 + 0x92d4d0]
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.0052fbf0
mov byte [esp + 0x20], 0
add esp, 0x10
xor edi, edi
mov ecx, dword [esp + edi*4 + 0x84]
test ecx, ecx
je 0x539d41
xor edx, edx
xor al, al
test ebp, ebp
jle 0x539d36
cmp ecx, dword [esp + edx*4 + 0x54]
jne 0x539d31
mov al, 1
jmp 0x539d36
inc edx
cmp edx, ebp
jl 0x539d27
test al, al
jne 0x539d41
mov byte [esp + 0x10], 1
jmp 0x539d47
inc edi
cmp edi, 6
jl 0x539d14
cmp dword [esp + 0x14], 0
jne 0x539d52
mov cl, 1
jmp 0x539d74
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.004da580
add esp, 0x24
mov cl, al
cmp dword [esp + 0x14], 0
fldz
jne 0x539d81
mov dl, 1
jmp 0x539dc4
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 0x539db0
mov esi, 1
jmp 0x539db2
xor esi, esi
xor eax, eax
xor edx, edx
test esi, esi
jne 0x539dbb
inc eax
test al, al
jne 0x539dc4
mov edx, 1
cmp byte [esp + 0x10], 0
jne 0x539fc0
test cl, cl
je 0x539fc7
test dl, dl
je 0x539fd0
lea eax, [esp + 0x78]
push 0
push eax
push dword [esp + 0xc]
push dword [esp + 0xc8]
fstp st(0)
call fcn.0053b620
mov edi, eax
add esp, 0x10
test edi, edi
je 0x539e63
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.004a5900
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.004eef30
test al, al
pop ecx
je 0x539e54
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.00581520
pop ecx
pop ecx
jmp 0x539e77
push edi
call fcn.004db330
test edi, edi
pop ecx
je 0x539e77
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 0x539b08
cmp ebp, 3
jge 0x539ec0
xor edi, edi
test ebp, ebp
jle 0x539eb4
mov ebx, dword [esp + edi*4 + 0x54]
push ebx
call fcn.004db330
test ebx, ebx
pop ecx
je 0x539eaf
mov ecx, ebx
mov esi, dword [ecx]
push 1
call dword [esi + 8]
inc edi
cmp edi, ebp
jl 0x539e97
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 0x539eff
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.004f6240
mov ecx, esi
push 0x186a0
push edi
call fcn.004f6240
inc ebx
cmp ebx, dword [esp + 0xc]
jl 0x539ed7
mov eax, ebp
cdq
and eax, 1
xor eax, edx
sub eax, edx
test eax, eax
je 0x539f6a
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.004a5900
add esp, 0x10
fstp dword [esp + 0x2c]
lea ecx, [edi + 4]
push dword [esp + 0x2c]
call fcn.004bbaa0
cmp dword [edi + 0x244], 0xb
jne 0x539f60
mov ecx, edi
call fcn.004f7940
mov dword [edi + 0x244], 0x25
cmp ebp, 1
jle 0x539fa3
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 0x539fa3
lea eax, [eax]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + esi*4 + 0x54]
push eax
call fcn.004f07f0
inc esi
cmp esi, ebp
jl 0x539f90
add esp, 0xa8
pop ebp
pop edi
pop esi
pop ebx
ret
fstp st(0)
jmp 0x539aaa
fcompp
jmp 0x539ad0
fstp st(0)
jmp 0x539e77
fstp st(0)
jmp 0x539e77
fstp st(0)
jmp 0x539e77