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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
mov dword [ebp - 4], eax
cmp dword [0x58bc58], 0
je 0x4b0495
cmp dword [0x58d980], 0
jl 0x4b035b
mov eax, dword [ebp - 4]
call fcn.004b7af0
test al, al
je 0x4b035b
mov eax, dword [ebp - 4]
call fcn.004b7a94
test al, al
je 0x4b035b
mov eax, dword [0x58bc58]
movzx eax, word [eax + 8]
cmp eax, dword [0x58d980]
jne 0x4aff4d
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0xa]
cmp eax, dword [0x58d98c]
je 0x4b035b
mov eax, dword [0x58bc58]
movzx eax, word [eax + 8]
mov dword [ebp - 8], eax
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0xa]
mov dword [ebp - 0xc], eax
mov eax, dword [0x58d980]
mov dword [ebp - 0x18], eax
mov eax, dword [0x58d98c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
call fcn.00511df0
mov byte [ebp - 0x21], al
mov al, byte [0x58d9c8]
sub al, 1
jb 0x4aff9e
je 0x4b01e0
jmp 0x4b035b
mov eax, dword [0x58bc58]
call fcn.005079d4
mov dword [ebp - 0x20], eax
xor ecx, ecx
mov cl, byte [ebp - 0x21]
mov edx, 0xbc3
mov eax, dword [ebp - 4]
call fcn.004b7d70
test al, al
je 0x4b01d1
cmp dword [ebp - 0x20], 0
jle 0x4b01d1
lea ecx, [ebp - 0xc]
lea edx, [ebp - 8]
mov al, byte [ebp - 0x21]
call fcn.00511ab8
mov byte [ebp - 0x24], 1
mov byte [ebp - 0x25], 0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [0x58bbf0]
call fcn.004c9d34
test al, al
jne 0x4b019f
mov byte [ebp - 0x24], 0
mov byte [ebp - 0x22], 0
cmp byte [ebp - 0x24], 0
jne 0x4b0047
mov eax, dword [0x58bc58]
movzx eax, word [eax + 8]
mov dword [ebp - 8], eax
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0xa]
mov dword [ebp - 0xc], eax
lea ecx, [ebp - 0xc]
lea edx, [ebp - 8]
mov al, byte [ebp - 0x21]
call fcn.00511ab8
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.004b39cc
test al, al
je 0x4b0047
mov byte [ebp - 0x25], 1
cmp byte [ebp - 0x25], 0
jne 0x4b0101
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [0x58bbf0]
call fcn.004c9d78
test al, al
jne 0x4b0101
mov eax, dword [0x58bc58]
movzx eax, word [eax + 8]
mov dword [ebp - 8], eax
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0xa]
mov dword [ebp - 0xc], eax
xor eax, eax
mov al, byte [ebp - 0x21]
call fcn.00512704
mov byte [ebp - 0x22], al
lea ecx, [ebp - 0xc]
lea edx, [ebp - 8]
mov al, byte [ebp - 0x22]
call fcn.00511ab8
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [0x58bc50]
call fcn.00510384
test al, al
jne 0x4b00fd
mov eax, dword [0x58bc58]
movzx eax, word [eax + 8]
mov dword [ebp - 8], eax
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0xa]
mov dword [ebp - 0xc], eax
xor eax, eax
mov al, byte [ebp - 0x21]
call fcn.0051272c
mov byte [ebp - 0x22], al
lea ecx, [ebp - 0xc]
lea edx, [ebp - 8]
mov al, byte [ebp - 0x22]
call fcn.00511ab8
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [0x58bc50]
call fcn.00510384
test al, al
je 0x4b0101
mov byte [ebp - 0x24], 1
jmp 0x4b0101
mov byte [ebp - 0x24], 1
cmp byte [ebp - 0x24], 0
je 0x4b0139
mov eax, dword [ebp - 0xc]
push eax
xor eax, eax
mov al, byte [ebp - 0x22]
push eax
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 8]
mov dx, 0xbc3
mov eax, dword [0x58bc58]
call fcn.00506a0c
call sub.kernel32.dll_GetTickCount_1
mov dword [0x58d84c], eax
jmp 0x4b035b
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [0x58bc58]
movzx edx, word [eax + 0xa]
mov eax, dword [0x58bc58]
movzx eax, word [eax + 8]
mov ecx, dword [ebp - 0x18]
call fcn.00511df0
mov byte [ebp - 0x23], al
mov eax, dword [0x58bc58]
mov al, byte [eax + 0x10]
cmp al, byte [ebp - 0x23]
je 0x4b035b
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0xa]
push eax
xor eax, eax
mov al, byte [ebp - 0x23]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x58bc58]
movzx ecx, word [eax + 8]
mov dx, 0xbc2
mov eax, dword [0x58bc58]
call fcn.0050694c
jmp 0x4b035b
mov eax, dword [ebp - 0xc]
push eax
xor eax, eax
mov al, byte [ebp - 0x21]
push eax
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 8]
mov dx, 0xbc3
mov eax, dword [0x58bc58]
call fcn.00506a0c
call sub.kernel32.dll_GetTickCount_1
mov dword [0x58d84c], eax
jmp 0x4b035b
mov dword [0x58d980], 0xffffffff
jmp 0x4b035b
cmp dword [0x58d9cc], 1
jge 0x4b0203
cmp byte [0x5a5141], 0
jbe 0x4b0350
cmp byte [0x59191a], 0
jbe 0x4b0350
mov eax, dword [0x58bc58]
call fcn.005079ec
mov dword [ebp - 0x20], eax
mov eax, dword [0x58bc58]
cmp byte [eax + 0x22], 0
jbe 0x4b0221
mov byte [ebp - 0x26], 3
jmp 0x4b0225
mov byte [ebp - 0x26], 2
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
call fcn.00511a80
xor edx, edx
mov dl, byte [ebp - 0x26]
cmp eax, edx
jl 0x4b0341
cmp dword [ebp - 0x20], 0
jle 0x4b0341
xor ecx, ecx
mov cl, byte [ebp - 0x21]
mov edx, 0xbc5
mov eax, dword [ebp - 4]
call fcn.004b7d70
test al, al
je 0x4b0335
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [0x58bc58]
cmp byte [eax + 0x22], 0
jbe 0x4b028f
lea ecx, [ebp - 0xc]
lea edx, [ebp - 8]
mov al, byte [ebp - 0x21]
call fcn.00511b74
jmp 0x4b029d
lea ecx, [ebp - 0xc]
lea edx, [ebp - 8]
mov al, byte [ebp - 0x21]
call fcn.00511c3c
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [0x58bc58]
movzx ecx, word [eax + 0xa]
mov eax, dword [0x58bc58]
movzx edx, word [eax + 8]
mov eax, dword [0x58bbf0]
call fcn.004c9c80
test al, al
je 0x4b0324
mov eax, dword [0x58bc58]
cmp byte [eax + 0x22], 0
jbe 0x4b02f5
mov eax, dword [ebp - 0xc]
push eax
xor eax, eax
mov al, byte [ebp - 0x21]
push eax
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 8]
mov dx, 0xbc1
mov eax, dword [0x58bc58]
call fcn.00506a0c
jmp 0x4b0318
mov eax, dword [ebp - 0xc]
push eax
xor eax, eax
mov al, byte [ebp - 0x21]
push eax
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 8]
mov dx, 0xbc5
mov eax, dword [0x58bc58]
call fcn.00506a0c
call sub.kernel32.dll_GetTickCount_1
mov dword [0x58d84c], eax
jmp 0x4b035b
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
jmp 0x4aff9e
mov dword [0x58d980], 0xffffffff
jmp 0x4b035b
mov dword [0x58d980], 0xffffffff
jmp 0x4aff9e
inc dword [0x58d9cc]
jmp 0x4aff9e
mov dword [0x58d980], 0xffffffff
mov eax, dword [0x58bc58]
cmp word [eax + 0x298], 0
jbe 0x4b0495
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0x298]
mov edx, dword [ebp - 4]
mov dword [edx + 0x4a4], eax
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0x29a]
mov edx, dword [ebp - 4]
mov dword [edx + 0x4a8], eax
mov eax, dword [0x58bc58]
cmp word [eax + 0x298], 0xbc9
jne 0x4b03f8
mov eax, dword [0x58bc58]
mov eax, dword [eax + 0x2a0]
push eax
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0x29a]
push eax
mov eax, dword [0x58bc58]
mov eax, dword [eax + 0x2a4]
push eax
mov eax, dword [0x58bc58]
mov ecx, dword [eax + 0x29c]
mov eax, dword [0x58bc58]
movzx edx, word [eax + 0x298]
mov eax, dword [ebp - 4]
call fcn.004b61fc
jmp 0x4b0430
mov eax, dword [0x58bc58]
mov eax, dword [eax + 0x2a0]
push eax
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0x29a]
push eax
mov eax, dword [0x58bc58]
mov ecx, dword [eax + 0x29c]
mov eax, dword [0x58bc58]
movzx edx, word [eax + 0x298]
mov eax, dword [ebp - 4]
call fcn.004b6120
mov eax, dword [0x58bc58]
mov word [eax + 0x298], 0
cmp dword [0x58d9ec], 0xffffffff
je 0x4b0495
mov eax, dword [0x58bc58]
movzx eax, word [eax + 8]
push eax
mov eax, dword [0x58d9ec]
pop edx
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, 8
jge 0x4b047f
mov eax, dword [0x58bc58]
movzx eax, word [eax + 0xa]
push eax
mov eax, dword [0x58d9f0]
pop edx
sub eax, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, 8
jl 0x4b0495
mov eax, dword [0x532f8c]
mov eax, dword [eax]
call fcn.004ea7b4
mov dword [0x58d9ec], 0xffffffff
mov esp, ebp
pop ebp
ret