Function at 0x50a590
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x67345b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x19c
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x3c]
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0xa4], 0
call fcn.0064dc20
lea ecx, [esp + 0x24]
call fcn.0064dc20
mov eax, dword [esi]
lea ecx, [esp + 0xa8]
push ecx
mov ecx, esi
call dword [eax + 0x7c]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ecx
mov edx, dword [eax + 8]
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], ecx
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], edx
mov edx, dword [esi]
lea eax, [esp + 0xa8]
push eax
mov ecx, esi
call dword [edx + 0x84]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
mov dword [esp + 0x34], ecx
lea eax, [esp + 0x24]
lea ecx, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x40], edx
call fcn.0064def0
fcomp qword [0x6fd3e8]
add esp, 8
fnstsw ax
test ah, 1
je 0x50a6df
mov edi, 1
jmp 0x50a6e1
xor edi, edi
xor ebx, ebx
mov ecx, esi
push ebx
call fcn.00529de0
test eax, eax
je 0x50a93c
cmp edi, ebx
je 0x50a93c
lea ecx, [esp + 0x60]
call fcn.0064dc20
mov edx, dword [esi]
lea eax, [esp + 0xa8]
push eax
mov ecx, esi
call dword [edx + 0x7c]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
mov eax, dword [esi]
mov dword [esp + 0x4c], ecx
push 0x3fe00000
lea ecx, [esp + 0xac]
push ebx
push ecx
mov ecx, esi
mov dword [esp + 0x5c], edx
call dword [eax + 0x90]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
fld qword [esp + 0x44]
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov edx, dword [eax + 8]
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ecx
fadd qword [esp + 0x2c]
push ebx
push ebx
sub esp, 8
mov edx, dword [eax + 0x10]
fmul qword [0x691ac8]
mov eax, dword [eax + 0x14]
sub esp, 8
lea ecx, [esp + 0x78]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
fstp qword [esp + 8]
fld qword [esp + 0x3c]
fadd qword [esp + 0x54]
fmul qword [0x691ac8]
fstp qword [esp]
call fcn.0064dd00
lea ecx, [esp + 0x60]
lea edx, [esp + 0x3c]
push ecx
push edx
call fcn.0064def0
fstp qword [esp + 0x14]
lea eax, [ebp + 0x28]
lea ecx, [esp + 0x68]
push eax
push ecx
call fcn.0064def0
fst qword [esp + 0x2c]
fcomp qword [esp + 0x1c]
add esp, 0x10
fnstsw ax
test ah, 1
je 0x50a7ec
lea edx, [ebp + 0xc]
jmp 0x50aab2
lea ecx, [esp + 0xf0]
call fcn.004c7940
sub esp, 0x18
lea eax, [ebp + 0x28]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
mov dword [esp + 0x1cc], ebx
call fcn.0064dc70
lea ecx, [esp + 0x108]
call fcn.004d43c0
sub esp, 0x18
lea edx, [esp + 0x78]
mov ecx, esp
mov dword [esp + 0x2c], esp
push edx
call fcn.0064dc70
lea ecx, [esp + 0x108]
call fcn.004c7af0
mov edi, dword [ebp + 0x24]
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x2c], esp
push edi
call fcn.0064dc70
lea ecx, [esp + 0x108]
call fcn.004c8be0
fld qword [ebp + 0x28]
fsub qword [esp + 0x60]
fld qword [ebp + 0x30]
fsub qword [esp + 0x68]
fxch st(1)
fpatan
mov ebx, eax
fcom qword [0x691ac0]
fst qword [esp + 0x14]
fnstsw ax
test ah, 0x41
je 0x50a88d
fld qword [0x707160]
fadd st(0), st(0)
fadd st(1)
fstp qword [esp + 0x14]
fstp st(0)
fld qword [esp + 0xc]
fdiv qword [esp + 0x1c]
call fcn.0065f6e4
cmp ebx, 4
jne 0x50a8a7
fadd qword [esp + 0x14]
jmp 0x50a8b8
cmp ebx, 3
jne 0x50a8b2
fsubr qword [esp + 0x14]
jmp 0x50a8b8
fstp st(0)
fld qword [esp + 0x54]
fld st(0)
fcos
push 0
push 0
fmul qword [esp + 0x14]
fadd qword [esp + 0x68]
fstp qword [esp + 0x24]
mov edx, dword [esp + 0x28]
fsin
fmul qword [esp + 0x14]
fadd qword [esp + 0x70]
fstp qword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
mov ecx, edi
call fcn.0064dd00
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x2c], esp
push edi
call fcn.0064dc70
lea ecx, [esp + 0xf0]
push ecx
mov ecx, esi
call fcn.00504130
push eax
lea ecx, [esp + 0x94]
call fcn.006578b0
lea ecx, [esp + 0xf0]
mov dword [esp + 0x1b0], 0xffffffff
call fcn.004c7ac0
jmp 0x50aaab
mov edi, dword [ebp + 0x24]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0x4197d784
mov ecx, dword [edi + 8]
mov edx, dword [edi]
mov eax, dword [edi + 4]
mov dword [esp + 0x44], ecx
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x3c], edx
mov edx, dword [edi + 0xc]
mov dword [esp + 0x40], eax
mov eax, dword [edi + 0x10]
mov dword [esp + 0x50], ecx
mov ecx, dword [esi + 0x84]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
call fcn.004f2990
test eax, eax
mov dword [esp + 0x14], eax
jle 0x50aaab
mov ecx, dword [esi + 0x84]
lea edx, [esp + 0xa8]
push ebx
push edx
call fcn.004f2a30
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
mov dword [esp + 0x34], ecx
lea eax, [esp + 0x24]
lea ecx, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x40], edx
call fcn.0064def0
fstp qword [esp + 0x24]
mov ecx, dword [esi + 0x84]
add esp, 8
push ebx
call fcn.004f2ac0
fstp qword [esp + 0x54]
mov edx, dword [esi + 0x84]
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x54]
push edx
push eax
lea edx, [esp + 0xc8]
push ecx
push edx
call fcn.004f9d00
add esp, 0x10
lea ecx, [esp + 0x78]
push eax
call fcn.006578b0
lea eax, [ebp + 0xc]
lea ecx, [esp + 0x78]
push eax
push ecx
call fcn.00657490
fabs
fsub qword [0x695748]
add esp, 8
fabs
fcomp qword [0x691f38]
fnstsw ax
test ah, 1
je 0x50aa9e
fld qword [esp + 0x1c]
fcomp qword [esp + 0xc]
fnstsw ax
test ah, 1
je 0x50aa9e
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
mov dword [edi], ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x28]
mov dword [edi + 8], eax
mov eax, dword [esp + 0x38]
mov dword [edi + 0xc], ecx
mov dword [edi + 4], edx
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x78]
mov dword [edi + 0x10], edx
push ecx
lea ecx, [esp + 0x94]
mov dword [edi + 0x14], eax
call fcn.006578b0
mov eax, dword [esp + 0x14]
inc ebx
cmp ebx, eax
jl 0x50a98f
lea edx, [esp + 0x90]
mov esi, dword [ebp + 8]
push edx
mov ecx, esi
call fcn.00657880
mov ecx, dword [esp + 0x1a8]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x38