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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov ebx, eax
mov esi, dword [0x531548]
xor eax, eax
push ebp
push 0x52653e
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x5320e8]
mov eax, dword [eax]
mov eax, dword [eax + 0x79c]
cmp byte [eax + 0x278], 0
jne 0x5262cd
mov eax, dword [0x5312c8]
cmp dword [eax], 4
jge 0x526222
mov eax, dword [0x5312c8]
mov dword [eax], 4
mov eax, dword [0x531518]
cmp byte [eax + 0x42], 0
je 0x5262cd
mov eax, dword [0x531c28]
cmp dword [eax], 0
je 0x5262cd
call fcn.00407464
mov edx, dword [0x531f7c]
sub eax, dword [edx]
mov ecx, 0x3e8
xor edx, edx
div ecx
xor edx, edx
push edx
push eax
mov eax, dword [0x5312c8]
mov eax, dword [eax]
cdq
cmp edx, dword [esp + 4]
jne 0x526270
cmp eax, dword [esp]
pop edx
pop eax
jae 0x5262cd
jmp 0x526274
pop edx
pop eax
jge 0x5262cd
call fcn.00407464
mov edx, dword [0x531f7c]
mov dword [edx], eax
mov eax, dword [0x531c28]
mov eax, dword [eax]
movzx eax, word [eax + 0x1e]
mov edx, dword [0x531c28]
mov edx, dword [edx]
movzx edx, byte [edx + 0x40]
add eax, edx
mov edx, dword [esi]
cmp eax, dword [edx + 0x56]
ja 0x5262cd
mov eax, dword [0x531c28]
mov eax, dword [eax]
push eax
mov ecx, dword [0x531254]
mov ecx, dword [ecx]
mov edx, dword [0x531374]
mov edx, dword [edx]
mov eax, ebx
call fcn.00512e60
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x526552
mov eax, dword [0x531518]
cmp byte [eax + 0x20], 0
je 0x526398
mov eax, dword [0x531f8c]
cmp dword [eax], 0
je 0x526398
mov eax, dword [0x53199c]
cmp byte [eax], 3
jb 0x526398
mov dx, 0x19
mov eax, ebx
call fcn.00526180
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x526398
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 [esi]
cmp eax, dword [edx + 0x56]
ja 0x52638b
mov eax, dword [0x53156c]
cmp byte [eax], 0
jne 0x526359
mov eax, ebx
call fcn.005269c4
test al, al
je 0x526359
mov eax, dword [ebp - 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov eax, ebx
call fcn.00512e60
mov eax, dword [0x531540]
mov byte [eax], 1
mov eax, dword [0x53156c]
cmp byte [eax], 0
je 0x52638b
mov eax, ebx
call fcn.005269c4
test al, al
jne 0x52638b
mov eax, dword [ebp - 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov eax, ebx
call fcn.00512e60
mov eax, dword [0x531540]
mov byte [eax], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x526552
mov eax, dword [0x531f8c]
cmp dword [eax], 0
je 0x5264b0
call fcn.00407464
mov edx, dword [esi]
sub eax, dword [edx + 0x368]
cmp eax, 0x1770
jbe 0x52642b
mov eax, dword [0x531518]
cmp byte [eax + 0x1f], 0
je 0x52642b
mov dx, 0x1a
mov eax, ebx
call fcn.00526180
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x52642b
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 [esi]
cmp eax, dword [edx + 0x56]
ja 0x52642b
mov eax, dword [ebp - 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov eax, ebx
call fcn.00512e60
call fcn.00407464
mov edx, dword [esi]
mov dword [edx + 0x368], eax
mov eax, dword [esi]
add dword [eax + 0x36c], 0x7d0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x526552
call fcn.00407464
mov edx, dword [esi]
sub eax, dword [edx + 0x36c]
cmp eax, 0x1f40
jbe 0x5264b0
mov eax, dword [0x531518]
cmp byte [eax + 0x32], 0
je 0x5264b0
mov dx, 0x5f
mov eax, ebx
call fcn.00526180
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x5264b0
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 [esi]
cmp eax, dword [edx + 0x56]
ja 0x5264b0
mov eax, dword [ebp - 8]
push eax
mov eax, dword [esi]
mov ecx, dword [eax + 0xc]
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov eax, ebx
call fcn.00512e60
call fcn.00407464
mov edx, dword [esi]
mov dword [edx + 0x36c], eax
mov eax, dword [esi]
add dword [eax + 0x368], 0x7d0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x526552
mov eax, dword [0x531518]
cmp byte [eax + 0x21], 0
je 0x526534
call fcn.00407464
mov edx, dword [esi]
sub eax, dword [edx + 0x370]
cmp eax, 0x7d0
jbe 0x526534
mov eax, dword [esi]
test byte [eax + 0x2a], 0x10
jne 0x526534
call fcn.00407464
mov edx, dword [esi]
mov dword [edx + 0x370], eax
mov dx, 0x1f
mov eax, ebx
call fcn.00526180
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x526534
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 [esi]
cmp eax, dword [edx + 0x56]
ja 0x526534
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [0x531970]
mov ecx, dword [ecx]
mov edx, dword [0x531ab0]
mov edx, dword [edx]
mov eax, ebx
call fcn.00512e60
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x526552
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x526552
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret