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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
call fcn.00404c38
xor eax, eax
push ebp
push 0x508d5b
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x508ab3
mov eax, dword [0x5b69cc]
cmp dword [eax + 8], 0
jle 0x508b7f
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [0x5b69e8]
cmp eax, 0x2710
jbe 0x508ae5
call sub.kernel32.dll_GetTickCount_1
mov dword [0x5b69e8], eax
push ebp
call fcn.005089f4
pop ecx
mov eax, dword [0x5b69cc]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x508b7f
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x10]
mov eax, dword [0x5b69cc]
call fcn.0041b11c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x508b77
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 4]
call fcn.00404b94
jne 0x508b77
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
cmp eax, dword [edx + 8]
jne 0x508b77
mov edx, dword [ebp - 0x10]
mov eax, dword [0x5b69cc]
call fcn.0041b11c
add eax, 0x24
push eax
call sub.kernel32.dll_GetTickCount_1
pop edx
mov dword [edx], eax
lea edx, [ebp - 0x30]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486068
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
push eax
push 1
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.004858d4
jmp 0x508d45
inc dword [ebp - 0x10]
dec dword [ebp - 0x20]
jne 0x508b01
cmp dword [ebp + 8], 0
je 0x508d35
mov edx, dword [0x506254]
mov eax, 0x28
call fcn.0040581c
mov dword [ebp - 0x14], eax
mov eax, dword [0x5abad8]
mov eax, dword [eax]
mov eax, dword [eax + 0x344]
mov ecx, dword [eax + 0x274]
mov dl, 1
mov eax, dword [0x482a64]
call fcn.00484ea4
mov edx, dword [ebp - 0x14]
mov dword [edx], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov byte [eax + 0x28], 1
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
call fcn.00427594
cmp eax, 9
jne 0x508bf8
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
call fcn.004275f0
mov dl, byte [0x508d68]
cmp dl, al
jne 0x508c1d
mov eax, dword [ebp - 4]
call fcn.00486030
lea ecx, [ebp - 0x1c]
mov edx, dword [ebp + 8]
call fcn.00428498
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486b78
jmp 0x508c53
mov eax, dword [0x5abad8]
mov eax, dword [eax]
call fcn.00469d4c
mov edx, dword [ebp + 8]
call fcn.00428518
push eax
mov eax, dword [0x5abad8]
mov eax, dword [eax]
call fcn.00469d4c
mov edx, dword [ebp + 8]
call fcn.004284f0
mov edx, eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
pop ecx
call fcn.00486b78
mov edx, 0x12
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00485e50
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
pop edx
call fcn.004285d0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
mov eax, dword [eax + 0xc]
mov edx, dword [ebp + 0xc]
call fcn.004272b8
push 1
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
call fcn.00428720
push eax
call sub.gdi32.dll_SetBkMode
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
xor ecx, ecx
xor edx, edx
call fcn.00428344
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
call fcn.00484e10
mov edx, 0x12
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486ca4
lea edx, [ebp - 0x30]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486068
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
push eax
push 1
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.004858d4
mov eax, dword [ebp - 0x14]
add eax, 4
mov edx, dword [ebp + 8]
call fcn.004047dc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
mov dword [edx + 8], eax
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x24], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [0x5b69cc]
call fcn.0041af1c
jmp 0x508d45
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x508d62
lea eax, [ebp + 8]
call fcn.00404788
ret