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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff8c
push esi
xor ecx, ecx
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x4aa497
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0
je 0x4a9f5c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
mov edx, dword [ebp - 8]
mov si, 0xfff6
call fcn.004043ac
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
sub eax, dword [edx + 4]
cmp eax, 0x3e8
jbe 0x4a9f8d
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 4]
mov dword [edx + 0xc], eax
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax + 8], edx
mov eax, dword [ebp - 4]
inc dword [eax + 8]
mov eax, dword [0x5685c0]
cmp dword [eax], 0
je 0x4aa46c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x14]
mov edx, dword [0x5684d4]
cmp eax, dword [edx]
jne 0x4aa46c
mov eax, dword [0x5684d4]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a860]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x4aa172
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
mov eax, dword [0x5684d4]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a860]
mov edx, dword [ebp - 0x10]
call fcn.004192fc
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0x134], 0
jne 0x4aa00d
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0x135], 0
je 0x4aa166
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0x20], 0
jne 0x4aa166
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0x135], 0
je 0x4aa05f
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 0x14]
sub eax, dword [edx + 0x138]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x13c]
cdq
cmp edx, dword [esp + 4]
jne 0x4aa051
cmp eax, dword [esp]
pop edx
pop eax
jae 0x4aa05f
jmp 0x4aa055
pop edx
pop eax
jge 0x4aa05f
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x135], 0
mov eax, dword [0x568abc]
mov eax, dword [eax]
xor edx, edx
call fcn.0047c004
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4aa0c1
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x1c]
mov si, 0xfffa
call fcn.004043ac
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push 1
mov eax, dword [ebp - 0x1c]
mov si, 0xfff9
call fcn.004043ac
sar eax, 1
jns 0x4aa0a2
adc eax, 0
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x8c]
sub edx, eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x90]
sub ecx, 0xa
mov eax, dword [ebp - 8]
call fcn.00477b4c
mov eax, dword [0x568abc]
mov eax, dword [eax]
mov edx, 1
call fcn.0047c004
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4aa166
lea edx, [ebp - 0x50]
mov eax, dword [ebp - 0x1c]
mov si, 0xfffa
call fcn.004043ac
mov eax, dword [ebp - 0x14]
cmp word [eax + 0x40], 0
jbe 0x4aa12a
mov eax, dword [ebp - 0x48]
sub eax, dword [ebp - 0x50]
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 0x40]
mov dword [ebp - 0x68], eax
fild dword [ebp - 0x68]
fdivp st(1)
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 0x3c]
mov dword [ebp - 0x6c], eax
fild dword [ebp - 0x6c]
fmulp st(1)
call fcn.004033b0
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x50]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push 1
mov eax, dword [ebp - 0x1c]
mov si, 0xfff9
call fcn.004043ac
sar eax, 1
jns 0x4aa147
adc eax, 0
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x8c]
sub edx, eax
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x90]
sub ecx, 0xa
mov eax, dword [ebp - 8]
call fcn.00477b4c
inc dword [ebp - 0x10]
dec dword [ebp - 0x20]
jne 0x4a9fd9
mov eax, dword [0x568660]
cmp dword [eax], 0
je 0x4aa1f2
mov edx, dword [0x568660]
mov edx, dword [edx]
mov eax, dword [0x5684d4]
mov eax, dword [eax]
call fcn.004a10c0
test al, al
je 0x4aa1f2
mov eax, dword [0x568660]
mov eax, dword [eax]
push dword [eax + 0x24]
push 0x4aa4ac
mov eax, dword [0x568660]
mov eax, dword [eax]
push dword [eax + 0x28]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.0040538c
push ebp
mov eax, dword [0x568660]
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [0x568660]
mov eax, dword [eax]
mov ecx, dword [eax + 0x90]
add ecx, 0x1e
mov eax, dword [0x568660]
mov eax, dword [eax]
mov edx, dword [eax + 0x8c]
mov eax, dword [ebp - 8]
call fcn.004a9e08
pop ecx
mov eax, dword [0x56860c]
cmp byte [eax], 0
je 0x4aa25a
mov eax, dword [0x5685c0]
mov eax, dword [eax]
push dword [eax + 0x24]
push 0x4aa4ac
mov eax, dword [0x5685c0]
mov eax, dword [eax]
push dword [eax + 0x28]
lea eax, [ebp - 0x18]
mov edx, 3
call fcn.0040538c
push ebp
mov eax, dword [0x5685c0]
mov eax, dword [eax]
mov eax, dword [eax + 0x2c]
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [0x5685c0]
mov eax, dword [eax]
mov ecx, dword [eax + 0x90]
add ecx, 0x1e
mov eax, dword [0x5685c0]
mov eax, dword [eax]
mov edx, dword [eax + 0x8c]
mov eax, dword [ebp - 8]
call fcn.004a9e08
pop ecx
mov eax, dword [0x5684d4]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a860]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x4aa3c9
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
mov eax, dword [0x5684d4]
mov eax, dword [eax]
mov eax, dword [eax + 0x5a860]
mov edx, dword [ebp - 0x10]
call fcn.004192fc
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x60], 0
je 0x4aa3bd
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 0x14]
sub eax, dword [edx + 0x88]
cmp eax, 0xfa0
jae 0x4aa3b2
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x94]
dec eax
test eax, eax
jl 0x4aa3bd
inc eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0x20], 0
je 0x4aa344
push 0x808080
lea eax, [ebp - 0x70]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + edx*4 + 0x60]
call fcn.00405964
mov eax, dword [ebp - 0x70]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x94]
shl eax, 4
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x90]
sub ecx, eax
imul eax, dword [ebp - 0xc], 0xe
add ecx, eax
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + eax*4 + 0x74]
sar eax, 1
jns 0x4aa32b
adc eax, 0
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x8c]
sub edx, eax
mov eax, dword [0x568518]
mov eax, dword [eax]
call fcn.00477154
jmp 0x4aa3a4
push 0xffffff
lea eax, [ebp - 0x74]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + edx*4 + 0x60]
call fcn.00405964
mov eax, dword [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x94]
shl eax, 4
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x90]
sub ecx, eax
imul eax, dword [ebp - 0xc], 0xe
add ecx, eax
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + eax*4 + 0x74]
sar eax, 1
jns 0x4aa38d
adc eax, 0
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x8c]
sub edx, eax
mov eax, dword [0x568518]
mov eax, dword [eax]
call fcn.00477154
inc dword [ebp - 0xc]
dec dword [ebp - 0x24]
jne 0x4aa2d9
jmp 0x4aa3bd
mov eax, dword [ebp - 0x14]
add eax, 0x60
call fcn.00404ff8
inc dword [ebp - 0x10]
dec dword [ebp - 0x20]
jne 0x4aa27e
mov eax, dword [0x5688e0]
test byte [eax], 4
je 0x4aa3ed
push 0x4aa4b4
push 0xffffff
mov eax, dword [0x568518]
mov eax, dword [eax]
xor ecx, ecx
xor edx, edx
call fcn.00477224
xor eax, eax
mov dword [ebp - 0x10], eax
xor eax, eax
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov eax, 1
shr eax, cl
mov edx, dword [0x5688e0]
and eax, dword [edx]
je 0x4aa463
mov edx, dword [ebp - 0xc]
add edx, 0x96
mov eax, dword [0x568484]
mov eax, dword [eax]
call fcn.0047c004
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4aa463
mov eax, dword [ebp - 0x1c]
mov si, 0xfff9
call fcn.004043ac
add dword [ebp - 0x10], eax
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x1c]
mov si, 0xfffa
call fcn.004043ac
lea eax, [ebp - 0x60]
push eax
mov eax, dword [ebp - 0x1c]
push eax
push 1
mov edx, 0x320
sub edx, dword [ebp - 0x10]
xor ecx, ecx
mov eax, dword [ebp - 8]
call fcn.00477b4c
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0x10
jne 0x4aa3f7
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4aa49e
lea eax, [ebp - 0x74]
mov edx, 2
call fcn.00405818
lea eax, [ebp - 0x3c]
call fcn.00404ff8
lea eax, [ebp - 0x18]
call fcn.00404ff8
ret