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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x5132d0
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x513271
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp + 8], 0
jne 0x512ea3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5132ba
mov eax, dword [ebp + 8]
movzx eax, word [eax + 0x1e]
mov edx, dword [ebp + 8]
movzx edx, byte [edx + 0x40]
add eax, edx
mov edx, dword [0x531548]
mov edx, dword [edx]
cmp eax, dword [edx + 0x56]
jbe 0x512ecd
mov eax, dword [ebp + 8]
cmp byte [eax + 0x1b], 0
jne 0x513258
mov eax, dword [ebp + 8]
cmp byte [eax + 0x1b], 0
jne 0x512f8a
mov eax, dword [ebp + 8]
cmp word [eax + 8], 0x1a
jne 0x512f05
call fcn.00407464
mov edx, dword [0x531edc]
sub eax, dword [edx]
cmp eax, 0x1b58
jae 0x512f05
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5132ba
mov eax, dword [ebp + 8]
cmp word [eax + 8], 0x1b
jne 0x512f30
call fcn.00407464
mov edx, dword [0x531888]
sub eax, dword [edx]
cmp eax, 0xbb8
jae 0x512f30
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5132ba
call fcn.00407464
mov edx, dword [0x531398]
sub eax, dword [edx]
mov edx, dword [0x531508]
cmp eax, dword [edx]
jbe 0x513267
call fcn.00407464
mov edx, dword [0x531398]
mov dword [edx], eax
mov eax, dword [0x53125c]
xor edx, edx
mov dword [eax], edx
push 0
mov eax, dword [ebp + 8]
movzx eax, word [eax + 8]
push eax
push 0
mov eax, dword [0x531548]
mov eax, dword [eax]
xor ecx, ecx
mov cl, byte [eax + 0x10]
mov edx, 0xbc9
mov eax, ebx
call fcn.00516b8c
jmp 0x513267
push edi
mov ecx, esi
mov edx, 0xaf
mov eax, 0x186
call fcn.004ce4d0
mov dword [ebp - 4], eax
mov eax, dword [0x531518]
cmp byte [eax + 0x169], 0
jne 0x512fb9
mov edx, dword [ebp + 8]
mov eax, ebx
call fcn.0052782c
jmp 0x512fc3
mov edx, dword [ebp + 8]
mov eax, ebx
call fcn.00527ba4
mov eax, dword [0x531518]
cmp byte [eax + 0x3e], 0
je 0x51307c
mov eax, dword [ebp + 8]
mov ax, word [eax + 8]
cmp ax, 0x2f
ja 0x512fe9
and eax, 0x7f
bt dword [0x5132e0], eax
jb 0x51302a
mov eax, dword [ebp + 8]
cmp word [eax + 8], 0x21
jne 0x513000
mov eax, dword [0x531518]
cmp byte [eax + 0x43], 0
je 0x51302a
mov eax, dword [ebp + 8]
cmp word [eax + 8], 0x17
jne 0x513015
mov eax, dword [0x531518]
cmp byte [eax + 0x4c], 0
je 0x51302a
mov eax, dword [ebp + 8]
cmp word [eax + 8], 0xa
jne 0x51307c
mov eax, dword [0x531518]
cmp byte [eax + 0x4d], 0
je 0x51307c
mov eax, dword [0x531690]
cmp dword [eax], 0
je 0x513050
mov eax, dword [0x531690]
mov eax, dword [eax]
cmp byte [eax + 0x2c], 0
jne 0x513050
mov eax, dword [0x531690]
mov eax, dword [eax]
mov edx, dword [0x531c00]
mov dword [edx], eax
mov eax, dword [0x531c00]
cmp dword [eax], 0
je 0x51306b
mov eax, dword [0x531c00]
mov eax, dword [eax]
mov edx, dword [0x5320d4]
mov dword [edx], eax
jmp 0x51308b
mov eax, dword [0x5320d4]
mov eax, dword [eax]
mov edx, dword [0x531c00]
mov dword [edx], eax
jmp 0x51308b
mov eax, dword [0x531690]
mov eax, dword [eax]
mov edx, dword [0x531c00]
mov dword [edx], eax
mov eax, dword [0x531c00]
cmp dword [eax], 0
je 0x5130ab
mov eax, dword [0x531c00]
mov eax, dword [eax]
cmp byte [eax + 0x2c], 0
je 0x5130ab
mov eax, dword [0x531c00]
xor edx, edx
mov dword [eax], edx
mov edx, dword [0x531c00]
mov edx, dword [edx]
mov eax, dword [0x67d1ac]
call fcn.004b7258
test al, al
jne 0x5130ca
mov eax, dword [0x531c00]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x531690]
cmp dword [eax], 0
je 0x5130fa
mov eax, dword [0x531690]
mov eax, dword [eax]
cmp byte [eax + 0x2c], 0
je 0x5130fa
mov eax, dword [ebp + 8]
cmp word [eax + 8], 0x39
jne 0x5130fa
mov eax, dword [0x531690]
mov eax, dword [eax]
mov edx, dword [0x531c00]
mov dword [edx], eax
mov eax, dword [0x531c00]
cmp dword [eax], 0
jne 0x51311e
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
mov edx, esi
mov eax, dword [0x67d1ac]
call fcn.004b6740
xor esi, esi
jmp 0x513142
mov eax, dword [0x531c00]
mov eax, dword [eax]
mov eax, dword [eax + 8]
mov dword [ebp - 8], eax
mov eax, dword [0x531c00]
mov eax, dword [eax]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [0x531c00]
mov eax, dword [eax]
mov esi, dword [eax + 4]
mov eax, ebx
call fcn.00518480
test al, al
je 0x513267
mov eax, ebx
call fcn.00518454
test al, al
je 0x513267
call fcn.00407464
mov edx, dword [0x531398]
mov dword [edx], eax
mov eax, 0x24
call fcn.00402dd8
mov ebx, eax
mov eax, ebx
xor ecx, ecx
mov edx, 0x24
call fcn.004038c0
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x1c]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 8]
movzx eax, word [eax + 8]
mov dword [ebx + 4], eax
xor eax, eax
mov dword [ebx], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
add eax, 0xc8
mov edx, dword [0x53125c]
mov dword [edx], eax
mov eax, dword [ebx + 4]
cmp eax, 0x1f
ja case.0x5131c0.0
mov al, byte [eax + 0x5131c7]
jmp dword [eax*4 + 0x5131e7]
call fcn.00407464
mov edx, dword [0x531fb4]
mov dword [edx], eax
mov eax, dword [0x532024]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x531c00]
cmp dword [eax], 0
je 0x513235
mov eax, dword [0x531c00]
mov eax, dword [eax]
cmp byte [eax + 0x12], 0
jne 0x513235
mov eax, 0x44c
call fcn.004038e0
add eax, 0x12c
mov edx, dword [0x532024]
mov dword [edx], eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 4]
push eax
push ebx
push esi
push 0
push 0
mov eax, dword [0x531548]
mov eax, dword [eax]
mov ecx, dword [ebp - 8]
mov dx, 0xbc9
call fcn.004c28ec
jmp 0x513267
mov edx, 0x5132f0
mov eax, dword [0x67d19c]
call fcn.0050ac90
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5132ba
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5132d7
lea eax, [ebp - 0x10]
call fcn.00404e18
ret