Function at 0x514160
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 [0x47e690]
call fcn.00405e8c
xor eax, eax
push ebp
push 0x5145b2
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 8]
mov dword [ebx + 0x31c], eax
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x320], eax
cmp dword [ebp - 0x24], 0x1b
jne 0x5141b3
mov byte [ebx + 0x2c], 0
mov byte [ebx + 0x2d], 0
cmp byte [ebx + 0x2c], 0
jne 0x51454f
mov eax, dword [ebp - 0x24]
add eax, 0xfffffffb
cmp eax, 0x16
ja case.0x5141ce.5
mov al, byte [eax + 0x5141d5]
jmp dword [eax*4 + 0x5141ec]
mov eax, dword [ebp - 0x10]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0x28], eax
mov eax, dword [ebp - 0x24]
cmp eax, 0x17
mov edx, dword [0x544738]
cmp ebx, dword [edx]
jne 0x514471
cmp eax, 0xbc3
jne 0x514235
mov eax, dword [0x544574]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
call fcn.00524e28
test al, al
je 0x514596
cmp dword [ebp - 0x24], 0xbc5
jne 0x51426e
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [0x544738]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x544738]
mov eax, dword [eax]
mov edx, dword [eax + 8]
mov eax, dword [0x544574]
mov eax, dword [eax]
call fcn.00524c78
test al, al
je 0x514596
cmp dword [ebp - 0x24], 0xbc1
jne 0x5142a7
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [0x544738]
mov eax, dword [eax]
mov ecx, dword [eax + 0xc]
mov eax, dword [0x544738]
mov eax, dword [eax]
mov edx, dword [eax + 8]
mov eax, dword [0x544574]
mov eax, dword [eax]
call fcn.00524c78
test al, al
je 0x514596
mov eax, dword [ebp - 0x24]
cmp eax, 0xbd0
jg 0x514308
je case.0x5142c5.3010
add eax, 0xfffff443
cmp eax, 0xe
ja case.0x5142c5.3006
jmp dword [eax*4 + 0x5142cc]
cmp eax, 0xbdd
jg 0x51432e
je 0x51440a
sub eax, 0xbd1
je 0x5143d0
sub eax, 0xb
je 0x5143ed
jmp case.0x5142c5.3006
add eax, 0xfffff406
sub eax, 3
jb case.0x5142c5.3010
add eax, 0xffffff19
sub eax, 4
jae case.0x5142c5.3006
lea eax, [ebx + 0x364]
lea edx, [ebp - 0x24]
mov ecx, dword [0x47e690]
call fcn.00405fac
sub dword [ebp - 0x24], 0xbb8
jmp case.0x5142c5.3006
lea eax, [ebx + 0x364]
lea edx, [ebp - 0x24]
mov ecx, dword [0x47e690]
call fcn.00405fac
mov dword [ebp - 0x24], 5
jmp case.0x5142c5.3006
cmp dword [ebx + 0x20], 0
je 0x5143b0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov dword [ebx + 0x144], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
mov dword [ebx + 0x148], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov dword [ebx + 0x14c], eax
lea eax, [ebx + 0x364]
lea edx, [ebp - 0x24]
mov ecx, dword [0x47e690]
call fcn.00405fac
mov dword [ebp - 0x24], 0xfe2d
jmp case.0x5142c5.3006
lea eax, [ebx + 0x364]
lea edx, [ebp - 0x24]
mov ecx, dword [0x47e690]
call fcn.00405fac
mov dword [ebp - 0x24], 8
jmp case.0x5142c5.3006
lea eax, [ebx + 0x364]
lea edx, [ebp - 0x24]
mov ecx, dword [0x47e690]
call fcn.00405fac
mov dword [ebp - 0x24], 0x19
jmp case.0x5142c5.3006
lea eax, [ebx + 0x364]
lea edx, [ebp - 0x24]
mov ecx, dword [0x47e690]
call fcn.00405fac
mov dword [ebp - 0x24], 0x1a
jmp case.0x5142c5.3006
lea eax, [ebx + 0x364]
lea edx, [ebp - 0x24]
mov ecx, dword [0x47e690]
call fcn.00405fac
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov dword [ebx + 0x370], eax
sub dword [ebp - 0x24], 0xbb8
mov eax, dword [ebx + 8]
mov dword [ebx + 0x310], eax
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x314], eax
xor eax, eax
mov al, byte [ebx + 0x10]
mov dword [ebx + 0x318], eax
mov eax, dword [ebp - 0x24]
sub eax, 0x11
je 0x5144c7
sub eax, 0xe
jne 0x514516
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x230], eax
mov eax, dword [ebx + 0x3c]
lea eax, [eax + eax*4]
mov edx, 0xc8
sub edx, eax
mov dword [ebp - 0x28], edx
fild dword [ebp - 0x28]
call fcn.00403330
cmp eax, 0x50
jle 0x5144b0
mov dword [ebx + 0x2f4], eax
jmp 0x5144ba
mov dword [ebx + 0x2f4], 0x50
call sub.kernel32.dll_GetTickCount_1
mov dword [ebx + 0x224], eax
jmp 0x514539
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 0x514539
mov eax, dword [ebp - 4]
mov esi, eax
lea edi, [ebx + 0x194]
mov ecx, 0xa
rep movsd dword es:[edi], dword [esi]
mov dword [ebx + 0x194], 0xffffffff
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0x1a8], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 0x1ac], eax
mov edx, 0x28
mov eax, dword [ebp - 4]
call fcn.00402e08
jmp 0x514539
mov eax, dword [ebp - 0x24]
cmp eax, 0x27e
je 0x514539
cmp eax, 0x27f
je 0x514539
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 + 0x204], eax
mov eax, ebx
mov si, 0xffff
call fcn.00404458
jmp 0x51456c
mov eax, dword [ebp - 0x24]
cmp eax, 0x21
jne 0x51456c
mov dword [ebx + 0x204], eax
mov eax, ebx
mov si, 0xffff
call fcn.00404458
mov byte [ebx + 0x2d], 1
mov eax, dword [ebp - 0x24]
cmp eax, 0x20
je 0x514579
cmp eax, 0x22
jne 0x51458b
mov byte [ebx + 0x2c], 1
mov eax, dword [0x544574]
mov eax, dword [eax]
mov edx, ebx
call fcn.00525a3c
mov eax, ebx
mov si, 0xfff9
call fcn.00404458
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5145b9
lea eax, [ebp - 0x24]
mov edx, dword [0x47e690]
call fcn.00405d48
ret