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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
xor ecx, ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x52da32
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x118]
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.0050ca48
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov edx, 1
mov ecx, dword [eax]
call dword [ecx + 0x14]
test al, al
je 0x52d840
mov eax, dword [ebp - 8]
movzx eax, word [eax]
sub ax, 0x1b
je 0x52d822
add eax, 0xfffffffb
sub ax, 0xffe0
jae 0x52d840
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0x10]
call fcn.004b3530
mov eax, dword [ebp - 0x34]
mov edx, dword [eax]
call dword [edx + 0x24]
test al, al
jne 0x52d804
mov eax, dword [ebp - 8]
mov word [eax], 0
jmp 0x52d840
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov ebx, eax
lea edx, [ebp - 0x38]
mov eax, ebx
call fcn.004b3530
mov eax, dword [ebp - 0x38]
mov edx, dword [eax]
call dword [edx + 0x2c]
jmp 0x52d840
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 0x14]
call fcn.004b3530
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
call dword [edx + 0x28]
mov eax, dword [ebp - 4]
cmp byte [eax + 0x2a0], 0
je 0x52da04
call sub.KERNEL32.DLL_GetTickCount_1
mov edx, dword [ebp - 4]
sub eax, dword [edx + 0x2b0]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x310]
jb 0x52d876
mov eax, dword [ebp - 4]
add eax, 0x2ac
call fcn.0040a790
call sub.KERNEL32.DLL_GetTickCount_1
mov edx, dword [ebp - 4]
mov dword [edx + 0x2b0], eax
mov eax, dword [ebp - 8]
movzx eax, word [eax]
cmp ax, 8
je 0x52d967
mov eax, dword [ebp - 8]
cmp word [eax], 0xd800
jb 0x52d8a8
mov eax, dword [ebp - 8]
cmp word [eax], 0xdfff
jbe 0x52d8ac
xor eax, eax
jmp 0x52d8ae
mov al, 1
test al, al
je 0x52d91f
push 1
push 0x102
push 0x102
mov eax, dword [ebp - 4]
call fcn.0050dd6c
push eax
lea eax, [ebp - 0x30]
push eax
call sub.user32.dll_PeekMessageW
test eax, eax
je 0x52d9af
mov eax, dword [ebp - 4]
push dword [eax + 0x2ac]
lea eax, [ebp - 0x40]
mov edx, dword [ebp - 8]
movzx edx, word [edx]
call fcn.0040b820
push dword [ebp - 0x40]
lea eax, [ebp - 0x44]
mov edx, dword [ebp - 0x28]
call fcn.0040b820
push dword [ebp - 0x44]
mov eax, dword [ebp - 4]
add eax, 0x2ac
mov edx, 3
call fcn.0040baec
mov eax, dword [ebp - 8]
mov word [eax], 0
jmp 0x52d9af
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 8]
movzx edx, word [edx]
call fcn.0040b820
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 4]
add eax, 0x2ac
call fcn.0040ba0c
jmp 0x52d9af
mov eax, dword [ebp - 4]
mov esi, dword [eax + 0x2ac]
mov ebx, esi
test ebx, ebx
je 0x52d953
sub ebx, 4
mov ebx, dword [ebx]
mov eax, dword [ebp - 4]
add eax, 0x2ac
mov ecx, 1
mov edx, ebx
call fcn.0040bc7c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2ac]
call fcn.0040ac80
mov edx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2ac]
call fcn.0042be94
cmp al, 2
je 0x52d93f
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2ac]
test eax, eax
je 0x52d99b
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 4]
add edx, 0x2ac
mov ecx, 1
xchg edx, eax
call fcn.0040bc7c
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2ac]
test eax, eax
je 0x52d9c1
sub eax, 4
mov eax, dword [eax]
test eax, eax
jle 0x52d9ce
push ebp
call fcn.0052d67c
pop ecx
jmp 0x52d9e7
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x11c]
mov eax, dword [ebp - 4]
mov si, 0xffea
call fcn.00408dbc
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x118]
cmp eax, dword [ebp - 0xc]
je 0x52da04
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
call fcn.004b385c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52da39
lea eax, [ebp - 0x48]
mov edx, 3
call fcn.0040a7f0
lea eax, [ebp - 0x3c]
mov edx, dword [0x4873c0]
mov ecx, 3
call fcn.0040c258
ret