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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0xa
push 0
push 0
dec ecx
jne 0x5a3591
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00404920
mov eax, dword [ebp - 8]
call fcn.00404920
xor eax, eax
push ebp
push 0x5a384c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
cmp dword [ebp - 4], 0
je 0x5a35f1
lea eax, [ebp - 0x30]
push eax
mov ecx, 0xb
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00404990
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x1c]
call fcn.00408c7c
jmp 0x5a3614
lea eax, [ebp - 0x34]
push eax
mov ecx, 0xb
mov edx, 1
mov eax, dword [0x5b45bc]
call fcn.00404990
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x1c]
call fcn.00408c7c
mov eax, dword [ebp - 8]
call fcn.00404730
cmp eax, 0x40
jne 0x5a381c
lea eax, [ebp - 0x40]
push eax
mov ecx, 0x20
mov edx, 0x21
mov eax, dword [ebp - 8]
call fcn.00404990
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, 0x5a3868
call fcn.0040477c
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x38]
call fcn.0059b738
mov ecx, dword [ebp - 0x38]
mov dl, 1
mov eax, dword [0x4183c8]
call fcn.0041d6e8
mov dword [ebp - 0x10], eax
xor ecx, ecx
mov dl, 1
mov eax, dword [0x4183c8]
call fcn.0041d6e8
mov dword [ebp - 0x14], eax
xor edx, edx
push ebp
push 0x5a3815
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
call dword [edx]
mov dword [ebp - 0x18], eax
call sub.kernel32.dll_GetTickCount_1
lea edx, [ebp - 0x18]
mov ecx, 4
mov eax, dword [ebp - 0x10]
call fcn.0041d018
jmp 0x5a36b8
lea eax, [ebp - 0x2c]
xor ecx, ecx
mov edx, 0x10
call fcn.00403020
lea eax, [ebp - 0x44]
mov ecx, 0x5a387c
mov edx, dword [ebp - 0x1c]
call fcn.0040477c
mov eax, dword [ebp - 0x44]
call fcn.00404730
mov edx, eax
mov eax, 0x10
call fcn.0042c36c
push eax
lea eax, [ebp - 0x48]
mov ecx, 0x5a387c
mov edx, dword [ebp - 0x1c]
call fcn.0040477c
mov eax, dword [ebp - 0x48]
call fcn.00404930
lea edx, [ebp - 0x2c]
pop ecx
call fcn.00402988
jmp 0x5a371f
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
call dword [edx]
push eax
mov eax, dword [ebp - 0x10]
call fcn.0041cdec
pop edx
sub edx, eax
lea ecx, [ebp - 0x2c]
mov eax, dword [ebp - 0x10]
call fcn.00593134
call sub.kernel32.dll_GetTickCount_1
mov eax, ebx
call fcn.0044a690
mov eax, dword [ebp - 0x14]
cmp dword [eax + 4], 0
je 0x5a37f7
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 4]
mov eax, 0x5a388c
call fcn.00404a74
test eax, eax
jle 0x5a37f7
lea edx, [ebp - 0x4c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 4]
call fcn.00408c7c
mov eax, dword [ebp - 0x4c]
call fcn.00404730
cmp eax, 8
jne 0x5a37f7
lea edx, [ebp - 0x50]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 4]
call fcn.00408c7c
mov eax, dword [ebp - 0x50]
mov edx, 0x5b4510
call fcn.00409330
test al, al
je 0x5a37f7
xor eax, eax
push ebp
push 0x5a37ed
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x54]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 4]
call fcn.00408c7c
mov eax, dword [ebp - 0x54]
call fcn.004092dc
mov dword [0x5b4510], eax
mov dword [0x5b4514], 1
mov byte [ebp - 9], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5a37f7
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5a381c
mov eax, dword [ebp - 0x10]
call fcn.0040366c
mov eax, dword [ebp - 0x14]
call fcn.0040366c
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5a3853
lea eax, [ebp - 0x54]
mov edx, 0xa
call fcn.00404484
lea eax, [ebp - 0x1c]
call fcn.00404460
lea eax, [ebp - 8]
mov edx, 2
call fcn.00404484
ret