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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, 0x6074
call fcn.004fc970
mov eax, dword [0x588eb0]
xor eax, esp
mov dword [esp + 0x6070], eax
push ebx
push esi
mov esi, ecx
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 4]
push edi
mov edi, dword [ebp + 8]
sub esp, 8
mov dword [esp + 0x74], eax
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mov dword [esp + 0x58], ecx
mov dword [esp + 0x54], 1
divsd xmm0, qword [0x575350]
movsd qword [esp + 0x68], xmm0
fld qword [esp + 0x68]
fstp qword [esp]
call fcn.00522870
fstp qword [esp + 0x68]
cvttsd2si eax, qword [esp + 0x68]
add esp, 8
cmp eax, 1
je 0x4a55ca
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6070]
xor ecx, esp
call fcn.004fbc95
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x50]
xor ecx, ecx
mov dword [esp + 0x48], ecx
test edx, edx
je 0x4a577d
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, edx
sub eax, ecx
mov ecx, 0x5f00
cmp eax, ecx
push 0x5ff0
cmovb ecx, eax
push 0
mov dword [esp + 0x64], ecx
lea eax, [ecx + 0x10]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x90]
push eax
call fcn.004ffc00
mov eax, dword [esp + 0x58]
add esp, 0xc
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x5c]
push eax
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x4c]
add eax, dword [esp + 0x70]
push eax
lea eax, [esp + 0x90]
mov dword [esp + 0x84], 1
push eax
mov dword [esp + 0x90], ecx
call fcn.004fe150
add esp, 0xc
mov dword [esp + 0x40], 0x1f4
lea eax, [esp + 0x40]
mov ecx, esi
push edi
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x84]
push eax
call fcn.004a7750
test al, al
jne 0x4a570e
mov eax, dword [esp + 0x40]
mov dword [esp + 0x70], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x60], eax
push edi
lea eax, [esp + 0x74]
mov ecx, esi
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x84]
push eax
call fcn.004a7750
test al, al
jne 0x4a570e
cmp byte [esi + 0x68], al
jne 0x4a55b3
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x40]
cmp eax, ecx
jb 0x4a56dd
cmp ecx, 0xffffffff
jne 0x4a55b3
push 0
push dword [esi + 0x5c]
call ebx
test eax, eax
je 0x4a55b3
test edi, edi
je 0x4a5696
push 0
push edi
call ebx
test eax, eax
jne 0x4a5696
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x6070]
xor ecx, esp
call fcn.004fbc95
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x54]
test ecx, ecx
je 0x4a55b3
mov eax, dword [esi]
mov edx, dword [esp + 0x44]
mov eax, dword [eax + 0x18]
cmp edx, eax
cmovae edx, eax
lea eax, [esp + 0x78]
push edx
push eax
push ecx
mov dword [esp + 0x50], edx
call fcn.004fe150
mov eax, dword [esp + 0x64]
add esp, 0xc
mov dword [eax], 2
mov eax, dword [esi]
cmp dword [eax + 0x10], 0
je 0x4a5756
push dword [esi + 0x54]
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [esp + 0x44], 0
je 0x4a55b3
mov ecx, dword [esp + 0x48]
add ecx, dword [esp + 0x5c]
inc dword [esp + 0x4c]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x48], ecx
cmp ecx, edx
jne 0x4a55e2
mov ecx, dword [esp + 0x607c]
mov eax, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004fbc95
mov esp, ebp
pop ebp
ret