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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x68], edx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x52343d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
lea ebx, [eax + 0x18]
mov byte [ebx + 0x48], 0
mov byte [ebx + 0x49], 0
call fcn.005336e0
mov esi, eax
lea eax, [ebx + 0x44]
push eax
lea eax, [ebp - 0x64]
push eax
lea ecx, [esi + 0x258]
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.00524b00
push esi
lea esi, [ebp - 0x64]
mov edi, ebx
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
pop esi
cmp dword [ebx + 0x10], 0
jne 0x523212
push esi
add esi, 0x258
mov edi, ebx
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
pop esi
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0xb0]
mov eax, dword [eax + 0x1c]
mov edx, dword [esi + 0x258]
mov eax, dword [eax + edx*4]
call fcn.0054c05c
mov dword [ebp - 0x18], eax
jmp 0x5231cb
dec dword [ebx + 4]
inc dword [ebp - 0x14]
mov edi, dword [ebx + 4]
test edi, edi
jle 0x5231e3
mov eax, dword [ebp - 0x18]
mov ax, word [eax + edi*2 - 2]
call fcn.0062fe60
test al, al
jne 0x5231c5
mov eax, dword [0x669204]
dec dword [eax]
cmp dword [ebp - 0x14], 0
jle 0x523212
lea eax, [ebx + 0x44]
push eax
lea eax, [ebp - 0x64]
push eax
mov ecx, ebx
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.00524b00
push esi
lea esi, [ebp - 0x64]
mov edi, ebx
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
pop esi
cmp dword [ebx + 0x10], 0
jle 0x52341a
cmp byte [ebx + 0x14], 0
jne 0x523415
lea eax, [ebp - 0x68]
push eax
mov edx, ebx
mov ecx, dword [ebx + 0x44]
mov eax, esi
call fcn.0051e3c0
mov edx, dword [ebp - 0x68]
lea eax, [ebx + 0x3c]
call fcn.004032c8
lea edx, [ebx + 0x18]
mov eax, ebx
call fcn.0053e1ac
cmp byte [esi + 0x7dc], 1
jne 0x523262
mov eax, esi
call fcn.005de190
mov eax, esi
call fcn.005de20c
call fcn.00529a70
mov edx, dword [ebx + 0x44]
call fcn.00522e18
xor al, 1
mov byte [ebx + 0x4a], al
cmp byte [ebx + 0x4a], 0
je 0x523281
xor eax, eax
mov dword [ebx + 0x38], eax
jmp 0x52329d
call fcn.00529a70
mov cl, 1
mov edx, dword [ebx + 0x44]
call fcn.00522f74
mov edi, eax
mov dword [ebx + 0x38], edi
test edi, edi
sete al
mov byte [ebx + 0x4a], al
cmp byte [ebx + 0x4a], 0
jne 0x52341a
mov edi, dword [ebx + 0x38]
mov dword [0x66bfc0], ebx
mov eax, dword [ebx + 0x44]
push eax
mov eax, dword [ebx + 0x4c]
push eax
push 1
xor ecx, ecx
mov edx, dword [ebx + 0x3c]
mov eax, edi
call fcn.005218f8
cmp al, 2
jne 0x5232e5
mov eax, dword [ebx + 0x3c]
push eax
mov eax, dword [ebx + 0x4c]
push eax
mov eax, dword [ebx + 0x44]
push eax
mov ecx, ebx
mov edx, esi
mov eax, edi
call fcn.00521e40
cmp al, 2
je 0x5232e9
xor eax, eax
jmp 0x5232eb
mov al, 1
mov byte [ebx + 0x48], al
xor eax, eax
mov dword [0x66bfc0], eax
cmp byte [ebx + 0x48], 0
jne 0x52341a
mov eax, dword [0x6690d8]
test byte [eax + 0xa9], 0x40
je 0x52341a
mov eax, dword [ebx]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 4]
dec eax
mov dword [ebp - 0x30], eax
mov eax, dword [esi + 0xb0]
mov eax, dword [eax + 0x1c]
mov edx, dword [ebx]
mov eax, dword [eax + edx*4]
call fcn.0054c05c
mov dword [ebp - 0x1c], eax
jmp 0x523338
dec dword [ebp - 0x30]
mov eax, dword [ebp - 0x30]
test eax, eax
jl 0x523349
mov edx, dword [ebp - 0x1c]
cmp word [edx + eax*2], 0x20
je 0x523335
mov eax, dword [0x669204]
dec dword [eax]
mov eax, dword [ebx + 4]
dec eax
cmp eax, dword [ebp - 0x30]
jle 0x52341a
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x34]
mov edx, esi
mov eax, dword [ebp - 4]
call fcn.00524b00
push esi
push edi
lea esi, [ebp - 0x64]
lea edi, [ebp - 0x34]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
cmp dword [ebp - 0x24], 0
jle 0x52339a
lea eax, [ebp - 8]
push eax
lea edx, [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
mov eax, esi
call fcn.0051e3c0
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebx + 0x3c]
push eax
lea eax, [ebx + 0x40]
push eax
mov ecx, ebx
lea edx, [ebp - 0x34]
mov eax, esi
call fcn.00523018
test al, al
je 0x52341a
mov eax, dword [ebx + 0x44]
push eax
push 0
lea eax, [ebp - 9]
push eax
xor ecx, ecx
mov edx, dword [ebx + 0x40]
mov eax, edi
call fcn.0052024c
cmp byte [ebp - 9], 2
jne 0x52341a
push esi
push edi
lea esi, [ebp - 0x34]
lea edi, [ebp - 0x4c]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
mov eax, dword [ebx + 4]
add eax, dword [ebx + 0x10]
sub eax, dword [ebp - 0x48]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebx + 0x40]
push eax
mov eax, dword [ebx + 0x4c]
push eax
mov eax, dword [ebx + 0x44]
push eax
lea ecx, [ebp - 0x4c]
mov edx, esi
mov eax, edi
call fcn.00521e40
cmp al, 2
jne 0x52341a
mov byte [ebx + 0x48], 1
mov byte [ebx + 0x49], 1
jmp 0x52341a
xor eax, eax
mov dword [ebx + 0x10], eax
call fcn.00656698
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x523444
lea eax, [ebp - 0x68]
call fcn.00403274
lea eax, [ebp - 8]
call fcn.00403274
ret