Function at 0x52987c
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 0x529b89
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.00539564
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.0052b24c
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 0x52995e
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.00551af8
mov dword [ebp - 0x18], eax
jmp 0x529917
dec dword [ebx + 4]
inc dword [ebp - 0x14]
mov edi, dword [ebx + 4]
test edi, edi
jle 0x52992f
mov eax, dword [ebp - 0x18]
mov ax, word [eax + edi*2 - 2]
call fcn.0062dec8
test al, al
jne 0x529911
mov eax, dword [0x66ebf4]
dec dword [eax]
cmp dword [ebp - 0x14], 0
jle 0x52995e
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.0052b24c
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 0x529b66
cmp byte [ebx + 0x14], 0
jne 0x529b61
lea eax, [ebp - 0x68]
push eax
mov edx, ebx
mov ecx, dword [ebx + 0x44]
mov eax, esi
call fcn.00524b50
mov edx, dword [ebp - 0x68]
lea eax, [ebx + 0x3c]
call fcn.004032c8
lea edx, [ebx + 0x18]
mov eax, ebx
call fcn.00543ce4
cmp byte [esi + 0x7dc], 1
jne 0x5299ae
mov eax, esi
call fcn.005e2574
mov eax, esi
call fcn.005e25f0
call fcn.0052fdcc
mov edx, dword [ebx + 0x44]
call fcn.0052958c
xor al, 1
mov byte [ebx + 0x4a], al
cmp byte [ebx + 0x4a], 0
je 0x5299cd
xor eax, eax
mov dword [ebx + 0x38], eax
jmp 0x5299e9
call fcn.0052fdcc
mov cl, 1
mov edx, dword [ebx + 0x44]
call fcn.005296c0
mov edi, eax
mov dword [ebx + 0x38], edi
test edi, edi
sete al
mov byte [ebx + 0x4a], al
cmp byte [ebx + 0x4a], 0
jne 0x529b66
mov edi, dword [ebx + 0x38]
mov dword [0x672fdc], 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.00528088
cmp al, 2
jne 0x529a31
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.005285d0
cmp al, 2
je 0x529a35
xor eax, eax
jmp 0x529a37
mov al, 1
mov byte [ebx + 0x48], al
xor eax, eax
mov dword [0x672fdc], eax
cmp byte [ebx + 0x48], 0
jne 0x529b66
mov eax, dword [0x66e8a8]
test byte [eax + 0xa9], 0x40
je 0x529b66
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.00551af8
mov dword [ebp - 0x1c], eax
jmp 0x529a84
dec dword [ebp - 0x30]
mov eax, dword [ebp - 0x30]
test eax, eax
jl 0x529a95
mov edx, dword [ebp - 0x1c]
cmp word [edx + eax*2], 0x20
je 0x529a81
mov eax, dword [0x66ebf4]
dec dword [eax]
mov eax, dword [ebx + 4]
dec eax
cmp eax, dword [ebp - 0x30]
jle 0x529b66
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.0052b24c
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 0x529ae6
lea eax, [ebp - 8]
push eax
lea edx, [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
mov eax, esi
call fcn.00524b50
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.00529764
test al, al
je 0x529b66
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.005269dc
cmp byte [ebp - 9], 2
jne 0x529b66
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.005285d0
cmp al, 2
jne 0x529b66
mov byte [ebx + 0x48], 1
mov byte [ebx + 0x49], 1
jmp 0x529b66
xor eax, eax
mov dword [ebx + 0x10], eax
call fcn.00656fdc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x529b90
lea eax, [ebp - 0x68]
call fcn.00403274
lea eax, [ebp - 8]
call fcn.00403274
ret