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

Disassembly:
push ebx
push esi
add esp, 0xffffffec
mov ebx, eax
cmp byte [ebx + 0x18], 0
je 0x50075c
mov eax, dword [0x544738]
cmp dword [eax], 0
jne 0x50073e
mov eax, ebx
call fcn.004ffba4
mov eax, dword [0x544738]
cmp dword [eax], 0
je 0x50075c
mov eax, dword [0x544738]
mov eax, dword [eax]
cmp byte [eax + 0x2c], 0
je 0x50075c
mov eax, ebx
call fcn.004ffba4
mov eax, dword [0x544f94]
cmp byte [eax + 0x13c], 0
je 0x500b7c
cmp byte [ebx + 0x18], 0
je 0x500b7c
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [ebx + 0x1c]
cmp eax, 0xc8
jbe 0x500b7c
call sub.kernel32.dll_GetTickCount_1
mov dword [ebx + 0x1c], eax
mov eax, dword [0x544574]
mov eax, dword [eax]
mov edx, dword [ebx + 4]
call fcn.00525088
test al, al
jne 0x5007ab
xor eax, eax
mov dword [ebx + 4], eax
mov eax, dword [ebx + 4]
test eax, eax
je 0x5007bd
cmp byte [eax + 0x2c], 0
je 0x5007bd
xor eax, eax
mov dword [ebx + 4], eax
mov eax, dword [ebx + 4]
test eax, eax
je 0x5007cf
cmp dword [eax + 0x54], 0
jne 0x5007cf
xor eax, eax
mov dword [ebx + 4], eax
cmp dword [ebx + 4], 0
jne 0x5007dc
mov eax, ebx
call fcn.00500234
cmp dword [ebx + 4], 0
je 0x500a38
xor eax, eax
mov dword [esp], eax
mov eax, dword [0x544738]
mov eax, dword [eax]
cmp byte [eax + 0x19], 0
jbe 0x500a29
push 4
mov esi, dword [ebx + 4]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov eax, ebx
call fcn.0050021c
dec eax
jle 0x500884
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.0047a7b0
test eax, eax
jl 0x500884
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.0047a680
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.0047a7b0
cmp esi, eax
jle 0x500884
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.0047a7b0
push eax
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb0c]
call fcn.0047a680
pop edx
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov dword [esp], eax
cmp dword [esp], 0
jne 0x5008fd
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.0047a7b0
test eax, eax
jl 0x5008fd
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.0047a680
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.0047a7b0
cmp esi, eax
jle 0x5008fd
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.0047a7b0
push eax
mov eax, dword [0x5452a8]
mov eax, dword [eax]
mov eax, dword [eax + 0xb14]
call fcn.0047a680
pop edx
mov ecx, dword [eax]
call dword [ecx + 0x18]
mov dword [esp], eax
cmp dword [esp], 0
je 0x5009b6
mov eax, dword [0x54515c]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x544898]
mov edx, dword [ebx + 4]
mov dword [eax], edx
mov edx, dword [0x544ccc]
push edx
mov edx, dword [0x544bd4]
push edx
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
mov eax, dword [0x544574]
mov eax, dword [eax]
call fcn.00524294
call sub.kernel32.dll_GetTickCount_1
sub eax, dword [ebx + 0x20]
cmp eax, 0x3e8
jbe 0x500985
mov eax, dword [0x544afc]
mov eax, dword [eax]
cmp word [eax + 0x506], 0
jne 0x500985
call sub.kernel32.dll_GetTickCount_1
mov dword [ebx + 0x20], eax
mov eax, dword [esp]
push eax
mov ecx, dword [0x544bd4]
mov ecx, dword [ecx]
mov edx, dword [0x544ccc]
mov edx, dword [edx]
mov eax, dword [0x544afc]
mov eax, dword [eax]
call fcn.004a4238
push 2
mov eax, dword [0x544738]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x544738]
mov eax, dword [eax]
mov edx, dword [eax + 8]
mov eax, ebx
call fcn.0050021c
test eax, eax
jle 0x500b7c
mov eax, ebx
call fcn.005003dc
jmp 0x500b7c
mov esi, dword [ebx + 4]
mov eax, dword [esi + 0xc]
push eax
mov ecx, dword [esi + 8]
mov eax, dword [0x544738]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x544738]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.00527538
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.00527698
push 1
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, ebx
call fcn.004ffe98
test al, al
je 0x500a1b
mov eax, dword [0x54515c]
mov edx, dword [ebx + 4]
mov dword [eax], edx
jmp 0x500b7c
mov eax, dword [0x54515c]
xor edx, edx
mov dword [eax], edx
jmp 0x500b7c
mov eax, dword [0x54515c]
mov edx, dword [ebx + 4]
mov dword [eax], edx
jmp 0x500b7c
mov eax, dword [0x54488c]
cmp dword [eax], 0
jle 0x500b07
mov eax, dword [0x54472c]
cmp dword [eax], 0
jle 0x500b07
mov eax, dword [0x544738]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov edx, dword [0x54488c]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
dec eax
jge 0x500b7c
mov eax, dword [0x544738]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov edx, dword [0x54472c]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
dec eax
jge 0x500b7c
lea ecx, [esp + 8]
lea edx, [esp + 4]
mov eax, ebx
call fcn.00500144
mov eax, dword [0x544738]
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 0x500acf
mov eax, dword [0x544738]
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 0x500ad9
mov eax, dword [0x544df8]
mov byte [eax], 2
jmp 0x500ae1
mov eax, dword [0x544df8]
mov byte [eax], 1
mov eax, dword [0x54488c]
mov edx, dword [esp + 4]
mov dword [eax], edx
mov eax, dword [0x54472c]
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 0x500b7c
lea ecx, [esp + 8]
lea edx, [esp + 4]
mov eax, ebx
call fcn.00500144
mov eax, dword [0x544738]
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 0x500b46
mov eax, dword [0x544738]
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 0x500b50
mov eax, dword [0x544df8]
mov byte [eax], 2
jmp 0x500b58
mov eax, dword [0x544df8]
mov byte [eax], 1
mov eax, dword [0x54488c]
mov edx, dword [esp + 4]
mov dword [eax], edx
mov eax, dword [0x54472c]
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