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

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffc0
mov edi, edx
mov ebx, eax
mov esi, dword [0x52a69c]
mov byte [esp], 0
test ebx, ebx
je 0x51569f
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [0x52aaf0]
cmp byte [eax], 0
je 0x51569f
cmp dword [esi + 0x12], 2
jb 0x51569f
mov eax, ebx
call fcn.00515170
test al, al
je 0x51569f
cmp ebx, dword [esi + 0x4b]
jne 0x51569f
lea edx, [esp + 0x10]
mov eax, dword [0x52a970]
mov eax, dword [eax + 0x74]
add eax, ebx
mov ecx, 0xc
call fcn.0051a4dc
fstp st(0)
lea edx, [esi + 0x23]
lea eax, [esp + 0x10]
call fcn.005163a0
mov ecx, eax
mov eax, ecx
cdq
push edx
push eax
lea eax, [edi + 1]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x51548c
cmp eax, dword [esp]
pop edx
pop eax
jb 0x515499
jmp 0x515490
pop edx
pop eax
jl 0x515499
mov byte [esp], 1
jmp 0x51569f
cmp byte [esi + 0x22], 2
je 0x5154f0
lea ecx, [esp + 0x28]
mov edx, edi
dec edx
mov eax, ebx
call fcn.005151b4
fld dword [esp + 0x28]
fcomp dword [0x5156ac]
fnstsw ax
sahf
jne 0x5154cf
fld dword [esp + 0x30]
fcomp dword [0x5156ac]
fnstsw ax
sahf
je 0x51569f
push dword [esp + 0x30]
push dword [esp + 0x2c]
call fcn.0051ead0
mov edx, 0x3e8
mov eax, 2
call fcn.0051530c
jmp 0x515605
fld dword [esp + 0x10]
call fcn.00402c0c
push edx
push eax
fld dword [esp + 0x24]
call fcn.00402c0c
cmp edx, dword [esp + 4]
jne 0x51550d
cmp eax, dword [esp]
pop edx
pop eax
jne 0x515536
fld dword [esp + 0x18]
call fcn.00402c0c
push edx
push eax
fld dword [esp + 0x2c]
call fcn.00402c0c
cmp edx, dword [esp + 4]
jne 0x51552e
cmp eax, dword [esp]
pop edx
pop eax
je 0x515605
mov eax, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], eax
lea edx, [esi + 0x23]
lea eax, [esp + 0x10]
call fcn.005163a0
mov ecx, eax
mov eax, ecx
cdq
push edx
push eax
lea eax, [edi + 1]
xor edx, edx
cmp edx, dword [esp + 4]
jne 0x515575
cmp eax, dword [esp]
pop edx
pop eax
jb 0x515582
jmp 0x515579
pop edx
pop eax
jl 0x515582
mov byte [esp], 1
jmp 0x51569f
lea ecx, [esp + 0x28]
mov edx, edi
dec edx
mov eax, ebx
call fcn.005151b4
fld dword [esp + 0x28]
fcomp dword [0x5156ac]
fnstsw ax
sahf
jne 0x5155b2
fld dword [esp + 0x30]
fcomp dword [0x5156ac]
fnstsw ax
sahf
je 0x51569f
mov eax, dword [0x52a6cc]
cmp dword [eax + 0x22], 1
jne 0x5155e9
mov eax, dword [0x52a6cc]
cmp byte [eax + 0x11], 0
je 0x5155e9
fld dword [esp + 0x18]
call fcn.00402c0c
push eax
fld dword [esp + 0x14]
call fcn.00402c0c
pop edx
call fcn.00516430
test al, al
je 0x51569f
push dword [esp + 0x30]
push dword [esp + 0x2c]
call fcn.0051ead0
mov edx, 0x3e8
mov eax, 2
call fcn.0051530c
fld dword [esp + 0x34]
call fcn.00402c0c
push edx
push eax
fld dword [esi + 0x23]
call fcn.00402c0c
cmp edx, dword [esp + 4]
jne 0x515621
cmp eax, dword [esp]
pop edx
pop eax
jne 0x515645
fld dword [esp + 0x3c]
call fcn.00402c0c
push edx
push eax
fld dword [esi + 0x2b]
call fcn.00402c0c
cmp edx, dword [esp + 4]
jne 0x515641
cmp eax, dword [esp]
pop edx
pop eax
je 0x51566b
mov eax, dword [esi + 0x23]
mov dword [esp + 0x34], eax
mov eax, dword [esi + 0x27]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x2b]
mov dword [esp + 0x3c], eax
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
jmp 0x515690
call sub.KERNEL32.DLL_GetTickCount
xor edx, edx
sub eax, dword [esp + 8]
sbb edx, dword [esp + 0xc]
cmp edx, 0
jne 0x515688
cmp eax, 0x7d0
jbe 0x515690
jmp 0x51568a
jle 0x515690
mov byte [esp], 0
jmp 0x51569f
push 0xc8
call sub.KERNEL32.DLL_Sleep
jmp 0x51541b
mov al, byte [esp]
add esp, 0x40
pop edi
pop esi
pop ebx
ret