Function at 0x4c5d60
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44c
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push eax
mov esi, ecx
call fcn.00401db0
movsx ecx, al
mov eax, dword [esi + 4]
xor ebx, ebx
add esp, 4
cmp eax, ebx
mov dword [esp + 0xc], ecx
jne 0x4c5de9
push ebx
call dword [sym.imp.USER32.dll_GetDC]
push 0xc8
mov edi, eax
push 0xc8
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push edi
push ebx
mov dword [esi + 4], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov edx, dword [esi + 4]
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x27100
mov dword [esi + 8], eax
call fcn.00439320
add esp, 4
cmp eax, ebx
mov dword [esi + 0x10], eax
je 0x4c5de9
mov ecx, 0x1387f
jmp 0x4c5de0
mov word [eax], cx
add eax, 2
dec ecx
jne 0x4c5de0
xor eax, eax
mov ecx, 0x10a
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0xc]
mov ax, word [esp + 0xc]
neg ecx
sbb ecx, ecx
and ecx, 0x190
mov word [esp + 0x3e], ax
mov eax, dword [ebp + 8]
add ecx, 0xffffff38
cmp eax, 3
mov edx, 1
mov dword [esp + 0x30], 0x28
mov dword [esp + 0x34], 0xc8
mov dword [esp + 0x38], ecx
mov word [esp + 0x3c], dx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
jg 0x4c5e84
mov ecx, dword [esp + 0xc]
shl edx, cl
cmp edx, ebx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
je 0x4c5eb1
lea ecx, [esp + 0x5a]
nop
dec edx
test dl, 1
setne al
dec al
mov byte [ecx + 1], 0
add ecx, 4
and eax, 0xff
cmp edx, ebx
mov byte [ecx - 6], al
mov byte [ecx - 5], al
mov byte [ecx - 4], al
jne 0x4c5e60
jmp 0x4c5eb1
cmp eax, 5
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
jne 0x4c5eb1
mov dword [esp + 0x40], 3
mov dword [esp + 0x58], 0xf800
mov dword [esp + 0x5c], 0x7e0
mov dword [esp + 0x60], 0x1f
mov edi, dword [sym.imp.GDI32.dll_GdiFlush]
call edi
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x4c5f34
mov eax, dword [esi + 0x10]
mov ecx, dword [esi]
push ebx
lea edx, [esp + 0x34]
push edx
push eax
push 0xc8
push ebx
push ebx
push ebx
push 0xc8
push 0xc8
push ebx
push ebx
push ecx
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
test eax, eax
je 0x4c5f2b
call edi
lea edx, [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, dword [esp + 0x18]
sub edi, dword [esp + 0x20]
jns 0x4c5f0c
neg edi
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
cmp edi, dword [esi + 0x1c]
jge 0x4c5f2b
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x14], edx
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 8
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.WINMM.dll_timeGetDevCaps]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
mov edi, dword [sym.imp.WINMM.dll_timeGetTime]
call edi
mov ecx, dword [esi + 0x10]
push 0xcc0020
mov edx, dword [esi]
push 0
mov ebx, eax
lea eax, [esp + 0x38]
push eax
push ecx
push 0xc8
push 0xc8
push 0
push 0
push 0xc8
push 0xc8
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_StretchDIBits]
mov dword [esp + 0xc], eax
call dword [sym.imp.GDI32.dll_GdiFlush]
call edi
mov edi, eax
mov eax, dword [esp + 0x10]
sub edi, ebx
mov ebx, dword [sym.imp.WINMM.dll_timeEndPeriod]
push eax
call ebx
mov eax, dword [esp + 0xc]
test eax, eax
jg 0x4c5f17
mov ecx, dword [esp + 0x10]
push ecx
call ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8