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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
mov esi, edx
lea edi, [ebp - 0x24]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov ebx, eax
lea eax, [ebp - 0x24]
mov edx, dword [0x479614]
call fcn.00405b78
xor eax, eax
push ebp
push 0x51fad1
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 8]
mov dword [ebx + 0x2f0], eax
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x2f4], eax
cmp dword [ebp - 0x24], 0x1b
jne 0x51f6cb
mov byte [ebx + 0x30], 0
mov byte [ebx + 0x31], 0
cmp byte [ebx + 0x30], 0
jne 0x51fa6e
mov eax, dword [ebp - 0x24]
add eax, 0xfffffffb
cmp eax, 0x16
ja case.0x51f6e6.5
mov al, byte [eax + 0x51f6ed]
jmp dword [eax*4 + 0x51f704]
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x2c], eax
mov eax, dword [ebp - 0x24]
cmp eax, 0x17
mov edx, dword [0x53e6d8]
cmp ebx, dword [edx]
jne 0x51f98f
cmp eax, 0xbc3
jne 0x51f74d
mov eax, dword [0x53e520]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
call fcn.00510ca8
test al, al
je 0x51fab5
cmp dword [ebp - 0x24], 0xbc5
jne 0x51f786
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov edx, dword [eax + 8]
mov eax, dword [0x53e520]
mov eax, dword [eax]
call fcn.00510af8
test al, al
je 0x51fab5
cmp dword [ebp - 0x24], 0xbc1
jne 0x51f7bf
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x53e6d8]
mov eax, dword [eax]
mov edx, dword [eax + 8]
mov eax, dword [0x53e520]
mov eax, dword [eax]
call fcn.00510af8
test al, al
je 0x51fab5
mov eax, dword [ebp - 0x24]
cmp eax, 0xbd0
jg 0x51f820
je case.0x51f7dd.3010
add eax, 0xfffff443
cmp eax, 0xe
ja case.0x51f7dd.3006
jmp dword [eax*4 + 0x51f7e4]
cmp eax, 0xce4
jge 0x51f83f
sub eax, 0xbd1
je 0x51f8ee
add eax, 0xffffffd7
sub eax, 3
jb case.0x51f7dd.3010
jmp case.0x51f7dd.3006
add eax, 0xfffff31c
sub eax, 4
jb case.0x51f7dd.3010
sub eax, 0x2b7
je 0x51f90b
sub eax, 0x8ca0
je 0x51f928
jmp case.0x51f7dd.3006
lea eax, [ebx + 0x334]
lea edx, [ebp - 0x24]
mov ecx, dword [0x479614]
call fcn.00405c98
sub dword [ebp - 0x24], 0xbb8
jmp case.0x51f7dd.3006
lea eax, [ebx + 0x334]
lea edx, [ebp - 0x24]
mov ecx, dword [0x479614]
call fcn.00405c98
mov dword [ebp - 0x24], 5
jmp case.0x51f7dd.3006
cmp dword [ebx + 0x20], 0
je 0x51f8ce
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov dword [ebx + 0x118], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
mov dword [ebx + 0x11c], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov dword [ebx + 0x120], eax
lea eax, [ebx + 0x334]
lea edx, [ebp - 0x24]
mov ecx, dword [0x479614]
call fcn.00405c98
mov dword [ebp - 0x24], 0xfe2d
jmp case.0x51f7dd.3006
lea eax, [ebx + 0x334]
lea edx, [ebp - 0x24]
mov ecx, dword [0x479614]
call fcn.00405c98
mov dword [ebp - 0x24], 8
jmp case.0x51f7dd.3006
lea eax, [ebx + 0x334]
lea edx, [ebp - 0x24]
mov ecx, dword [0x479614]
call fcn.00405c98
mov dword [ebp - 0x24], 0x15b3
jmp case.0x51f7dd.3006
lea eax, [ebx + 0x334]
lea edx, [ebp - 0x24]
mov ecx, dword [0x479614]
call fcn.00405c98
mov dword [ebp - 0x24], 0x1a
jmp case.0x51f7dd.3006
lea eax, [ebx + 0x334]
lea edx, [ebp - 0x24]
mov ecx, dword [0x479614]
call fcn.00405c98
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov dword [ebx + 0x340], eax
sub dword [ebp - 0x24], 0xbb8
mov eax, dword [ebx + 8]
mov dword [ebx + 0x2e4], eax
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x2e8], eax
xor eax, eax
mov al, byte [ebx + 0x10]
mov dword [ebx + 0x2ec], eax
mov eax, dword [ebp - 0x24]
sub eax, 0x11
je 0x51f9e6
sub eax, 0xe
jne 0x51fa35
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x1e0], eax
movzx eax, word [ebx + 0x40]
lea eax, [eax + eax*4]
mov edx, 0xc8
sub edx, eax
mov dword [ebp - 0x28], edx
fild dword [ebp - 0x28]
call fcn.00402fc8
cmp eax, 0x50
jle 0x51f9cf
mov dword [ebx + 0x2c8], eax
jmp 0x51f9d9
mov dword [ebx + 0x2c8], 0x50
call sub.kernel32.dll_GetTickCount_1
mov dword [ebx + 0x1d4], eax
jmp 0x51fa58
mov al, byte [ebp - 0x18]
mov byte [ebx + 0x10], al
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x51fa58
mov eax, dword [ebp - 4]
mov esi, eax
lea edi, [ebx + 0x16c]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x16c], 0xffffffff
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x180], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x184], eax
mov edx, 0x28
mov eax, dword [ebp - 4]
call fcn.00402b08
jmp 0x51fa58
mov eax, dword [ebp - 0x24]
cmp eax, 0x27e
je 0x51fa58
cmp eax, 0x27f
je 0x51fa58
mov eax, dword [ebp - 0x20]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0xc], eax
mov al, byte [ebp - 0x18]
mov byte [ebx + 0x10], al
mov eax, dword [ebp - 0x24]
mov dword [ebx + 0x1b4], eax
mov eax, ebx
mov si, 0xffff
call fcn.00404114
jmp 0x51fa8b
mov eax, dword [ebp - 0x24]
cmp eax, 0x21
jne 0x51fa8b
mov dword [ebx + 0x1b4], eax
mov eax, ebx
mov si, 0xffff
call fcn.00404114
mov byte [ebx + 0x31], 1
mov eax, dword [ebp - 0x24]
cmp eax, 0x20
je 0x51fa98
cmp eax, 0x22
jne 0x51faaa
mov byte [ebx + 0x30], 1
mov eax, dword [0x53e520]
mov eax, dword [eax]
mov edx, ebx
call fcn.005118d4
mov eax, ebx
mov si, 0xfff9
call fcn.00404114
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51fad8
lea eax, [ebp - 0x24]
mov edx, dword [0x479614]
call fcn.00405a34
ret