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

Disassembly:
push ebx
push esi
add esp, 0xffffffec
mov ebx, eax
cmp byte [ebx + 0x18], 0
je 0x50834c
mov eax, dword [0x53e6d8]
cmp dword [eax], 0
jne 0x50832e
mov eax, ebx
call fcn.00507790
mov eax, dword [0x53e6d8]
cmp dword [eax], 0
je 0x50834c
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
cmp byte [eax + 0x30], 0
je 0x50834c
mov eax, ebx
call fcn.00507790
mov eax, dword [0x53ef18]
cmp byte [eax + 0x138], 0
je 0x50876d
cmp byte [ebx + 0x18], 0
je 0x50876d
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [ebx + 0x1c]
cmp eax, 0xc8
jbe 0x50876d
call sub.kernel32.dll_GetTickCount_1
mov dword [ebx + 0x1c], eax
mov eax, dword [0x53e520]
mov eax, dword [eax]
mov edx, dword [ebx + 4]
call fcn.00510f1c
test al, al
jne 0x50839b
xor eax, eax
mov dword [ebx + 4], eax
mov eax, dword [ebx + 4]
test eax, eax
je 0x5083ad
cmp byte [eax + 0x30], 0
je 0x5083ad
xor eax, eax
mov dword [ebx + 4], eax
mov eax, dword [ebx + 4]
test eax, eax
je 0x5083c0
cmp word [eax + 0x56], 0
jne 0x5083c0
xor eax, eax
mov dword [ebx + 4], eax
cmp dword [ebx + 4], 0
jne 0x5083cd
mov eax, ebx
call fcn.00507e20
cmp dword [ebx + 4], 0
je 0x508629
xor eax, eax
mov dword [esp], eax
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
cmp byte [eax + 0x1a], 0
jbe 0x50861a
push 4
mov esi, dword [ebx + 4]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov eax, ebx
call fcn.00507e08
dec eax
jle 0x508475
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.00483f48
test eax, eax
jl 0x508475
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.00483e18
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.00483f48
cmp esi, eax
jle 0x508475
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.00483f48
push eax
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.00483e18
pop edx
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov dword [esp], eax
cmp dword [esp], 0
jne 0x5084ee
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.00483f48
test eax, eax
jl 0x5084ee
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.00483e18
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.00483f48
cmp esi, eax
jle 0x5084ee
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.00483f48
push eax
mov eax, dword [0x53f218]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.00483e18
pop edx
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov dword [esp], eax
cmp dword [esp], 0
je 0x5085a7
mov eax, dword [0x53f0e0]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x53e830]
mov edx, dword [ebx + 4]
mov dword [eax], edx
mov edx, dword [0x53ec6c]
push edx
mov edx, dword [0x53eb6c]
push edx
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [0x53e520]
mov eax, dword [eax]
call fcn.00510228
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [ebx + 0x20]
cmp eax, 0x3e8
jbe 0x508576
mov eax, dword [0x53ea98]
mov eax, dword [eax]
cmp word [eax + 0x3ca], 0
jne 0x508576
call sub.kernel32.dll_GetTickCount_1
mov dword [ebx + 0x20], eax
mov eax, dword [esp]
push eax
mov ecx, dword [0x53eb6c]
mov ecx, dword [ecx]
mov edx, dword [0x53ec6c]
mov edx, dword [edx]
mov eax, dword [0x53ea98]
mov eax, dword [eax]
call fcn.004a49b4
push 2
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov edx, dword [eax + 8]
mov eax, ebx
call fcn.00507e08
test eax, eax
jle 0x50876d
mov eax, ebx
call fcn.00507fcc
jmp 0x50876d
mov esi, dword [ebx + 4]
mov eax, dword [esi + 0xc]
push eax
mov ecx, dword [esi + 8]
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.005388ac
and eax, 0xff
lea ecx, [esp + 0xc]
push ecx
lea ecx, [esp + 0x14]
push ecx
mov edx, dword [ebx + 4]
mov ecx, dword [edx + 8]
mov edx, dword [edx + 0xc]
xchg ecx, eax
call fcn.00538a0c
push 1
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, ebx
call fcn.00507a84
test al, al
je 0x50860c
mov eax, dword [0x53f0e0]
mov edx, dword [ebx + 4]
mov dword [eax], edx
jmp 0x50876d
mov eax, dword [0x53f0e0]
xor edx, edx
mov dword [eax], edx
jmp 0x50876d
mov eax, dword [0x53f0e0]
mov edx, dword [ebx + 4]
mov dword [eax], edx
jmp 0x50876d
mov eax, dword [0x53e824]
cmp dword [eax], 0
jle 0x5086f8
mov eax, dword [0x53e6cc]
cmp dword [eax], 0
jle 0x5086f8
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov edx, dword [0x53e824]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
dec eax
jge 0x50876d
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov edx, dword [0x53e6cc]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
dec eax
jge 0x50876d
lea ecx, [esp + 8]
lea edx, [esp + 4]
mov eax, ebx
call fcn.00507d30
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov eax, dword [eax + 8]
sub eax, dword [esp + 4]
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jge 0x5086c0
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [esp + 8]
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jl 0x5086ca
mov eax, dword [0x53ed98]
mov byte [eax], 1
jmp 0x5086d2
mov eax, dword [0x53ed98]
mov byte [eax], 0
mov eax, dword [0x53e824]
mov edx, dword [esp + 4]
mov dword [eax], edx
mov eax, dword [0x53e6cc]
mov edx, dword [esp + 8]
mov dword [eax], edx
mov eax, dword [esp + 4]
mov dword [ebx + 8], eax
mov eax, dword [esp + 8]
mov dword [ebx + 0xc], eax
jmp 0x50876d
lea ecx, [esp + 8]
lea edx, [esp + 4]
mov eax, ebx
call fcn.00507d30
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov eax, dword [eax + 8]
sub eax, dword [esp + 4]
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jge 0x508737
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
sub eax, dword [esp + 8]
cdq
xor eax, edx
sub eax, edx
cmp eax, 2
jl 0x508741
mov eax, dword [0x53ed98]
mov byte [eax], 1
jmp 0x508749
mov eax, dword [0x53ed98]
mov byte [eax], 0
mov eax, dword [0x53e824]
mov edx, dword [esp + 4]
mov dword [eax], edx
mov eax, dword [0x53e6cc]
mov edx, dword [esp + 8]
mov dword [eax], edx
mov eax, dword [esp + 4]
mov dword [ebx + 8], eax
mov eax, dword [esp + 8]
mov dword [ebx + 0xc], eax
add esp, 0x14
pop esi
pop ebx
ret