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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
mov eax, dword [ebp + 8]
call fcn.0040528c
xor eax, eax
push ebp
push 0x52100c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0xee]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx + 0xf2]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0xf6]
mov dword [ebp - 0x24], eax
mov esi, dword [ebx + 0x1b7]
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x20]
mov edx, edi
mov eax, ebx
call fcn.00520c3c
lea edx, [ebx + 0xee]
lea eax, [ebp - 0x38]
call fcn.0054321c
fstp dword [ebp - 0x1c]
wait
fld dword [ebp - 0x1c]
fcomp dword [0x521020]
fnstsw ax
sahf
ja 0x520d81
mov byte [ebp - 5], 1
jmp 0x520ff6
mov edx, edi
mov eax, ebx
call fcn.00540808
mov ecx, 0x1f4
mov edx, 1
mov eax, ebx
call fcn.0051ee98
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
call sub.kernel32.dll_GetTickCount_1
sub eax, 0x1388
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
cmp byte [ebx + 0x6c], 0
jne 0x520dca
cmp byte [ebx + 0x6d], 0
jne 0x520ff6
cmp dword [ebx + 0xc9], 1
jae 0x520df1
push dword [ebx + 0xf6]
push dword [ebx + 0xee]
mov eax, dword [ebx + 0x1b7]
push eax
push ebx
call fcn.00541968
jmp 0x520ff6
cmp esi, dword [ebx + 0x1b7]
je 0x520e31
mov esi, dword [ebx + 0x1b7]
push 0x7d0
call sub.kernel32.dll_Sleep_1
mov ecx, 0x4e20
mov edx, 8
mov eax, ebx
call fcn.0051ef68
push 0x1388
call sub.kernel32.dll_Sleep_1
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
cmp dword [ebp - 4], 0
jbe 0x520ec3
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
cmp edx, dword [ebp - 0x14]
jne 0x520e4e
cmp eax, dword [ebp - 0x18]
jbe 0x520ec3
jmp 0x520e50
jle 0x520ec3
mov eax, dword [ebp - 4]
dec eax
je 0x520e5b
dec eax
je 0x520e86
jmp 0x520eb1
mov edx, dword [ebp + 8]
mov eax, ebx
call fcn.0052f638
test al, al
je 0x520eb1
mov byte [ebp - 5], 1
push dword [ebx + 0xf6]
push dword [ebx + 0xee]
push 0
push ebx
call fcn.00541968
jmp 0x520ff6
mov edx, dword [ebp + 8]
mov eax, ebx
call fcn.00523c8c
test al, al
je 0x520eb1
mov byte [ebp - 5], 1
push dword [ebx + 0xf6]
push dword [ebx + 0xee]
push 0
push ebx
call fcn.00541968
jmp 0x520ff6
call sub.kernel32.dll_GetTickCount_1
add eax, 0x7d0
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
cmp edx, dword [ebx + 0x31d54]
jne 0x520edc
cmp eax, dword [ebx + 0x31d50]
jae 0x520ef7
jmp 0x520ede
jge 0x520ef7
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
push 0x32
call sub.kernel32.dll_Sleep_1
jmp 0x520dba
cmp byte [ebx + 0xed], 1
je 0x520f2d
lea edx, [ebx + 0xee]
lea eax, [ebp - 0x38]
call fcn.0054321c
fstp dword [ebp - 0x1c]
wait
fld dword [ebp - 0x1c]
fcomp dword [0x521020]
fnstsw ax
sahf
jbe 0x520ff2
mov edx, edi
mov eax, ebx
call fcn.00540808
cmp byte [ebx + 0x1d4], 0
jne 0x520f52
cmp byte [ebx + 0xed], 1
jne 0x520f52
mov edx, edi
mov eax, ebx
call fcn.00540808
push 0x1f4
call sub.kernel32.dll_Sleep_1
fld dword [ebp - 0x2c]
call fcn.00403204
push edx
push eax
fld dword [ebx + 0xee]
call fcn.00403204
cmp edx, dword [esp + 4]
jne 0x520f70
cmp eax, dword [esp]
pop edx
pop eax
jne 0x520f96
fld dword [ebp - 0x24]
call fcn.00403204
push edx
push eax
fld dword [ebx + 0xf6]
call fcn.00403204
cmp edx, dword [esp + 4]
jne 0x520f92
cmp eax, dword [esp]
pop edx
pop eax
je 0x520fc0
mov eax, dword [ebx + 0xee]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx + 0xf2]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0xf6]
mov dword [ebp - 0x24], eax
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
jmp 0x520fe3
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
sub eax, dword [ebp - 0x10]
sbb edx, dword [ebp - 0xc]
cmp edx, 0
jne 0x520fdb
cmp eax, 0x1388
jbe 0x520fe3
jmp 0x520fdd
jle 0x520fe3
mov byte [ebp - 5], 0
jmp 0x520ff6
push 0xc8
call sub.kernel32.dll_Sleep_1
jmp 0x520dba
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x521013
lea eax, [ebp + 8]
call fcn.00404ddc
ret