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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffe8
mov edi, eax
mov byte [esp], 0
xor ebx, ebx
mov byte [esp + 8], 0
cmp dword [edi + 0x204], 9
jne 0x518bab
mov bl, 1
mov eax, dword [edi + 0x204]
cmp eax, 6
je 0x518bc2
cmp eax, 7
je 0x518bc2
cmp eax, 0x12d
jne 0x518bc7
mov byte [esp + 8], 1
mov eax, dword [0x544738]
cmp edi, dword [eax]
jne 0x518cee
test bl, bl
jne 0x518cee
cmp byte [esp + 8], 0
jne 0x518cee
mov eax, dword [0x54505c]
mov byte [eax], 0
mov eax, dword [0x544734]
mov byte [eax], 0
mov eax, dword [0x544d24]
xor edx, edx
mov dword [eax], edx
mov si, word [edi + 0x6e]
mov cx, word [edi + 0x6c]
cmp si, cx
jae 0x518c29
movzx eax, cx
movzx edx, si
mov ecx, edx
xor edx, edx
div ecx
mov edx, dword [0x544d24]
mov dword [edx], eax
mov eax, dword [0x54505c]
mov byte [eax], 1
mov si, word [edi + 0x72]
mov cx, word [edi + 0x70]
cmp si, cx
jae 0x518c52
movzx eax, cx
movzx edx, si
mov ecx, edx
xor edx, edx
div ecx
mov edx, dword [0x544d24]
add dword [edx], eax
mov eax, dword [0x54505c]
mov byte [eax], 1
mov ax, word [edi + 0x74]
cmp ax, word [edi + 0x76]
jbe 0x518c64
mov eax, dword [0x544734]
mov byte [eax], 1
mov eax, dword [0x54505c]
cmp byte [eax], 0
je 0x518c93
mov eax, dword [0x544f94]
cmp byte [eax + 0xb], 0
jne 0x518c93
mov eax, dword [0x544d24]
mov eax, dword [eax]
cmp eax, dword [edi + 0x304]
jle 0x518c93
inc dword [edi + 0x304]
jmp 0x519153
xor eax, eax
mov dword [edi + 0x304], eax
mov eax, dword [edi + 0x204]
cmp eax, 0xb
je 0x518cbf
cmp eax, 9
je 0x518cbf
cmp eax, 0xd
je 0x518cbf
cmp eax, 5
je 0x518cbf
cmp eax, 6
je 0x518cbf
cmp eax, 7
jne 0x518cee
mov eax, dword [edi + 0x2b4]
sub eax, dword [edi + 0x2ac]
dec eax
je 0x518cd5
sub eax, 3
je 0x518ce2
jmp 0x518cee
mov eax, dword [edi + 0x238]
call fcn.005038f8
jmp 0x518cee
mov eax, dword [edi + 0x238]
inc eax
call fcn.005038f8
mov byte [esp], 0
mov byte [edi + 0x2f0], 0
mov eax, dword [0x544738]
cmp edi, dword [eax]
je 0x518d15
mov eax, dword [edi + 0x360]
cmp dword [eax + 8], 2
jl 0x518d15
mov byte [edi + 0x2f0], 1
mov ebp, dword [edi + 0x2b4]
mov eax, dword [edi + 0x204]
cmp eax, 0xb
je 0x518d45
cmp eax, 0xd
je 0x518d45
cmp eax, 5
je 0x518d45
cmp eax, 6
je 0x518d45
cmp eax, 7
je 0x518d45
cmp eax, 0x12d
jne 0x518fc7
mov edx, dword [edi + 0x2ac]
mov eax, dword [edi + 0x2b4]
cmp edx, eax
jg 0x518d5d
cmp eax, dword [edi + 0x2b0]
jle 0x518d64
dec edx
mov dword [edi + 0x2b4], edx
mov eax, dword [edi + 0x2b4]
cmp eax, dword [edi + 0x2b0]
jge 0x518df7
inc dword [edi + 0x2b4]
cmp dword [edi + 0x204], 0x12d
jne 0x518d9f
mov edx, dword [edi + 0x2b4]
sub edx, dword [edi + 0x2ac]
mov eax, edi
mov si, 0xfff8
call fcn.00404458
cmp byte [edi + 0x2f0], 0
je 0x518dc3
cmp byte [esp + 8], 0
jne 0x518dc3
mov eax, dword [edi + 0x2b4]
cmp eax, dword [edi + 0x2b0]
jge 0x518dc3
inc dword [edi + 0x2b4]
mov esi, dword [edi + 0x2b4]
mov eax, dword [edi + 0x2ac]
sub esi, eax
inc esi
mov edx, dword [edi + 0x2b0]
sub edx, eax
inc edx
mov dword [esp + 4], edx
push esi
mov eax, dword [esp + 8]
push eax
xor edx, edx
mov dl, byte [edi + 0x10]
mov ecx, dword [edi + 0x2ec]
mov eax, edi
call fcn.00514b84
mov eax, dword [edi + 0x2b4]
cmp eax, dword [edi + 0x2b0]
jl 0x518ebb
cmp dword [edi + 0x204], 0x12d
jne 0x518e6c
mov byte [edi + 0x171], 0
mov eax, dword [0x544738]
cmp edi, dword [eax]
jne 0x518e6c
mov eax, dword [0x544afc]
mov eax, dword [eax]
call fcn.004adf4c
test al, al
je 0x518e6c
mov eax, dword [0x544ae8]
cmp byte [eax], 0
je 0x518e6c
cmp dword [edi + 0x204], 0x12d
jne 0x518e6c
push 0
push 0
push 0
push 0
push 0
push 0xc8
mov eax, dword [0x544afc]
mov eax, dword [eax]
mov cx, 0x145d
mov edx, edi
call fcn.0049e83c
mov eax, dword [0x544738]
cmp edi, dword [eax]
jne 0x518ea1
mov eax, dword [0x544afc]
mov eax, dword [eax]
call fcn.004adf4c
test al, al
je 0x518ebb
xor eax, eax
mov dword [edi + 0x204], eax
mov byte [edi + 0x220], 1
call sub.kernel32.dll_GetTickCount_1
mov dword [edi + 0x308], eax
jmp 0x518ebb
xor eax, eax
mov dword [edi + 0x204], eax
mov byte [edi + 0x220], 1
call sub.kernel32.dll_GetTickCount_1
mov dword [edi + 0x308], eax
mov eax, dword [edi + 0x204]
cmp eax, 6
je 0x518ed1
cmp eax, 0x12d
jne 0x518f76
mov eax, dword [0x544738]
cmp edi, dword [eax]
jne 0x518f76
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x544ee8]
mov dword [edx], eax
mov eax, dword [0x544aa4]
cmp byte [eax + 0xf], 0
je 0x518f6b
mov eax, dword [0x544738]
mov eax, dword [eax]
movzx eax, byte [eax + 0xa3]
imul eax, eax, 0x12c
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fdiv dword [0x519160]
call fcn.0040333c
mov edx, 0x12c
sub edx, eax
mov eax, dword [0x544524]
mov dword [eax], edx
mov eax, dword [0x544738]
mov eax, dword [eax]
movsx eax, word [eax + 0x2a2]
cdq
push edx
push eax
mov eax, dword [0x544524]
mov eax, dword [eax]
xor edx, edx
call fcn.0040623c
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
fild qword [esp + 0x10]
fdiv dword [0x519164]
call fcn.00403330
mov edx, dword [0x544524]
sub dword [edx], eax
jmp 0x518f76
mov eax, dword [0x544524]
mov dword [eax], 0x12c
cmp dword [edi + 0x204], 7
jne 0x518fc3
mov eax, dword [edi + 0x2b0]
sub eax, 3
cmp eax, dword [edi + 0x2b4]
jg 0x518fc3
mov eax, dword [edi + 0x31c]
mov dword [edi + 8], eax
mov eax, dword [edi + 0x320]
mov dword [edi + 0xc], eax
mov eax, dword [edi + 8]
mov dword [edi + 0x128], eax
mov eax, dword [edi + 0xc]
mov dword [edi + 0x12c], eax
xor eax, eax
mov dword [edi + 0x204], eax
mov byte [edi + 0x220], 1
mov byte [esp], 1
cmp dword [edi + 0x204], 9
jne 0x519135
mov edx, dword [edi + 0x2b0]
mov eax, dword [edi + 0x2b4]
cmp edx, eax
jl 0x518fec
cmp eax, dword [edi + 0x2ac]
jge 0x518ff3
inc edx
mov dword [edi + 0x2b4], edx
mov eax, dword [edi + 0x2b4]
cmp eax, dword [edi + 0x2ac]
jle 0x51905c
dec dword [edi + 0x2b4]
or bl, byte [edi + 0x2f0]
je 0x519023
mov eax, dword [edi + 0x2b4]
cmp eax, dword [edi + 0x2ac]
jle 0x519023
dec dword [edi + 0x2b4]
mov eax, dword [edi + 0x2b0]
mov esi, eax
sub esi, dword [edi + 0x2b4]
inc esi
sub eax, dword [edi + 0x2ac]
inc eax
mov dword [esp + 4], eax
push esi
mov eax, dword [esp + 8]
push eax
xor eax, eax
mov al, byte [edi + 0x10]
call fcn.0052762c
mov edx, eax
mov ecx, dword [edi + 0x2ec]
mov eax, edi
call fcn.00514b84
mov eax, dword [edi + 0x2b4]
cmp eax, dword [edi + 0x2ac]
jg 0x519131
mov eax, dword [0x544738]
cmp edi, dword [eax]
jne 0x519117
xor eax, eax
mov dword [edi + 0x204], eax
mov byte [edi + 0x220], 1
call sub.kernel32.dll_GetTickCount_1
mov dword [edi + 0x308], eax
call sub.kernel32.dll_GetTickCount_1
mov edx, dword [0x544ee8]
mov dword [edx], eax
mov eax, dword [0x544738]
mov eax, dword [eax]
movzx eax, byte [eax + 0xa3]
imul eax, eax, 0x3e8
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fdiv dword [0x519160]
call fcn.0040333c
mov edx, 0x3e8
sub edx, eax
mov eax, dword [0x544524]
mov dword [eax], edx
mov eax, dword [0x544738]
mov eax, dword [eax]
movsx eax, word [eax + 0x2a2]
cdq
push edx
push eax
mov eax, dword [0x544524]
mov eax, dword [eax]
xor edx, edx
call fcn.0040623c
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
fild qword [esp + 0x10]
fdiv dword [0x519164]
call fcn.00403330
mov edx, dword [0x544524]
sub dword [edx], eax
jmp 0x519131
xor eax, eax
mov dword [edi + 0x204], eax
mov byte [edi + 0x220], 1
call sub.kernel32.dll_GetTickCount_1
mov dword [edi + 0x308], eax
mov byte [esp], 1
cmp ebp, dword [edi + 0x2b4]
je 0x519153
call sub.kernel32.dll_GetTickCount_1
mov dword [edi + 0x264], eax
mov eax, edi
mov si, 0xfff3
call fcn.00404458
mov al, byte [esp]
add esp, 0x18
pop ebp
pop edi
pop esi
pop ebx
ret