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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x24], ebx
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 0x5089df
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x508548
mov eax, dword [0x5b69d4]
cmp dword [eax + 8], 0
jle 0x50870e
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [0x5b69f0]
cmp eax, 0x2710
jbe 0x50857a
call sub.kernel32.dll_GetTickCount_1
mov dword [0x5b69f0], eax
push ebp
call fcn.00508480
pop ecx
mov eax, dword [0x5b69d4]
mov eax, dword [eax + 8]
dec eax
test eax, eax
jl 0x50870e
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x10]
mov eax, dword [0x5b69d4]
call fcn.0041b11c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x508702
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 4]
call fcn.00404b94
jne 0x508702
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
lea edx, [ebp - 0x24]
call fcn.0042750c
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
call fcn.00404b94
jne 0x508702
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
call fcn.00427594
mov edx, dword [ebp - 0x14]
cmp eax, dword [edx + 0x18]
jne 0x508702
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
call fcn.004275f0
mov edx, dword [ebp - 0x14]
mov dl, byte [edx + 0x14]
cmp dl, al
jne 0x508702
mov edx, dword [ebp - 0x10]
mov eax, dword [0x5b69d4]
call fcn.0041b11c
add eax, 0x24
push eax
call sub.kernel32.dll_GetTickCount_1
pop edx
mov dword [edx], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp - 0x14]
cmp eax, dword [edx + 8]
jne 0x508675
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486068
lea eax, [ebp - 0x34]
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 0x5089b9
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 - 0x14]
mov eax, dword [eax]
call fcn.00486030
mov eax, dword [eax + 0xc]
mov edx, dword [ebp + 0x10]
call fcn.004272b8
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
mov ecx, 1
mov edx, 1
call fcn.00428344
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
call fcn.00484e10
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486068
lea eax, [ebp - 0x34]
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 + 0x10]
mov edx, dword [ebp - 0x14]
mov dword [edx + 8], eax
jmp 0x5089b9
inc dword [ebp - 0x10]
dec dword [ebp - 0x20]
jne 0x508596
cmp dword [ebp + 8], 0
je 0x5089a9
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 0x508787
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
call fcn.004275f0
mov dl, byte [0x5089f0]
cmp dl, al
jne 0x5087ac
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 0x5087e8
mov eax, dword [0x5abad8]
mov eax, dword [eax]
call fcn.00469d4c
mov edx, dword [ebp + 8]
call fcn.00428518
add eax, 2
push eax
mov eax, dword [0x5abad8]
mov eax, dword [eax]
call fcn.00469d4c
mov edx, dword [ebp + 8]
call fcn.004284f0
mov edx, eax
add edx, 2
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
mov ecx, 1
xor edx, edx
call fcn.00428344
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
mov ecx, 1
mov edx, 2
call fcn.00428344
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
xor ecx, ecx
mov edx, 1
call fcn.00428344
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
mov ecx, 2
mov edx, 1
call fcn.00428344
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
mov eax, dword [eax + 0xc]
mov edx, dword [ebp + 0x10]
call fcn.004272b8
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486030
mov ecx, 1
mov edx, 1
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 - 0x34]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00486068
lea eax, [ebp - 0x34]
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 + 0x10]
mov edx, dword [ebp - 0x14]
mov dword [edx + 8], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x14]
mov dword [edx + 0xc], eax
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x24], eax
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
lea edx, [ebp - 0x38]
call fcn.0042750c
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x14]
add eax, 0x10
call fcn.004047dc
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
call fcn.004275f0
mov edx, dword [ebp - 0x14]
mov byte [edx + 0x14], al
mov eax, dword [ebp - 4]
call fcn.00486030
mov eax, dword [eax + 0xc]
call fcn.00427594
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x18], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [0x5b69d4]
call fcn.0041af1c
jmp 0x5089b9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5089e6
lea eax, [ebp - 0x38]
call fcn.00404788
lea eax, [ebp - 0x24]
call fcn.00404788
lea eax, [ebp + 8]
call fcn.00404788
ret