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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
mov byte [ebp - 1], cl
mov edi, eax
mov ebx, dword [ebp + 0x10]
mov word [edi + 0x430], 0
mov eax, dword [0x531ab0]
mov edx, dword [ebp + 0xc]
mov dword [eax], edx
mov eax, dword [0x531970]
mov edx, dword [ebp + 8]
mov dword [eax], edx
mov eax, dword [0x531884]
mov byte [eax], 0
cmp byte [ebp - 1], 1
jne 0x5142ab
mov eax, dword [0x531ca8]
cmp byte [eax], 0
je 0x5142ab
mov eax, dword [0x5320e8]
mov eax, dword [eax]
call fcn.004de26c
jmp 0x514a23
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [0x531f0c]
mov eax, dword [eax]
mov ecx, ebx
mov dl, byte [ebp - 1]
call fcn.004d4668
test al, al
jne 0x514a23
mov eax, dword [0x531548]
cmp dword [eax], 0
je 0x514a23
mov eax, dword [0x67d19c]
mov eax, dword [eax + 0x18]
cmp eax, dword [0x67d1ac]
jne 0x514a23
mov eax, dword [0x531ba0]
cmp byte [eax], 5
jbe 0x514353
mov eax, dword [edi + 0x3fc]
cmp byte [eax + 0x40], 0
je 0x514353
xor edx, edx
mov eax, dword [edi + 0x3fc]
call fcn.004353a0
mov eax, dword [0x531ce8]
mov eax, dword [eax]
mov esi, dword [eax + 8]
dec esi
test esi, esi
jl 0x514347
inc esi
mov dword [ebp - 0x18], 0
mov eax, dword [0x531ce8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x18]
call fcn.0041f6dc
mov edx, 8
call fcn.00402e08
inc dword [ebp - 0x18]
dec esi
jne 0x514328
mov eax, dword [0x531ce8]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 8]
test bl, 0x10
je 0x5144eb
mov al, byte [0x514a2c]
cmp al, bl
jne 0x51436c
mov eax, dword [0x53206c]
inc dword [eax]
mov eax, dword [0x53206c]
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x67d1ac]
call fcn.004b6960
mov esi, eax
mov eax, dword [0x53206c]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x14]
je 0x5143a1
mov eax, dword [0x53206c]
xor edx, edx
mov dword [eax], edx
test esi, esi
je 0x5143ea
test bl, 4
je 0x5143f3
call fcn.00407464
mov edx, dword [0x531258]
sub eax, dword [edx]
cmp eax, 0x5dc
jbe 0x5143f3
cmp byte [esi + 0x12], 0
jne 0x5143f3
cmp byte [esi + 0x2c], 0
jne 0x5143f3
mov eax, dword [esi + 8]
push eax
mov eax, dword [esi + 0xc]
push eax
push 0
push 0
mov ecx, dword [esi + 4]
mov edx, 0x52
mov eax, edi
call fcn.00515dac
jmp 0x514a23
mov eax, dword [0x53206c]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x531374]
push eax
mov eax, dword [0x531254]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x67d1ac]
call fcn.004b6740
mov eax, dword [0x531548]
mov eax, dword [eax]
mov esi, dword [eax + 8]
mov eax, esi
mov edx, dword [0x531374]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x5144c0
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov edx, dword [0x531254]
sub eax, dword [edx]
cdq
xor eax, edx
sub eax, edx
dec eax
jg 0x5144c0
mov eax, dword [0x531254]
mov eax, dword [eax]
push eax
mov ecx, dword [0x531374]
mov ecx, dword [ecx]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x531548]
mov eax, esi
call fcn.004ce290
and eax, 0xff
mov dword [ebp - 8], eax
mov eax, edi
call fcn.00518480
test al, al
je 0x5144eb
mov eax, edi
call fcn.00518454
test al, al
je 0x5144eb
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x531548]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov dx, 0xbc2
call fcn.004c28ec
jmp 0x5144eb
mov eax, dword [0x531be4]
mov byte [eax], 1
mov eax, dword [0x531374]
mov eax, dword [eax]
mov edx, dword [0x531678]
mov dword [edx], eax
mov eax, dword [0x531254]
mov eax, dword [eax]
mov edx, dword [0x53152c]
mov dword [edx], eax
jmp 0x514a23
test bl, 8
je 0x514a23
mov eax, dword [0x53206c]
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x14]
push eax
push 1
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x67d1ac]
call fcn.004b6960
mov esi, eax
mov eax, dword [0x531374]
push eax
mov eax, dword [0x531254]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov eax, dword [0x67d1ac]
call fcn.004b6740
mov eax, dword [0x531f8c]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x5312a0]
cmp byte [eax + 0x7c], 0
je 0x514641
test esi, esi
jne 0x514641
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp byte [eax + 0x16], 0
jne 0x514641
mov eax, dword [0x5312a0]
cmp word [eax + 0x8c], 0x13
jne 0x514641
mov eax, dword [0x531254]
mov eax, dword [eax]
push eax
mov ecx, dword [0x531374]
mov ecx, dword [ecx]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.004ce290
and eax, 0xff
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [0x531548]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 8]
call fcn.004ce460
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
mov eax, dword [0x67d1d0]
call fcn.004cd564
test al, al
je 0x5145e2
test bl, 1
je 0x514641
mov eax, edi
call fcn.00518480
test al, al
je 0x514634
mov eax, edi
call fcn.00518454
test al, al
je 0x514634
mov eax, edi
call fcn.00518524
test al, al
je 0x514634
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x531548]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov dx, 0xbc7
call fcn.004c28ec
mov eax, dword [0x531884]
mov byte [eax], 1
jmp 0x514a23
test bl, 2
je 0x514760
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp byte [eax + 0x16], 0
jne 0x514760
mov eax, dword [0x531254]
mov eax, dword [eax]
push eax
mov ecx, dword [0x531374]
mov ecx, dword [ecx]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.004ce290
and eax, 0xff
mov dword [ebp - 8], eax
mov eax, edi
call fcn.00518480
test al, al
je 0x514750
mov eax, edi
call fcn.00518454
test al, al
je 0x514750
mov ecx, dword [0x531254]
mov ecx, dword [ecx]
mov edx, dword [0x531374]
mov edx, dword [edx]
mov eax, dword [0x67d1ac]
call fcn.004b7db8
mov esi, eax
test esi, esi
je 0x51471f
mov eax, dword [ebp - 8]
push eax
mov eax, dword [esi + 4]
push eax
mov ecx, dword [0x531254]
mov ecx, dword [ecx]
mov edx, dword [0x531374]
mov edx, dword [edx]
mov eax, edi
call fcn.00516fac
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x531548]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov dx, 0xbc4
call fcn.004c28ec
jmp 0x514a23
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x531548]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov dx, 0xbc4
call fcn.004c28ec
mov eax, dword [0x531678]
mov dword [eax], 0xffffffff
jmp 0x514a23
test esi, esi
jne 0x514781
test bl, 1
je 0x514993
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp byte [eax + 0x375], 0
jne 0x514993
mov eax, dword [0x531678]
mov dword [eax], 0xffffffff
test esi, esi
je 0x514841
call fcn.00407464
mov edx, dword [0x531258]
sub eax, dword [edx]
cmp eax, 0x5dc
jbe 0x5147d2
cmp byte [esi + 0x12], 0x32
jne 0x5147d2
push 0
push 0
push 0
push 0
mov ecx, dword [esi + 4]
mov edx, 0x3f2
mov eax, edi
call fcn.00515dac
mov eax, dword [0x531418]
mov byte [eax], 0
jmp 0x514a23
cmp byte [esi + 0x2c], 0
jne 0x514a23
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp byte [eax + 0x16], 0
jne 0x514a23
mov eax, dword [0x531f8c]
mov dword [eax], esi
cmp byte [esi + 0x12], 0
je 0x514817
cmp byte [esi + 0x12], 0xc
je 0x514817
cmp byte [esi + 0x12], 0x32
je 0x514817
mov edx, dword [esi + 0x34]
mov eax, 0x514a38
call fcn.0040541c
test eax, eax
je 0x514826
test bl, 1
jne 0x514826
cmp dword [esi + 0x38], 0x45
jne 0x514a23
mov edx, esi
mov eax, edi
call fcn.00513f00
call fcn.00407464
mov edx, dword [0x531bd4]
mov dword [edx], eax
jmp 0x514a23
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp byte [eax + 0x16], 0
jne 0x514a23
mov eax, dword [0x531254]
mov eax, dword [eax]
push eax
mov ecx, dword [0x531374]
mov ecx, dword [ecx]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov edx, dword [eax + 0xc]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 8]
call fcn.004ce290
and eax, 0xff
mov dword [ebp - 8], eax
mov eax, edi
call fcn.00518480
test al, al
je 0x514981
mov eax, edi
call fcn.00518454
test al, al
je 0x514981
mov eax, edi
call fcn.00518524
test al, al
je 0x514981
mov eax, 3
call fcn.004038e0
mov ebx, eax
add ebx, 0xbc6
mov eax, dword [0x531518]
cmp byte [eax + 0x1e], 0
je 0x5148e1
mov dx, 0xc
mov eax, edi
call fcn.00526180
test eax, eax
je 0x5148e1
mov ebx, 0xbcb
mov eax, dword [0x53143c]
cmp byte [eax], 0
je 0x5148fe
mov edx, dword [ebp - 8]
mov eax, edi
call fcn.00513984
test al, al
je 0x5148fe
mov ebx, 0xbcb
mov eax, dword [0x53156c]
cmp byte [eax], 0
je 0x514928
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp dword [eax + 0x56], 3
jb 0x514928
mov edx, dword [ebp - 8]
mov eax, edi
call fcn.00513a18
test al, al
je 0x514928
mov ebx, 0xbd0
mov eax, dword [0x5319c4]
cmp byte [eax], 0
je 0x514952
mov eax, dword [0x531548]
mov eax, dword [eax]
cmp dword [eax + 0x56], 6
jb 0x514952
mov edx, dword [ebp - 8]
mov eax, edi
call fcn.00513b54
test al, al
je 0x514952
mov ebx, 0xbdc
mov eax, dword [0x531548]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push 0
push 0
push 0
push 0
mov eax, dword [0x531548]
mov eax, dword [eax]
mov ecx, dword [eax + 8]
mov eax, dword [0x531548]
mov eax, dword [eax]
mov edx, ebx
call fcn.004c28ec
call fcn.00407464
mov edx, dword [0x531824]
mov dword [edx], eax
jmp 0x514a23
mov eax, dword [0x531374]
mov eax, dword [eax]
mov edx, dword [0x531548]
mov edx, dword [edx]
cmp eax, dword [edx + 8]
jne 0x5149da
mov eax, dword [0x531254]
mov eax, dword [eax]
mov edx, dword [0x531548]
mov edx, dword [edx]
cmp eax, dword [edx + 0xc]
jne 0x5149da
mov eax, edi
call fcn.00518480
test al, al
je 0x514a23
mov eax, edi
call fcn.00518454
test al, al
je 0x514a23
mov eax, edi
call fcn.00516d48
jmp 0x514a23
call fcn.00407464
mov edx, dword [0x531824]
sub eax, dword [edx]
cmp eax, 0x3e8
jbe 0x514a23
test bl, 4
je 0x5149fd
mov eax, dword [0x531be4]
mov byte [eax], 1
jmp 0x514a05
mov eax, dword [0x531be4]
mov byte [eax], 0
mov eax, dword [0x531374]
mov eax, dword [eax]
mov edx, dword [0x531678]
mov dword [edx], eax
mov eax, dword [0x531254]
mov eax, dword [eax]
mov edx, dword [0x53152c]
mov dword [edx], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc