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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5a503b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
mov eax, dword [0x5d5758]
push ebx
push esi
xor esi, esi
cmp eax, esi
push edi
jne 0x5496d6
xor eax, eax
mov ecx, dword [esp + 0xb4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
push esi
lea eax, [esp + 0x50]
push esi
push eax
push edi
call fcn.00407b30
push edi
call fcn.00410990
add esp, 0x14
cmp eax, esi
jne 0x54970a
xor eax, eax
mov ecx, dword [esp + 0xb4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [eax + 0x144]
cmp ecx, esi
jne 0x54972b
xor eax, eax
mov ecx, dword [esp + 0xb4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ecx + 4], esi
jne 0x549747
xor eax, eax
mov ecx, dword [esp + 0xb4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [eax + 0x148], 0xffffffff
jne 0x549767
xor eax, eax
mov ecx, dword [esp + 0xb4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x28], 0x3f800000
cmp eax, esi
mov dword [esp + 0x24], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x58], 0x42700000
je 0x549826
lea ecx, [esp + 0xa4]
push esi
lea edx, [esp + 0x90]
push ecx
push edx
push eax
call fcn.00407b30
fld dword [esp + 0x5c]
fsub dword [esp + 0x9c]
fld dword [esp + 0x60]
fsub dword [esp + 0xa0]
fld dword [esp + 0x64]
fsub dword [esp + 0xa4]
add esp, 0x10
fstp dword [esp + 0x7c]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fld dword [esp + 0x7c]
fmul dword [esp + 0x7c]
fadd st(1)
fsqrt
fld dword [ebp + 0x18]
fmul dword [0x5a83e8]
fptan
fstp st(0)
fmulp st(1)
fadd st(0), st(0)
fstp dword [esp + 0x58]
fsqrt
fstp dword [esp + 0x2c]
fld dword [0x5a83f4]
fdiv dword [esp + 0x2c]
fst dword [esp + 0x14]
fmul st(1)
fstp dword [esp + 0x28]
fstp st(0)
fld dword [esp + 0x14]
fmul st(1)
fchs
fstp dword [esp + 0x24]
fstp st(0)
mov ebx, dword [ebp + 0xc]
lea eax, [esp + 0x98]
lea ecx, [esp + 0x9c]
push eax
lea edx, [esp + 0xa4]
push ecx
push edx
push ebx
call fcn.0040ba40
mov edi, eax
lea eax, [esp + 0x54]
push eax
push ebx
call fcn.0040b9f0
mov dword [esp + 0x30], eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x50]
push ecx
push edx
mov dword [esp + 0xdc], esi
call fcn.00549480
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x58]
sub edx, ecx
mov eax, 0x38e38e39
sar edx, 2
mul edx
add esp, 0x20
xor eax, eax
shr edx, 1
cmp dword [esp + 0x44], esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x1c], eax
jle 0x549a8c
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x14], esi
add ebx, 0xc
mov dword [esp + 0x20], ebx
xor ebx, ebx
mov esi, dword [esp + 0x20]
mov dword [esp + 0x30], esi
jmp 0x5498d3
xor esi, esi
xor ebx, ebx
mov esi, dword [esp + 0x20]
mov dword [esp + 0x30], esi
jmp 0x5498d3
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
mov esi, dword [esi]
shl esi, 3
cmp eax, edx
jge 0x549a3f
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x80]
add eax, ebx
push 0
push edx
mov dword [esp + 0x6c], 0
lea eax, [eax + eax*2]
mov dword [esp + 0x78], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
fld dword [ecx + eax*4]
fld dword [ecx + eax*4 + 4]
fstp dword [esp + 0x18]
fld dword [ecx + eax*4 + 8]
fld st(1)
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x64]
fstp dword [edi + esi*4]
fld dword [esp + 0x18]
mov dword [esp + 0x74], ecx
lea ecx, [esp + 0x70]
fstp dword [edi + esi*4 + 4]
push eax
push ecx
fadd dword [0x5a9b3c]
fstp dword [edi + esi*4 + 8]
fld dword [esp + 0x60]
fsub dword [esp + 0x20]
fld dword [esp + 0x5c]
fsub st(2)
fst dword [esp + 0x28]
fld st(0)
fmul st(1)
fld st(2)
fmul st(3)
faddp st(1)
fsqrt
fstp dword [esp + 0x58]
fstp st(0)
fstp st(0)
fld dword [0x5a83f4]
fdiv dword [esp + 0x58]
fxch st(1)
fsub dword [esp + 0x5c]
fmul st(1)
fstp dword [esp + 0x6c]
fld dword [esp + 0x20]
fsub dword [esp + 0x60]
fmul st(1)
fstp dword [esp + 0x70]
fstp st(0)
fld dword [esp + 0x34]
fchs
fstp dword [esp + 0x78]
call fcn.00549230
fld qword [esp + 0x90]
fcos
add esp, 0x10
fmul dword [esp + 0x48]
fld dword [esp + 0x2c]
fadd st(1)
fld dword [esp + 0x7c]
fchs
fld st(1)
fmul st(2)
fld dword [esp + 0x7c]
fmul dword [esp + 0x7c]
faddp st(1)
fsqrt
fdivp st(1)
fld dword [ebp + 0x18]
fmul dword [0x5a83e8]
fcos
fdivp st(1)
fsubr qword [0x5a8418]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x1c]
fmulp st(2)
fstp st(0)
fld dword [0x5a83f4]
fdiv dword [esp + 0x58]
fld st(1)
fmul dword [esp + 0x24]
fsubr dword [esp + 0x18]
fmul st(1)
fadd dword [0x5a83e8]
fstp dword [edi + esi*4 + 0x18]
fld dword [esp + 0x10]
fsub dword [esp + 0x50]
fxch st(2)
fmul dword [esp + 0x28]
fsubp st(2)
fxch st(1)
fmul st(1)
fadd dword [0x5a83e8]
fstp dword [edi + esi*4 + 0x1c]
fstp st(0)
jmp 0x549a49
xor ecx, ecx
mov dword [edi + esi*4 + 0x18], ecx
mov dword [edi + esi*4 + 0x1c], ecx
mov esi, dword [esp + 0x30]
inc ebx
add esi, 4
cmp ebx, 3
mov dword [esp + 0x30], esi
jl 0x5498cf
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x44]
inc eax
add ebx, 0x18
add esi, 3
cmp eax, ecx
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], esi
jl 0x5498c1
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x549ae7
fld dword [esi]
fmul dword [0x5a83e8]
push 0
push ebx
fst dword [esp + 0x70]
fstp dword [esp + 0x64]
fld dword [esi + 4]
fmul dword [0x5a83e8]
fst dword [esp + 0x74]
fstp dword [esp + 0x68]
fld dword [esi + 8]
fmul dword [0x5a83e8]
fst dword [esp + 0x78]
fstp dword [esp + 0x6c]
call fcn.0040ec30
push esi
lea edx, [esp + 0x74]
push 0
lea ecx, [esp + 0x6c]
push edx
push ecx
push eax
call fcn.0040ea40
mov ecx, dword [esp + 0x54]
add esp, 0x1c
mov eax, dword [esp + 0x40]
sub eax, ecx
sar eax, 2
je 0x549c2f
shl eax, 2
cmp eax, 0x80
jbe 0x549b0e
push ecx
call fcn.0050a62f
add esp, 4
jmp 0x549c2f
add eax, 7
push 1
shr eax, 3
push 0x5d5740
mov dword [esp + 0x24], ecx
lea edx, [eax*4 + 0x5d56fc]
mov dword [esp + 0x3c], edx
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
je 0x549c17
mov edi, dword [0x5c4264]
mov eax, dword [0x5d5744]
xor esi, esi
mov dword [esp + 0x10], 0x11
test edi, edi
jbe 0x549bc9
mov ebx, eax
shr ebx, 1
cmp esi, ebx
jb 0x549b88
mov eax, dword [0x5d5740]
test eax, eax
jne 0x549b88
push 1
push 0x5d5740
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x549bc4
mov dword [0x5d5744], esi
mov dword [0x5c4264], 0x3e8
jmp 0x549c17
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
imul eax, ecx
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x10]
imul edx, eax
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x10]
imul ecx, edx
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x10]
imul eax, ecx
mov dword [esp + 0x10], eax
inc esi
cmp esi, edi
jb 0x549b55
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [0x5c4264], 0x1e
mov edi, 6
cmp edi, 0x1b
mov esi, edi
jle 0x549bea
mov esi, 0x1b
push 1
push 0x5d5740
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
je 0x549c17
cmp esi, 0x14
jg 0x549c07
push 0
call ebx
inc edi
jmp 0x549bde
lea ecx, [esi - 0x14]
mov edx, 1
shl edx, cl
push edx
call ebx
inc edi
jmp 0x549bde
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
mov dword [ecx], edx
mov dword [eax], ecx
mov dword [0x5d5740], 0
mov ecx, dword [esp + 0xb4]
pop edi
pop esi
mov eax, 1
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret