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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
movsx eax, byte [eax + section..rdata]
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 8], eax
mov esi, 0xc8
cmp dword [edi + 4], ebx
jne 0x40160e
push ebx
call dword [sym.imp.USER32.dll_GetDC]
push esi
push esi
push eax
mov dword [ebp - 4], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push dword [ebp - 4]
mov dword [edi + 4], eax
push ebx
call dword [sym.imp.USER32.dll_ReleaseDC]
push dword [edi + 4]
push dword [edi]
call dword [sym.imp.GDI32.dll_SelectObject]
push 0x27100
push 0x40
mov dword [edi + 8], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [edi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, ebx
mov dword [edi + 0x10], eax
je 0x40160e
mov ecx, 0x1387f
mov word [eax], cx
inc eax
inc eax
dec ecx
jne 0x401606
push 0x428
lea eax, [ebp - 0x448]
push ebx
push eax
call fcn.0041bf92
mov eax, dword [ebp + 0xc]
add esp, 0xc
neg eax
mov ecx, dword [ebp - 8]
push 1
sbb eax, eax
mov dword [ebp - 0x448], 0x28
and eax, 0x190
mov dword [ebp - 0x444], esi
add eax, 0xffffff38
cmp dword [ebp + 8], 3
mov dword [ebp - 0x440], eax
pop eax
mov word [ebp - 0x43c], ax
mov word [ebp - 0x43a], cx
mov dword [ebp - 0x438], ebx
mov dword [ebp - 0x434], ebx
mov dword [ebp - 0x430], ebx
mov dword [ebp - 0x42c], ebx
jg 0x4016bd
shl eax, cl
cmp eax, ebx
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], eax
lea edx, [eax - 1]
je 0x4016f7
lea ecx, [ebp - 0x41e]
mov eax, edx
mov byte [ecx + 1], bl
and al, 1
neg al
sbb eax, eax
and al, 1
add eax, 0xff
mov byte [ecx - 2], al
mov byte [ecx - 1], al
mov byte [ecx], al
add ecx, 4
mov eax, edx
dec edx
test eax, eax
jne 0x401697
jmp 0x4016f7
cmp dword [ebp + 8], 5
mov dword [ebp - 0x428], ebx
mov dword [ebp - 0x424], ebx
jne 0x4016f7
mov dword [ebp - 0x438], 3
mov dword [ebp - 0x420], 0xf800
mov dword [ebp - 0x41c], 0x7e0
mov dword [ebp - 0x418], 0x1f
call dword [sym.imp.GDI32.dll_GdiFlush]
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x40175f
lea eax, [ebp - 0x448]
push ebx
push eax
push dword [edi + 0x10]
push esi
push ebx
push ebx
push ebx
push esi
push esi
push ebx
push ebx
push dword [edi]
call dword [sym.imp.GDI32.dll_SetDIBitsToDevice]
cmp eax, ebx
je 0x401758
call dword [sym.imp.GDI32.dll_GdiFlush]
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [ebp - 0x20]
sub esi, dword [ebp - 0x18]
jns 0x401744
neg esi
cmp esi, dword [edi + 0x1c]
jge 0x401758
mov eax, dword [ebp + 8]
mov dword [edi + 0x1c], esi
mov dword [edi + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [edi + 0x18], eax
pop edi
pop esi
pop ebx
leave
ret 8
lea eax, [ebp - 0x10]
push 8
push eax
call dword [sym.imp.WINMM.dll_timeGetDevCaps]
push dword [ebp - 0x10]
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 8], eax
push 0xcc0020
lea eax, [ebp - 0x448]
push ebx
push eax
push dword [edi + 0x10]
push esi
push esi
push ebx
push ebx
push esi
push esi
push ebx
push ebx
push dword [edi]
call dword [sym.imp.GDI32.dll_StretchDIBits]
mov dword [ebp - 4], eax
call dword [sym.imp.GDI32.dll_GdiFlush]
call dword [sym.imp.WINMM.dll_timeGetTime]
push dword [ebp - 0x10]
mov esi, eax
sub esi, dword [ebp - 8]
call dword [sym.imp.WINMM.dll_timeEndPeriod]
cmp dword [ebp - 4], ebx
jg 0x401744
push dword [ebp - 0x10]
call dword [sym.imp.WINMM.dll_timeEndPeriod]
jmp 0x401758