Function at 0x4c8d90
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.00401e00
movsx ecx, al
mov eax, dword [esi + 4]
xor ebx, ebx
add esp, 4
cmp eax, ebx
mov dword [esp + 0xc], ecx
jne 0x4c8e19
push ebx
call dword [0x53d480]
push 0xc8
mov edi, eax
push 0xc8
push edi
call dword [0x53d0f0]
push edi
push ebx
mov dword [esi + 4], eax
call dword [0x53d484]
mov edx, dword [esi + 4]
mov eax, dword [esi]
push edx
push eax
call dword [0x53d0e4]
push 0x27100
mov dword [esi + 8], eax
call fcn.0052b380
add esp, 4
cmp eax, ebx
mov dword [esi + 0x10], eax
je 0x4c8e19
mov ecx, 0x1387f
jmp 0x4c8e10
mov word [eax], cx
add eax, 2
dec ecx
jne 0x4c8e10
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 0x4c8eb4
mov ecx, dword [esp + 0xc]
shl edx, cl
cmp edx, ebx
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edx
je 0x4c8ee1
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 0x4c8e90
jmp 0x4c8ee1
cmp eax, 5
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
jne 0x4c8ee1
mov dword [esp + 0x40], 3
mov dword [esp + 0x58], 0xf800
mov dword [esp + 0x5c], 0x7e0
mov dword [esp + 0x60], 0x1f
mov edi, dword [0x53d0dc]
call edi
lea ecx, [esp + 0x20]
push ecx
call dword [0x53d29c]
test eax, eax
je 0x4c8f64
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 [0x53d0ec]
test eax, eax
je 0x4c8f5b
call edi
lea edx, [esp + 0x18]
push edx
call dword [0x53d29c]
mov edi, dword [esp + 0x18]
sub edi, dword [esp + 0x20]
jns 0x4c8f3c
neg edi
lea eax, [esp + 0x28]
push eax
call dword [0x53d2a0]
cmp edi, dword [esi + 0x1c]
jge 0x4c8f5b
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 [0x53d0e8]
mov dword [esp + 0xc], eax
call dword [0x53d0dc]
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 0x4c8f47
mov ecx, dword [esp + 0x10]
push ecx
call ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8