Function at 0x518518
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], eax
lea edi, [ebp - 4]
mov eax, dword [edi]
call fcn.005154e4
mov eax, dword [edi]
mov eax, dword [eax + 0x204]
cmp eax, 0xb
je 0x518951
cmp eax, 9
je 0x518951
cmp eax, 0xd
je 0x518951
cmp eax, 5
je 0x518951
cmp eax, 6
je 0x518951
cmp eax, 7
je 0x518951
cmp eax, 0x12d
je 0x518951
mov eax, dword [edi]
mov byte [eax + 0x2f0], 0
mov eax, dword [0x544738]
mov eax, dword [eax]
cmp eax, dword [edi]
je 0x5185a2
mov eax, dword [edi]
mov eax, dword [eax + 0x360]
cmp dword [eax + 8], 2
jl 0x5185a2
mov eax, dword [edi]
mov byte [eax + 0x2f0], 1
mov eax, dword [edi]
mov edx, dword [eax + 0x2b4]
mov eax, dword [edi]
sub edx, dword [eax + 0x2ac]
mov eax, dword [edi]
mov si, 0xfff8
call fcn.00404458
mov eax, dword [edi]
mov edx, dword [eax + 0x2b4]
mov eax, dword [edi]
sub edx, dword [eax + 0x2ac]
mov eax, dword [edi]
mov si, 0xfff7
call fcn.00404458
mov eax, dword [edi]
mov ebx, dword [eax + 0x2b4]
mov eax, dword [edi]
cmp dword [eax + 0x204], 0
je 0x5188b4
mov edx, dword [edi]
mov edx, dword [edx + 0x2ac]
mov eax, dword [edi]
mov eax, dword [eax + 0x2b4]
cmp edx, eax
jg 0x51860d
mov ecx, dword [edi]
cmp eax, dword [ecx + 0x2b0]
jle 0x518615
mov eax, dword [edi]
mov dword [eax + 0x2b4], edx
mov eax, dword [0x544738]
mov eax, dword [eax]
cmp eax, dword [edi]
je 0x51864f
mov eax, dword [edi]
cmp byte [eax + 0x170], 0
je 0x51864f
mov eax, dword [edi]
mov eax, dword [eax + 0x2d8]
add eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0xc], eax
fild qword [ebp - 0x10]
fdiv dword [0x518958]
call fcn.00403330
mov esi, eax
jmp 0x518686
mov eax, dword [edi]
cmp byte [eax + 0x2f0], 0
je 0x51867e
mov eax, dword [edi]
mov eax, dword [eax + 0x2d8]
add eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0xc], eax
fild qword [ebp - 0x10]
fdiv dword [0x518958]
call fcn.00403330
mov esi, eax
jmp 0x518686
mov eax, dword [edi]
mov esi, dword [eax + 0x2d8]
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
sub eax, dword [edx + 0x2dc]
cmp esi, eax
jae 0x51887b
mov eax, dword [edi]
mov eax, dword [eax + 0x2b4]
mov edx, dword [edi]
cmp eax, dword [edx + 0x2b0]
jge 0x518769
mov eax, dword [edi]
cmp byte [eax + 0x170], 0
je 0x518752
mov eax, dword [edi]
mov eax, dword [eax + 0x188]
mov edx, dword [edi]
mov edx, dword [edx + 0x18c]
sub edx, 2
cmp eax, edx
je 0x5186e2
push ebp
call fcn.005184bc
pop ecx
test al, al
je 0x51871e
mov eax, dword [edi]
cmp dword [eax + 0x194], 0
jge 0x5186fc
push ebp
call fcn.005184bc
pop ecx
test al, al
je 0x5187d0
mov eax, dword [edi]
inc dword [eax + 0x2b4]
mov eax, dword [edi]
inc dword [eax + 0x188]
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
mov dword [edx + 0x2dc], eax
jmp 0x5187d0
mov eax, dword [edi]
mov eax, dword [eax + 0x2b4]
mov edx, dword [edi]
mov edx, dword [edx + 0x2b0]
dec edx
cmp eax, edx
jge 0x51873b
mov eax, dword [edi]
inc dword [eax + 0x2b4]
mov eax, dword [edi]
inc dword [eax + 0x188]
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
mov dword [edx + 0x2dc], eax
jmp 0x5187d0
mov eax, dword [edi]
inc dword [eax + 0x2b4]
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
mov dword [edx + 0x2dc], eax
jmp 0x5187d0
mov eax, dword [edi]
cmp byte [eax + 0x2f], 0
je 0x518777
mov eax, dword [edi]
mov byte [eax + 0x2e], 1
mov eax, dword [0x544738]
mov eax, dword [eax]
cmp eax, dword [edi]
jne 0x5187b2
mov eax, dword [0x544afc]
mov eax, dword [eax]
call fcn.004adf4c
test al, al
je 0x5187d0
mov eax, dword [edi]
mov si, 0xfff6
call fcn.00404458
mov eax, dword [edi]
xor edx, edx
mov dword [eax + 0x204], edx
mov eax, dword [edi]
mov byte [eax + 0x170], 0
jmp 0x5187d0
mov eax, dword [edi]
mov si, 0xfff6
call fcn.00404458
mov eax, dword [edi]
xor edx, edx
mov dword [eax + 0x204], edx
mov eax, dword [edi]
mov byte [eax + 0x170], 0
mov eax, dword [edi]
cmp byte [eax + 0x170], 0
je 0x51887b
mov eax, dword [edi]
mov eax, dword [eax + 0x188]
mov edx, dword [edi]
mov edx, dword [edx + 0x18c]
dec edx
cmp eax, edx
jne 0x51887b
mov eax, dword [edi]
cmp dword [eax + 0x194], 0
jle 0x518868
mov eax, dword [edi]
add eax, 0x194
mov edx, dword [eax + 0x10]
push edx
mov edx, dword [edi]
mov edx, dword [edx + 8]
push edx
mov edx, dword [edi]
mov edx, dword [edx + 0xc]
push edx
mov edx, dword [eax + 0x14]
push edx
mov edx, dword [eax + 0x18]
push edx
mov edx, dword [eax + 8]
push edx
mov dl, byte [eax + 0xc]
push edx
mov dl, byte [eax + 0x1c]
push edx
mov edx, dword [eax + 0x20]
push edx
lea edx, [ebp - 5]
push edx
mov ecx, dword [eax]
mov eax, dword [0x544574]
mov eax, dword [eax]
mov edx, dword [edi]
call fcn.00522ec0
cmp byte [ebp - 5], 0
je 0x51885b
mov eax, dword [edi]
mov eax, dword [eax + 0x26c]
call fcn.005038f8
jmp 0x518868
mov eax, dword [edi]
mov eax, dword [eax + 0x270]
call fcn.005038f8
mov eax, dword [edi]
xor edx, edx
mov dword [eax + 0x194], edx
mov eax, dword [edi]
mov byte [eax + 0x1b8], 1
mov eax, dword [edi]
mov ax, word [eax + 0x1a]
sub ax, 2
jb 0x51888d
sub ax, 0x29
jne 0x51889b
mov eax, dword [edi]
mov dword [eax + 0x2f8], 0xfffffff6
jmp 0x5188a5
mov eax, dword [edi]
xor edx, edx
mov dword [eax + 0x2f8], edx
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
mov dword [edx + 0x2fc], eax
jmp 0x518918
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
sub eax, dword [edx + 0x308]
cmp eax, 0xc8
jbe 0x518918
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
sub eax, dword [edx + 0x2fc]
cmp eax, 0x1f4
jbe 0x51890d
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
mov dword [edx + 0x2fc], eax
mov eax, dword [edi]
inc dword [eax + 0x2f8]
mov eax, dword [edi]
mov eax, dword [eax + 0x2f8]
mov edx, dword [edi]
cmp eax, dword [edx + 0x300]
jl 0x51890d
mov eax, dword [edi]
xor edx, edx
mov dword [eax + 0x2f8], edx
mov eax, dword [edi]
mov si, 0xfffe
call fcn.00404458
mov eax, dword [edi]
cmp ebx, dword [eax + 0x2b4]
jne 0x518939
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
sub eax, dword [edx + 0x264]
mov edx, dword [edi]
cmp eax, dword [edx + 0x260]
jbe 0x518951
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [edi]
mov dword [edx + 0x264], eax
mov eax, dword [edi]
mov si, 0xfff3
call fcn.00404458
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret