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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa0
push ebx
push esi
push edi
mov edi, edx
mov ebx, eax
xor edx, edx
push ebp
push 0x52183d
push dword fs:[edx]
mov dword fs:[edx], esp
fld dword [ebp + 8]
fcomp dword [0x521854]
fnstsw ax
sahf
jae 0x52145e
xor eax, eax
mov dword [ebp + 8], eax
mov byte [ebp - 1], 0
mov eax, edi
shl eax, 2
mov edx, dword [ebx + 0x5d0]
mov esi, dword [edx + eax*8 + 4]
mov edx, dword [ebx + 0x5d0]
mov eax, dword [edx + eax*8 + 8]
mov dword [ebp - 0x24], eax
test esi, esi
jne 0x52148f
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
xor eax, eax
mov dword [ebp - 8], eax
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
mov eax, dword [ebx + 0xee]
mov dword [ebp - 0x60], eax
mov eax, dword [ebx + 0xf2]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebx + 0xf6]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x1c], 0xbf800000
cmp byte [ebx + 0x6c], 0
jne 0x5214ee
cmp byte [ebx + 0x6d], 0
je 0x5214ee
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
cmp dword [ebx + 0xc9], 1
jae 0x52151d
push dword [ebx + 0xf6]
push dword [ebx + 0xee]
mov eax, dword [ebx + 0x1b7]
push eax
push ebx
call fcn.00541968
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
lea edx, [esi + 8]
mov eax, ebx
call fcn.00541a04
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x52153d
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
mov eax, edi
shl eax, 2
mov edx, dword [ebx + 0x5d0]
cmp esi, dword [edx + eax*8 + 4]
jne 0x52162a
mov eax, edi
shl eax, 2
mov edx, dword [ebx + 0x5d0]
mov eax, dword [edx + eax*8 + 8]
cmp eax, dword [ebp - 0x24]
jne 0x521616
mov eax, dword [0x55d330]
mov edx, dword [eax + 0xec]
add edx, esi
mov eax, ebx
call fcn.00541a04
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x54]
mov eax, dword [0x55d330]
mov edx, dword [eax + 0x144]
add edx, dword [ebp - 0x10]
mov eax, ebx
call fcn.0053e0cc
lea edx, [ebx + 0xee]
lea eax, [ebp - 0x54]
call fcn.0054321c
fstp dword [ebp - 0x20]
wait
fld dword [ebp - 0x1c]
fcomp dword [0x521858]
fnstsw ax
sahf
je 0x5215cc
fld dword [ebp - 0x20]
fsub dword [ebp - 0x1c]
fabs
fcomp dword [0x52185c]
fnstsw ax
sahf
jae 0x521602
lea ecx, [ebp - 0x30]
mov eax, dword [0x55d330]
mov edx, dword [eax + 0x144]
add edx, dword [ebp - 0x10]
mov eax, ebx
call fcn.0053e0cc
fld dword [ebp + 8]
fsub dword [0x521860]
add esp, 0xfffffffc
fstp dword [esp]
wait
lea ecx, [ebp - 0x48]
mov edx, esi
mov eax, ebx
call fcn.005202ac
jmp 0x52163c
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
jmp 0x52163c
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
jmp 0x52163c
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x40], eax
lea edx, [ebx + 0xee]
lea eax, [ebp - 0x30]
call fcn.0054321c
fstp dword [ebp - 0x1c]
wait
fld dword [ebp + 8]
fadd dword [0x521860]
fcomp dword [ebp - 0x1c]
fnstsw ax
sahf
jb 0x521670
mov byte [ebp - 1], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
fld dword [ebp - 0x48]
fcomp dword [0x521854]
fnstsw ax
sahf
jne 0x521699
fld dword [ebp - 0x40]
fcomp dword [0x521854]
fnstsw ax
sahf
jne 0x521699
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
cmp byte [ebx + 0xed], 1
je 0x5216e3
inc dword [ebp - 8]
cmp dword [ebp - 8], 3
jle 0x5216b8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
push dword [ebp - 0x40]
push dword [ebp - 0x48]
mov eax, dword [ebx + 0x1b7]
push eax
push ebx
call fcn.00541968
mov ecx, 0x1f4
mov edx, 1
mov eax, ebx
call fcn.0051ee98
test al, al
jmp 0x52178d
fld dword [ebp - 0x30]
call fcn.00403204
push edx
push eax
fld dword [ebp - 0x3c]
call fcn.00403204
cmp edx, dword [esp + 4]
jne 0x5216fe
cmp eax, dword [esp]
pop edx
pop eax
jne 0x521721
fld dword [ebp - 0x28]
call fcn.00403204
push edx
push eax
fld dword [ebp - 0x34]
call fcn.00403204
cmp edx, dword [esp + 4]
jne 0x52171d
cmp eax, dword [esp]
pop edx
pop eax
je 0x52178d
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x34], eax
lea edx, [ebx + 0xee]
lea eax, [ebp - 0x30]
call fcn.0054321c
fstp dword [ebp - 0x1c]
wait
fld dword [ebp + 8]
fadd dword [0x521860]
fcomp dword [ebp - 0x1c]
fnstsw ax
sahf
jb 0x521767
mov byte [ebp - 1], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
push dword [ebp - 0x40]
push dword [ebp - 0x48]
mov eax, dword [ebx + 0x1b7]
push eax
push ebx
call fcn.00541968
mov ecx, 0x1f4
mov edx, 1
mov eax, ebx
call fcn.0051ee98
test al, al
fld dword [ebp - 0x60]
call fcn.00403204
push edx
push eax
fld dword [ebx + 0xee]
call fcn.00403204
cmp edx, dword [esp + 4]
jne 0x5217ab
cmp eax, dword [esp]
pop edx
pop eax
jne 0x5217d1
fld dword [ebp - 0x58]
call fcn.00403204
push edx
push eax
fld dword [ebx + 0xf6]
call fcn.00403204
cmp edx, dword [esp + 4]
jne 0x5217cd
cmp eax, dword [esp]
pop edx
pop eax
je 0x5217fb
mov eax, dword [ebx + 0xee]
mov dword [ebp - 0x60], eax
mov eax, dword [ebx + 0xf2]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebx + 0xf6]
mov dword [ebp - 0x58], eax
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
jmp 0x521826
call sub.kernel32.dll_GetTickCount_1
xor edx, edx
sub eax, dword [ebp - 0x18]
sbb edx, dword [ebp - 0x14]
cmp edx, 0
jne 0x521816
cmp eax, 0xbb8
jbe 0x521826
jmp 0x521818
jle 0x521826
mov byte [ebp - 1], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x521847
push 0x1f4
call sub.kernel32.dll_Sleep_1
jmp 0x5214d5
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4