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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff8c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
call fcn.00406ad8
xor eax, eax
push ebp
push 0x51fc66
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [0x58d174]
call fcn.0050fbe4
mov word [ebp - 0x52], ax
cmp dword [ebp + 0x10], 0
je 0x51f3ba
mov eax, dword [ebp + 0x10]
call fcn.005246c0
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x10]
call fcn.005246d0
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x10]
call fcn.00524270
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 8]
mov byte [eax + 0x399], 1
xor eax, eax
push ebp
push 0x51fc36
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.004067a0
test eax, eax
jl 0x51fc1e
inc eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x14], 0
mov eax, dword [0x58d174]
call fcn.0050fbe4
cmp ax, word [ebp - 0x52]
jne 0x51fc1e
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
cmp dword [eax + edx*8], 0
jl 0x51fc12
cmp dword [ebp - 0xc], 0
je 0x51f424
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0xd], 0
jne 0x51fc1e
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov esi, dword [eax + edx*8]
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov edi, dword [eax + edx*8 + 4]
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x68], esi
fild dword [ebp - 0x68]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x6c], edi
fild dword [ebp - 0x6c]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b8060
mov dword [ebp - 0x1c], eax
mov ebx, dword [ebp - 0x14]
inc ebx
mov eax, dword [ebp - 4]
call fcn.004067a0
sub eax, ebx
jl 0x51f6ae
inc eax
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 4]
cmp dword [eax + ebx*8], 0
jl 0x51f6a4
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp - 4]
fild dword [eax + ebx*8]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp - 4]
fild dword [eax + ebx*8 + 4]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b8060
push eax
mov eax, dword [ebp - 0x1c]
pop edx
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jle 0x51f633
mov eax, dword [ebp - 4]
mov ecx, dword [eax + ebx*8 + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*8]
dec edx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x320]
call fcn.0050a0b8
test al, al
je 0x51f6ae
mov eax, dword [ebp - 4]
mov ecx, dword [eax + ebx*8 + 4]
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*8]
inc edx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x320]
call fcn.0050a0b8
test al, al
je 0x51f6ae
mov eax, dword [ebp - 4]
mov ecx, dword [eax + ebx*8 + 4]
inc ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*8]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x320]
call fcn.0050a0b8
test al, al
je 0x51f6ae
mov eax, dword [ebp - 4]
mov ecx, dword [eax + ebx*8 + 4]
dec ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*8]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x320]
call fcn.0050a0b8
test al, al
je 0x51f6ae
mov eax, dword [ebp - 4]
mov ecx, dword [eax + ebx*8 + 4]
inc ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*8]
dec edx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x320]
call fcn.0050a0b8
test al, al
je 0x51f6ae
mov eax, dword [ebp - 4]
mov ecx, dword [eax + ebx*8 + 4]
dec ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*8]
dec edx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x320]
call fcn.0050a0b8
test al, al
je 0x51f6ae
mov eax, dword [ebp - 4]
mov ecx, dword [eax + ebx*8 + 4]
inc ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*8]
inc edx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x320]
call fcn.0050a0b8
test al, al
je 0x51f6ae
mov eax, dword [ebp - 4]
mov ecx, dword [eax + ebx*8 + 4]
dec ecx
mov eax, dword [ebp - 4]
mov edx, dword [eax + ebx*8]
inc edx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x320]
call fcn.0050a0b8
test al, al
je 0x51f6ae
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp - 4]
fild dword [eax + ebx*8]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp - 4]
fild dword [eax + ebx*8 + 4]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fcomp dword [0x51fc7c]
wait
fnstsw ax
sahf
ja 0x51f6ae
mov eax, dword [ebp - 4]
mov esi, dword [eax + ebx*8]
mov eax, dword [ebp - 4]
mov edi, dword [eax + ebx*8 + 4]
mov eax, dword [ebp - 4]
mov dword [eax + ebx*8], 0xffffffff
inc ebx
dec dword [ebp - 0x5c]
jne 0x51f49f
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x68], esi
fild dword [ebp - 0x68]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x6c], edi
fild dword [ebp - 0x6c]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fcomp dword [0x51fc80]
wait
fnstsw ax
sahf
jae 0x51f719
cmp esi, dword [ebp + 0x1c]
jne 0x51fae8
cmp edi, dword [ebp + 0x18]
jne 0x51fae8
call fcn.004b9988
mov dword [ebp - 0x40], eax
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x20], eax
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x24], eax
call fcn.004b9988
mov dword [ebp - 0x44], eax
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x68], esi
fild dword [ebp - 0x68]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x6c], edi
fild dword [ebp - 0x6c]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
call fcn.00403424
mov ebx, eax
imul eax, ebx, 0x1f4
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x48], 0x320
mov ecx, edi
mov edx, esi
mov eax, dword [0x58d174]
call fcn.0050f220
jmp 0x51faca
push 0xa
call sub.kernel32.dll_Sleep_2
cmp dword [ebp - 0xc], 0
je 0x51f7d4
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0xd], 0
jne 0x51fade
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x68], esi
fild dword [ebp - 0x68]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x6c], edi
fild dword [ebp - 0x6c]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fstp qword [ebp - 0x50]
wait
fld qword [ebp - 0x50]
fcomp dword [0x51fc80]
wait
fnstsw ax
sahf
ja 0x51f83e
xor eax, eax
mov dword [ebp - 0x28], eax
jmp 0x51fade
fld qword [ebp - 0x50]
call fcn.00403424
push edx
push eax
mov eax, ebx
cdq
cmp edx, dword [esp + 4]
jne 0x51f85a
cmp eax, dword [esp]
pop edx
pop eax
jbe 0x51f875
jmp 0x51f85e
pop edx
pop eax
jle 0x51f875
fld qword [ebp - 0x50]
call fcn.00403424
mov ebx, eax
call fcn.004b9988
mov dword [ebp - 0x44], eax
jmp 0x51f94f
mov eax, dword [0x58d174]
call fcn.00511c88
cmp eax, dword [ebp - 0x20]
jne 0x51f893
mov eax, dword [0x58d174]
call fcn.00511cb0
cmp eax, dword [ebp - 0x24]
je 0x51f8ba
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x20], eax
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x24], eax
call fcn.004b9988
mov dword [ebp - 0x44], eax
jmp 0x51f94f
call fcn.004b9988
sub eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x48]
jbe 0x51f94f
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x68], esi
fild dword [ebp - 0x68]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov dword [ebp - 0x6c], edi
fild dword [ebp - 0x6c]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
call fcn.00403424
push edx
push eax
lea eax, [ebp - 0x74]
call fcn.0040a0cc
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x70]
mov edx, 0x51fc8c
call fcn.004054c0
mov eax, dword [ebp - 0x70]
call fcn.004b8ff8
fld qword [ebp - 0x50]
call fcn.00403424
add dword [ebp - 0x28], eax
jmp 0x51fade
call fcn.004b9988
sub eax, dword [ebp - 0x40]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x30]
cdq
cmp edx, dword [esp + 4]
jne 0x51f96e
cmp eax, dword [esp]
pop edx
pop eax
jae 0x51f98c
jmp 0x51f972
pop edx
pop eax
jge 0x51f98c
mov eax, 0x51fca4
call fcn.004b8ff8
fld qword [ebp - 0x50]
call fcn.00403424
add dword [ebp - 0x28], eax
jmp 0x51fade
cmp dword [ebp + 0x10], 0
je 0x51fa6f
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp + 0x10]
call fcn.005246c0
mov dword [ebp - 0x68], eax
fild dword [ebp - 0x68]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp + 0x10]
call fcn.005246d0
mov dword [ebp - 0x6c], eax
fild dword [ebp - 0x6c]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fild dword [ebp + 0x14]
fcompp
wait
fnstsw ax
sahf
jb 0x51fa0a
mov dword [ebp - 0x10], 1
jmp 0x51fade
mov eax, dword [ebp + 0x10]
call fcn.005246c0
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp + 0x10]
call fcn.005246d0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp - 0x34]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp - 0x38]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fcomp dword [0x51fcb4]
wait
fnstsw ax
sahf
jbe 0x51faca
mov eax, dword [ebp + 0x10]
call fcn.00524270
cmp eax, dword [ebp - 0x3c]
jle 0x51faca
mov dword [ebp - 0x10], 2
jmp 0x51fade
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp + 0x1c]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp + 0x18]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fild dword [ebp + 0x14]
fcompp
wait
fnstsw ax
sahf
jb 0x51faca
mov dword [ebp - 0x10], 1
jmp 0x51fade
mov eax, dword [0x586750]
mov eax, dword [eax]
cmp byte [eax + 0xa4], 0
je 0x51f7ba
cmp dword [ebp - 0x28], 6
jg 0x51fc1e
cmp dword [ebp - 0x10], 0
jg 0x51fc1e
cmp dword [ebp + 0x10], 0
je 0x51fb6c
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp + 0x10]
call fcn.005246c0
mov dword [ebp - 0x68], eax
fild dword [ebp - 0x68]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [ebp + 0x10]
call fcn.005246d0
mov dword [ebp - 0x6c], eax
fild dword [ebp - 0x6c]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fild dword [ebp + 0x14]
fcompp
wait
fnstsw ax
sahf
jb 0x51fbc7
mov dword [ebp - 0x10], 1
jmp 0x51fc1e
mov eax, dword [0x58d174]
call fcn.00511c88
mov dword [ebp - 0x60], eax
fild dword [ebp - 0x60]
add esp, 0xfffffffc
fstp dword [esp]
wait
mov eax, dword [0x58d174]
call fcn.00511cb0
mov dword [ebp - 0x64], eax
fild dword [ebp - 0x64]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp + 0x1c]
add esp, 0xfffffffc
fstp dword [esp]
wait
fild dword [ebp + 0x18]
add esp, 0xfffffffc
fstp dword [esp]
wait
call fcn.004b7ec4
fild dword [ebp + 0x14]
fcompp
wait
fnstsw ax
sahf
jb 0x51fbc7
mov dword [ebp - 0x10], 1
jmp 0x51fc1e
cmp word [ebp + 0xa], 0
je 0x51fc12
mov byte [ebp - 0x54], 0
mov byte [ebp - 0x53], 0
xor eax, eax
push ebp
push 0x51fc02
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x53]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
call dword [ebp + 8]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x51fc0c
cmp byte [ebp - 0x54], 0
jne 0x51fc1e
inc dword [ebp - 0x14]
dec dword [ebp - 0x58]
jne 0x51f3ed
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51fc3d
mov eax, dword [ebp - 8]
mov byte [eax + 0x399], 0
ret