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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
mov ecx, 7
lea eax, [ebp - 0x20]
mov edx, dword [0x4010ac]
call fcn.004071ec
xor eax, eax
push ebp
push 0x50937c
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [0x540184], 0
je 0x508a95
xor eax, eax
call fcn.004eaf24
mov byte [ebp - 0x21], 0
mov eax, dword [0x538da0]
mov eax, dword [eax]
shr eax, 0x10
cmp eax, 0x600
mov eax, dword [0x5389f4]
setae byte [eax]
xor edx, edx
push ebp
push 0x5092bd
push dword fs:[edx]
mov dword fs:[edx], esp
cmp dword [0x540194], 0
je 0x508ad3
mov dl, 1
mov eax, dword [0x540194]
call fcn.004bb4a4
cmp byte [0x540182], 0
je 0x508b40
xor eax, eax
push ebp
push 0x508b13
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x540188], 0
jne 0x508aff
mov eax, 0x509398
call fcn.004bbf8c
jmp 0x508b09
mov eax, dword [0x540188]
call fcn.004bc170
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x508b40
mov eax, 0x509400
call fcn.004bc1cc
lea eax, [ebp - 0x2c]
mov ecx, dword [0x54016c]
mov edx, 0x509478
call fcn.00406914
mov eax, dword [ebp - 0x2c]
call fcn.004bc1cc
lea eax, [ebp - 0x30]
mov ecx, dword [0x540170]
mov edx, 0x5094b8
call fcn.00406914
mov eax, dword [ebp - 0x30]
call fcn.004bc1cc
lea eax, [ebp - 0x38]
call fcn.0048a468
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x34]
mov edx, 0x5094e4
call fcn.00406914
mov eax, dword [ebp - 0x34]
call fcn.004bc1cc
call fcn.004eafec
xor eax, eax
call fcn.00508370
mov dword [0x540178], eax
mov dl, 1
mov eax, dword [0x507698]
call fcn.004bf088
mov dword [0x5389a4], eax
mov ecx, dword [0x540170]
mov edx, dword [0x540178]
mov eax, dword [0x5389a4]
call fcn.004c1ca8
lea ecx, [ebp - 0x3c]
mov eax, dword [0x5389a4]
mov edx, dword [eax + 0x18]
mov al, 0xb7
call fcn.0048da74
mov edx, dword [ebp - 0x3c]
mov eax, 0x54017c
call fcn.00406448
mov eax, dword [0x5389a4]
test byte [eax + 0x1d], 0x20
je 0x508c3b
mov eax, dword [0x538ad4]
cmp byte [eax], 0
jne 0x508c3b
push 1
push 1
mov eax, dword [0x54017c]
call fcn.004064d4
push eax
mov eax, dword [0x538e7c]
mov eax, dword [eax + 0x2fc]
call fcn.004064d4
mov ecx, 0x30
pop edx
call fcn.004eb8d4
call fcn.0041bc28
mov eax, dword [0x5389a4]
test byte [eax + 0x1d], 1
je 0x508c7e
call fcn.0048b518
test al, al
jne 0x508c7e
push 1
push 1
mov eax, dword [0x54017c]
call fcn.004064d4
push eax
mov eax, dword [0x538e7c]
mov eax, dword [eax + 0x1dc]
call fcn.004064d4
mov ecx, 0x30
pop edx
call fcn.004eb8d4
call fcn.0041bc28
mov eax, dword [0x540178]
xor edx, edx
mov dword [0x540178], edx
call fcn.00404098
mov al, 2
call fcn.00508370
mov dword [0x540178], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov ecx, 0x85050900
mov dx, 0x20
mov eax, dword [0x5389a4]
call fcn.004bf554
test al, al
jne 0x508cc3
mov eax, 0x509524
call fcn.0048ef04
cmp dword [0x540194], 0
je 0x508cde
lea eax, [ebp - 4]
mov edx, dword [0x538d4c]
mov edx, dword [edx]
call fcn.0040532c
jmp 0x508ce9
lea edx, [ebp - 4]
mov eax, dword [ebp - 0x20]
call fcn.005089e4
mov eax, dword [0x5389a4]
cmp byte [eax + 0x10], 0
je 0x508d11
mov eax, dword [0x538ad4]
cmp byte [eax], 0
jne 0x508d08
mov eax, 0x5095bc
call fcn.0048ef04
mov al, 1
call fcn.004ebdc4
jmp 0x508d18
xor eax, eax
call fcn.004ebdc4
call fcn.004e90dc
cmp dword [ebp - 4], 0
je 0x508e20
call fcn.004e8ab8
call fcn.004e9414
mov eax, dword [0x538a04]
mov edx, dword [0x54016c]
call fcn.00406448
mov eax, dword [0x538de0]
mov edx, dword [0x5389a4]
mov edx, dword [edx + 0x14]
call fcn.00406448
movzx eax, byte [0x540183]
or al, byte [0x540184]
mov edx, dword [0x538b64]
mov byte [edx], al
mov eax, dword [0x538fd8]
mov edx, dword [ebp - 0x18]
call fcn.00406448
mov eax, dword [0x538c8c]
mov edx, dword [ebp - 0x14]
call fcn.00406448
mov eax, dword [0x538af0]
mov edx, dword [ebp - 0x10]
call fcn.00406448
mov eax, dword [0x538b90]
mov edx, dword [ebp - 0xc]
call fcn.00406448
mov eax, dword [ebp - 8]
test eax, eax
je 0x508da9
sub eax, 4
mov eax, dword [eax]
mov edx, eax
add edx, edx
mov eax, dword [ebp - 8]
call fcn.0050892c
mov dl, 1
mov eax, dword [0x504164]
call fcn.0050497c
mov edx, dword [0x538bb4]
mov dword [edx], eax
mov eax, 0x4ea9c4
mov edx, dword [0x538bb4]
mov edx, dword [edx]
mov dword [edx + 0xc], eax
mov eax, 0x4eabdc
mov edx, dword [0x538bb4]
mov edx, dword [edx]
mov dword [edx + 0x10], eax
mov eax, 0x4eabe8
mov edx, dword [0x538bb4]
mov edx, dword [edx]
mov dword [edx + 0x14], eax
mov eax, 0x4eabf4
mov edx, dword [0x538bb4]
mov edx, dword [edx]
mov dword [edx + 0x18], eax
mov ecx, dword [0x538c50]
mov ecx, dword [ecx]
mov eax, dword [0x538bb4]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
call fcn.00504a74
xor edx, edx
push ebp
push 0x509269
push dword fs:[edx]
mov dword fs:[edx], esp
xor edx, edx
push ebp
push 0x50919c
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x538bb4]
cmp dword [eax], 0
je 0x508eaf
xor edx, edx
push ebp
push 0x508e83
push dword fs:[edx]
mov dword fs:[edx], esp
push 0
push 0
push 1
xor eax, eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea ecx, [ebp - 0x44]
mov eax, dword [0x538bb4]
mov eax, dword [eax]
mov edx, 0x509650
call fcn.00504c30
pop dword fs:[0]
add esp, 8
jmp 0x508e9c
test al, al
jne 0x508eaf
mov eax, 0x5096e0
call fcn.004bc1cc
call fcn.0041bc28
cmp byte [0x540183], 0
jne 0x508ee9
cmp byte [0x540184], 0
jne 0x508ee9
push 0x124
push 1
push 6
mov eax, dword [0x5389a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x54017c]
mov al, 0x27
call fcn.00507a7c
cmp eax, 6
je 0x508ee9
call fcn.0041bc28
xor edx, edx
xor eax, eax
call fcn.005081e4
jmp 0x508f17
push 0x31
push 1
push 2
mov eax, dword [0x5389a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x54017c]
mov al, 0xbd
call fcn.00507a7c
dec eax
je 0x508f17
call fcn.0041bc28
mov eax, dword [0x5389a4]
call fcn.004bf5a8
test al, al
jne 0x508ef4
jmp 0x508f3a
push 0xa
call sub.kernel32.dll_Sleep_1
mov eax, dword [0x538e6c]
mov eax, dword [eax]
call fcn.00487694
mov eax, dword [0x539058]
cmp byte [eax], 0
jne 0x508f27
mov eax, dword [0x5389f4]
mov byte [eax], 0
lea ecx, [ebp - 0x48]
mov eax, dword [0x5389a4]
mov edx, dword [eax + 0x18]
mov al, 0xa7
call fcn.0048da74
mov edx, dword [ebp - 0x48]
mov eax, dword [0x538e6c]
mov eax, dword [eax]
mov eax, dword [eax + 0x170]
call fcn.0048bd6c
call fcn.005078c0
xor edx, edx
mov al, 1
call fcn.005081e4
call sub.kernel32.dll_GetTickCount_1
mov dword [ebp - 0x28], eax
mov eax, dword [0x5389a4]
mov edx, dword [ebp - 0x28]
mov dword [eax + 0x24], edx
mov ecx, 0x507d00
mov dl, 1
mov eax, dword [0x5389a4]
call fcn.004c0378
mov byte [ebp - 0x22], al
movzx eax, byte [ebp - 0x22]
mov edx, dword [0x538d94]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea edx, [ebp - 0x44]
xor ecx, ecx
mov eax, 0x509748
call fcn.004bc450
mov eax, dword [0x5389a4]
cmp byte [eax + 0x1c], 0
jne 0x508fe5
mov eax, dword [0x5389a4]
test byte [eax + 0x1d], 8
jne 0x508fe5
xor eax, eax
jmp 0x508fe7
mov al, 1
mov byte [ebp - 0x23], al
mov eax, dword [0x538bb4]
cmp dword [eax], 0
je 0x509085
mov eax, dword [0x538bb4]
mov eax, dword [eax]
mov edx, 0x509774
call fcn.00504b20
test al, al
je 0x509085
cmp byte [ebp - 0x23], 0
jne 0x50907b
xor eax, eax
push ebp
push 0x509060
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
push 0
xor eax, eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea ecx, [ebp - 0x44]
mov eax, dword [0x538bb4]
mov eax, dword [eax]
mov edx, 0x509774
call fcn.00504c30
test al, al
je 0x509056
mov byte [ebp - 0x23], 1
mov eax, 0x509798
call fcn.004bc1cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x509085
mov eax, 0x509878
call fcn.004bc1cc
movzx eax, byte [ebp - 0x23]
mov edx, dword [0x538d94]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea edx, [ebp - 0x44]
xor ecx, ecx
mov eax, 0x509930
call fcn.004bc450
cmp byte [0x540184], 0
jne 0x5090e0
mov eax, dword [0x538e6c]
mov eax, dword [eax]
call fcn.00487694
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [ebp - 0x28]
cmp eax, 0x3e8
jae 0x5090e0
push 0xff
push 0xa
push 0
push 0
push 0
call sub.user32.dll_MsgWaitForMultipleObjects
jmp 0x5090b1
mov eax, dword [0x538b04]
mov eax, dword [eax]
mov edx, dword [0x538b04]
xor ecx, ecx
mov dword [edx], ecx
call fcn.00404098
mov dl, 1
mov al, 2
call fcn.005081e4
cmp byte [ebp - 0x23], 0
jne 0x509140
cmp byte [0x540183], 0
jne 0x509189
cmp byte [0x540184], 0
jne 0x509189
push 0x10040
push 1
push 1
mov eax, dword [0x5389a4]
mov edx, dword [eax + 0x18]
movzx eax, byte [ebp - 0x22]
movzx eax, byte [eax + 0x5389b0]
mov ecx, dword [0x54017c]
call fcn.00507a7c
jmp 0x509189
cmp byte [0x540185], 0
jne 0x509179
cmp byte [0x540184], 0
jne 0x509175
push 0x10024
push 1
push 6
mov eax, dword [0x5389a4]
mov edx, dword [eax + 0x18]
mov ecx, dword [0x54017c]
mov al, 0xbb
call fcn.00507a7c
cmp eax, 6
jne 0x509179
mov byte [ebp - 0x21], 1
cmp byte [ebp - 0x21], 0
jne 0x509189
mov eax, 0x509974
call fcn.004bc1cc
mov dl, 1
mov al, 3
call fcn.005081e4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5091b0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x509273
xor edx, edx
push ebp
push 0x5091eb
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [0x538b04]
mov eax, dword [eax]
mov edx, dword [0x538b04]
xor ecx, ecx
mov dword [edx], ecx
call fcn.00404098
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5091fa
mov eax, dword [0x538bb4]
cmp dword [eax], 0
je 0x509256
xor eax, eax
push ebp
push 0x50923d
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
xor eax, eax
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0x11
lea ecx, [ebp - 0x44]
mov eax, dword [0x538bb4]
mov eax, dword [eax]
mov edx, 0x5099d0
call fcn.00504b7c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x509256
mov eax, dword [0x538e6c]
mov eax, dword [eax]
mov eax, dword [eax + 0x170]
call fcn.0048bdfc
ret