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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d4b50
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x6229a0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0xec], edi
lea esi, [edi + 0x3c]
push esi
mov dword [ebp - 0x104], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [edi + 0xccc], 0
mov dword [ebp - 4], 0
je 0x52acdd
push 0x60
lea eax, [ebp - 0x164]
push 0
push eax
call fcn.0059d800
add esp, 0xc
mov dword [ebp - 0x168], 0x64
cmp byte [edi + 0x38], 0
mov byte [edi + 0x54], 1
je 0x52ad16
cmp dword [0x620a0c], 0
je 0x52ad0e
mov byte [edi + 0x54], 0
mov byte [edi + 0x38], 0
mov byte [ebp - 0xdd], 0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [ebp - 0xdd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059b734
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [edi + 0x30]
call fcn.00518250
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x52ad6f
cmp byte [edi + 0x8c], 0
lea eax, [edi + 0x8c]
mov dword [ebp - 0xe8], eax
jne 0x52ad6f
mov edx, dword [ecx]
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov ecx, dword [ecx + 8]
add ecx, edx
mov dword [ebp - 0x20], edx
mov esi, dword [edi + 4]
mov eax, dword [eax + 0xc]
add eax, esi
mov dword [ebp - 0x1c], esi
mov esi, edi
mov dword [ebp - 0x30], edx
mov edi, dword [ebp - 0xec]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], eax
mov edx, dword [esi + 4]
mov dword [ebp - 0x2c], edx
lea esi, [edi + 0x3c]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
jmp 0x52adc5
mov ecx, dword [edi + 0xa0]
mov eax, dword [edi + 0xa8]
mov edx, dword [edi + 0xa4]
add eax, ecx
mov dword [ebp - 0x18], eax
mov eax, dword [edi + 0xac]
add eax, edx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 0x6c]
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 0x70]
mov dword [ebp - 0x24], eax
lea eax, [edi + 0x8c]
mov dword [ebp - 0x2c], 0
movups xmm0, xmmword [ebp - 0x30]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], edx
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0xe8], eax
mov ecx, dword [ebp - 0xe8]
mov edx, 1
mov eax, dword [ebp - 0x164]
mov dword [ebp - 0xf8], 0
mov dword [ebp - 0xf4], 0
cmp byte [ecx], 0
cmovne eax, edx
mov dword [ebp - 0x164], eax
lea eax, [ebp - 0xf8]
push eax
push dword [edi + 0xcd0]
call dword [sym.imp.USER32.dll_ClientToScreen]
push dword [ebp - 0xf4]
lea eax, [ebp - 0x20]
push dword [ebp - 0xf8]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [edi + 0x68]
lea edx, [ebp - 0xdc]
push 0
push 0x11
push edx
mov dword [ebp - 0xdc], 0x6c
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x64]
mov eax, dword [edi + 0x68]
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x80]
cmp byte [edi + 0xcd4], 0
je 0x52b139
push 1
call dword [sym.imp.USER32.dll_GetSystemMetrics]
cmp byte [edi + 0xce4], 0
mov dword [ebp - 0xfc], eax
jne 0x52b0ce
mov ecx, dword [edi + 0xcf4]
mov dword [edi + 0xcfc], ecx
mov ecx, dword [edi + 0xcf8]
push 0
push dword [edi + 0x68]
mov dword [edi + 0xd00], ecx
mov ecx, edi
call fcn.005133f0
mov eax, dword [edi + 0x2c]
cmp byte [eax + 0x590], 0
je 0x52af77
cmp byte [eax + 0x591], 0
jne 0x52af77
cmp dword [edi + 0xbc], 3
jge 0x52af6a
mov eax, dword [eax + 0xac]
cdq
sub eax, edx
mov dword [ebp - 0xe4], closesocket
sar eax, 1
mov dword [ebp - 0xec], eax
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0xe8], eax
mov eax, dword [edi + 0x70]
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x100], eax
mov byte [ebp - 0xdd], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xf0], eax
mov ecx, dword [edi + 0x58]
lea eax, [ebp - 0xe4]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0x40]
test eax, eax
jne 0x52af3d
mov eax, dword [ebp - 0xe8]
mov ecx, dword [ebp - 0xe4]
sub eax, ecx
test eax, eax
jle 0x52af44
cmp ecx, dword [ebp - 0xfc]
jge 0x52af44
mov byte [ebp - 0xdd], 1
jmp 0x52af51
cmp eax, 0x88760219
jne 0x52af64
cmp byte [ebp - 0xdd], 0
jne 0x52afde
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0xf0]
cmp eax, 0xc8
jb 0x52af06
inc dword [edi + 0xbc]
mov eax, dword [edi + 0x58]
push 0
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x58]
mov eax, dword [edi + 0x60]
lea edx, [ebp - 0x168]
push edx
push 0x1000000
lea edx, [ebp - 0x30]
mov ecx, dword [eax]
push edx
push dword [edi + 0x68]
lea edx, [ebp - 0x20]
push edx
push eax
call dword [ecx + 0x14]
cmp byte [edi + 0xd08], 0
mov dword [ebp - 0xe4], eax
je 0x52afb9
push 0
push dword [edi + 0x68]
mov ecx, edi
call fcn.0052b7b0
mov byte [edi + 0xd08], 1
mov eax, dword [ebp - 0xe4]
push str.Redraw_Windowed
push eax
mov ecx, edi
mov byte [edi + 0x54], 0
call fcn.0051a5a0
test al, al
sete byte [ebp - 0xdd]
jmp 0x52ace4
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x168]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0xe8]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x2c]
push edx
mov dword [ebp - 0x3c], eax
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0xec]
push 0x1000000
mov dword [ebp - 0x34], eax
mov eax, dword [edi + 0x60]
push edx
push dword [edi + 0x68]
mov dword [edi + 0xbc], 0
lea edx, [ebp - 0x50]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 0xe4]
mov esi, eax
mov eax, dword [edi + 0x58]
lea edx, [ebp - 0xe4]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
test eax, eax
js 0x52b046
mov ecx, dword [ebp - 0xe4]
cmp ecx, esi
jb 0x52b070
mov eax, dword [ebp - 0x100]
sub eax, ecx
test eax, eax
jg 0x52b046
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x168]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0xe8]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0xec]
push edx
mov dword [ebp - 0x5c], eax
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x24]
push 0x1000000
mov dword [ebp - 0x54], eax
mov eax, dword [edi + 0x60]
push edx
push dword [edi + 0x68]
lea edx, [ebp - 0x70]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x14]
lea esi, [edi + 0x3c]
jmp 0x52af97
mov eax, dword [edi + 0x2c]
cmp byte [eax + 0x590], 0
je 0x52b0f0
cmp byte [eax + 0x591], 0
jne 0x52b0f0
mov eax, dword [edi + 0x58]
push 0
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x58]
mov eax, dword [edi + 0xcf4]
mov ecx, edi
push 1
push dword [edi + 0x64]
mov dword [edi + 0xcfc], eax
mov eax, dword [edi + 0xcf8]
mov dword [edi + 0xd00], eax
call fcn.005133f0
mov eax, dword [edi + 0x60]
lea edx, [ebp - 0x168]
push edx
push 0x1000000
lea edx, [ebp - 0x30]
mov ecx, dword [eax]
push edx
push dword [edi + 0x64]
lea edx, [ebp - 0x20]
push edx
push eax
call dword [ecx + 0x14]
jmp 0x52afbf
mov eax, dword [edi + 0x2c]
cmp byte [eax + 0x358], 0
jne 0x52b1cb
cmp byte [eax + 0x359], 0
je 0x52b1cb
cmp byte [edi + 0xce4], 0
jne 0x52b17b
mov eax, dword [edi + 0x64]
lea edx, [ebp - 0x168]
push edx
push 0x1000000
lea edx, [ebp - 0x30]
mov ecx, dword [eax]
push edx
push dword [edi + 0x68]
lea edx, [ebp - 0x20]
push edx
push eax
call dword [ecx + 0x14]
mov eax, dword [edi + 0xcf4]
mov ecx, edi
push 1
push dword [edi + 0x64]
mov dword [edi + 0xcfc], eax
mov eax, dword [edi + 0xcf8]
mov dword [edi + 0xd00], eax
call fcn.005133f0
mov eax, dword [edi + 0x60]
push 1
push 0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
push str.Redraw_FullScreen_Flip
push eax
mov ecx, edi
mov byte [edi + 0x54], 0
call fcn.0051a5a0
test al, al
sete byte [ebp - 0xdd]
jmp 0x52ace4
mov eax, dword [edi + 0x60]
lea edx, [ebp - 0x168]
push edx
push 0x1000000
lea edx, [ebp - 0x30]
mov ecx, dword [eax]
push edx
push dword [edi + 0x68]
lea edx, [ebp - 0x20]
push edx
push eax
call dword [ecx + 0x14]
push str.Redraw_FullScreen_Blt
push eax
mov ecx, edi
mov byte [edi + 0x54], 0
call fcn.0051a5a0
test al, al
sete byte [ebp - 0xdd]
jmp 0x52ace4