Function at 0x490520
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c2847
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x6287a8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x1c], esi
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edi, eax
mov eax, dword [esi + 0x770]
mov ebx, edi
sub ebx, eax
test eax, eax
je 0x490567
cmp edi, eax
jae 0x49057e
call fcn.00565b3a
cdq
mov ecx, 0x2bc
idiv ecx
mov eax, edi
sub eax, edx
mov dword [esi + 0x770], eax
cmp ebx, 0x258
jbe 0x49082b
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x14], eax
xor ecx, ecx
lea eax, [esi + 0x108]
mov dword [esi + 0x770], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], eax
xor esi, esi
mov edi, eax
nop word [eax + eax]
mov eax, dword [edi]
cmp eax, dword [edi + 0x330]
jge 0x4905ea
lea eax, [ecx + esi]
imul eax, eax, 0x64
cmp byte [eax + str.Ghost], 0
je 0x4905ea
test byte [eax + 0x61c8c8], 0x80
je 0x4905ea
mov ecx, ebx
call fcn.0044c8d0
cmp eax, 4
jne 0x4905e7
cmp dword [ebx + 0x134], 2
je 0x490621
mov ecx, dword [ebp - 0x10]
inc esi
add edi, 4
cmp esi, 6
jl 0x4905b0
mov eax, dword [ebp - 0x18]
add ecx, 6
inc dword [ebp - 0x14]
add eax, 0x18
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], ecx
cmp ecx, 0xcc
jl 0x4905a6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x1c]
cmp esi, 4
jne 0x490640
mov eax, dword [edi + 0x768]
mov dword [ebp + 8], eax
mov eax, dword [edi + 0x76c]
mov dword [ebp - 0x10], eax
jmp 0x4906c8
lea eax, [esi + esi]
mov ecx, 9
sub ecx, eax
mov eax, 4
sub eax, esi
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], eax
call fcn.00565b3a
cdq
idiv dword [ebp - 0x18]
mov eax, dword [edi + 0x768]
add eax, 0xfffffffc
add eax, edx
add eax, esi
mov dword [ebp + 8], eax
call fcn.00565b3a
cdq
idiv dword [ebp - 0x18]
mov eax, dword [edi + 0x76c]
add eax, 0xfffffffc
lea ecx, [edx + esi]
mov edx, dword [ebp + 8]
add ecx, eax
mov eax, dword [ebx]
push ecx
push edx
push ecx
mov dword [ebp - 0x10], ecx
mov ecx, ebx
push edx
call dword [eax + 0x20]
neg eax
sbb ecx, ecx
mov eax, dword [ebp + 8]
sub eax, dword [edi + 0x768]
neg ecx
cdq
xor eax, edx
sub eax, edx
cmp eax, dword [ebp - 0x20]
je 0x4906c4
mov eax, dword [ebp - 0x10]
sub eax, dword [edi + 0x76c]
cdq
xor eax, edx
sub eax, edx
cmp eax, dword [ebp - 0x20]
jne 0x490657
test ecx, ecx
je 0x490657
push 0x2c8
call fcn.0055644a
mov ecx, eax
add esp, 4
mov dword [ebp - 0x20], ecx
mov dword [ebp - 4], 0
test ecx, ecx
je 0x4906f6
mov eax, dword [ebp - 0x14]
push 0
push edi
push esi
push eax
call fcn.00492f60
mov esi, eax
jmp 0x4906f8
xor esi, esi
movd xmm0, dword [esi + 0x1c0]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
cvtdq2pd xmm0, xmm0
mov dword [esi + 0x10c], eax
mov dword [esi + 0x114], eax
mov dword [esi + 0x22c], eax
mov dword [esi + 0x108], ecx
mov dword [esi + 0x110], ecx
mov dword [esi + 0x228], ecx
mulsd xmm0, qword [str.333333]
push esi
mov dword [ebp - 4], 0xffffffff
cvttsd2si eax, xmm0
mov dword [esi + 0x1c0], eax
mov ecx, dword [ebx + 0x118]
call fcn.005155c0
mov ecx, esi
mov byte [ebp - 0x30], 0x18
mov dword [ebp - 0x2f], esi
call fcn.0044c8d0
mov byte [ebp - 0x2b], al
mov ecx, ebx
movzx eax, word [esi + 0x220]
mov word [ebp - 0x2a], ax
movzx eax, word [esi + 0x224]
mov word [ebp - 0x28], ax
call fcn.0044c8d0
cmp eax, 1
jne 0x4907a0
xor al, al
mov ecx, 1
mov byte [ebp - 0x26], al
cmp byte [esi + 0x1dc], 0
movzx eax, al
cmove eax, ecx
mov byte [ebp - 0x26], al
movzx eax, byte [esi + 0x108]
mov ecx, ebx
mov byte [ebp - 0x25], al
movzx eax, byte [esi + 0x10c]
push 0
push 5
mov byte [ebp - 0x24], al
lea eax, [ebp - 0x30]
push eax
push 0xd
push dword [esi + 0x10c]
push dword [esi + 0x108]
push 0
call fcn.0052acd0
cmp dword [esi + 0x224], 4
jne 0x49082b
mov ecx, dword [ebx + 0x110]
call fcn.0044e020
mov ecx, eax
xor al, al
mov byte [ebp + 0xb], al
test ecx, ecx
je 0x49082b
test al, al
jne 0x49082b
mov eax, dword [ecx + 0x108]
cmp eax, dword [esi + 0x108]
jne 0x490817
cmp dword [ecx + 0x14f38], 0
jne 0x490817
mov dword [esi + 0x204], ecx
mov byte [ebp + 0xb], 1
mov ecx, dword [ebx + 0x110]
call fcn.0044e0d0
mov ecx, eax
mov al, byte [ebp + 0xb]
test ecx, ecx
jne 0x4907f2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4