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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xb
push 0
push 0
dec ecx
jne 0x476d7c
push ebx
push esi
push edi
mov ebx, edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x47712c
push dword fs:[eax]
mov dword fs:[eax], esp
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.004866c0
mov eax, dword [ebp - 4]
cmp byte [eax + 0x268], 0
je 0x4770e2
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x276]
sub al, 2
jae 0x476ddd
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 4]
call fcn.00480ce0
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 4]
add eax, 0x270
call fcn.00404a84
jmp 0x476e0d
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x26c]
cmp eax, 0x1f4
jb 0x476dff
mov eax, dword [ebp - 4]
add eax, 0x270
call fcn.00404a30
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x26c], eax
mov al, byte [ebx]
sub al, 8
je 0x476e53
dec al
je 0x476e24
sub al, 0x12
jne 0x476fcd
jmp 0x4770e2
mov eax, dword [ebp - 4]
cmp byte [eax + 0x269], 0
je 0x4770e2
mov eax, dword [ebp - 4]
call fcn.00475ca8
test al, al
je 0x4770e2
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.00475ccc
jmp 0x4770e2
push ebp
lea edx, [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.00476c80
pop ecx
test al, al
je 0x476e70
push ebp
call fcn.00476cac
pop ecx
jmp 0x476fb9
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x276]
sub al, 2
jae 0x476f75
lea edx, [ebp - 0x38]
mov eax, dword [ebp - 4]
call fcn.00480ce0
mov eax, dword [ebp - 0x38]
call fcn.00404cf0
test eax, eax
jle 0x476f75
lea edx, [ebp - 0x14]
mov eax, dword [ebp - 4]
call fcn.00480ce0
mov esi, dword [ebp - 8]
jmp 0x476ead
dec esi
mov edx, esi
mov eax, dword [ebp - 0x14]
call fcn.0040e420
cmp al, 2
je 0x476eac
lea eax, [ebp - 0x10]
push eax
mov ecx, esi
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.00404f50
push 0
push 0xffffffffffffffff
push 0x14e
mov eax, dword [ebp - 4]
call fcn.00487714
push eax
call sub.user32.dll_SendMessageA
lea eax, [ebp - 0x40]
push eax
mov edx, dword [ebp - 0xc]
inc edx
mov ecx, 0x7fffffff
mov eax, dword [ebp - 0x14]
call fcn.00404f50
mov ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x3c]
mov edx, dword [ebp - 0x10]
call fcn.00404d3c
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 4]
call fcn.00480d10
mov edi, esi
dec edi
mov edx, edi
mov eax, edi
call fcn.00407f5c
push eax
push 0
push 0x142
mov eax, dword [ebp - 4]
call fcn.00487714
push eax
call sub.user32.dll_SendMessageA
lea edx, [ebp - 0x44]
mov eax, dword [ebp - 4]
call fcn.00480ce0
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 4]
add eax, 0x270
call fcn.00404a84
jmp 0x476fb9
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x270]
call fcn.00404cf0
mov edx, eax
mov eax, dword [ebp - 4]
add eax, 0x270
mov ecx, 1
call fcn.00404f90
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x270]
call fcn.00404cf0
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x270]
call fcn.0040e420
cmp al, 2
je 0x476f53
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x270]
call fcn.00404cf0
mov edx, eax
mov eax, dword [ebp - 4]
add eax, 0x270
mov ecx, 1
call fcn.00404f90
mov byte [ebx], 0
mov eax, dword [ebp - 4]
mov si, 0xffb3
call fcn.00403df8
jmp 0x4770e2
mov eax, dword [ebp - 4]
cmp byte [eax + 0x269], 0
je 0x476fef
mov eax, dword [ebp - 4]
call fcn.00475ca8
test al, al
jne 0x476fef
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.00475ccc
push ebp
lea edx, [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.00476c80
pop ecx
test al, al
je 0x477036
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x270]
mov ecx, dword [ebp - 8]
mov edx, 1
call fcn.00404f50
mov eax, dword [ebp - 0x48]
push eax
lea eax, [ebp - 0x4c]
mov dl, byte [ebx]
call fcn.00404c18
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x14]
pop edx
call fcn.00404d3c
jmp 0x477054
lea eax, [ebp - 0x50]
mov dl, byte [ebx]
call fcn.00404c18
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x270]
lea eax, [ebp - 0x14]
call fcn.00404d3c
mov al, byte [ebx]
mov edx, dword [0x5d5630]
and eax, 0xff
bt dword [edx], eax
jae 0x4770d0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00487714
push eax
lea eax, [ebp - 0x30]
push eax
call sub.user32.dll_PeekMessageA
test eax, eax
je 0x4770e2
cmp dword [ebp - 0x2c], 0x102
jne 0x4770e2
lea eax, [ebp - 0x58]
mov dl, byte [ebp - 0x28]
call fcn.00404c18
mov ecx, dword [ebp - 0x58]
lea eax, [ebp - 0x54]
mov edx, dword [ebp - 0x14]
call fcn.00404d3c
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 4]
call fcn.0047713c
test al, al
je 0x4770e2
push 1
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00487714
push eax
lea eax, [ebp - 0x30]
push eax
call sub.user32.dll_PeekMessageA
mov byte [ebx], 0
jmp 0x4770e2
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
call fcn.0047713c
test al, al
je 0x4770e2
mov byte [ebx], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x477133
lea eax, [ebp - 0x58]
mov edx, 5
call fcn.00404a54
lea eax, [ebp - 0x44]
call fcn.00404a30
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.00404a54
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.00404a54
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00404a54
ret