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

Disassembly:
push 0x58
mov eax, 0x103175c1
call fcn.1027911b
mov cl, byte [ebp + 0xc]
xor eax, eax
mov edi, dword [ebp + 8]
test cl, cl
mov esi, dword [ebp + 0x10]
sete al
mov byte [ebp - 0x2c], cl
imul eax, eax, 0x5c
mov byte [ebp - 0x21], 1
mov dword [ebp - 0x44], eax
lea ebx, [eax + edi]
mov eax, dword [ebx + 0x34]
mov ecx, dword [ebx + 0x38]
sub eax, dword [ebx + 0x2c]
sub ecx, dword [ebx + 0x30]
test byte [ebx + 0x80], 1
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], ecx
je 0x1005e7f5
test eax, eax
je 0x1005e7f5
test ecx, ecx
je 0x1005e7f5
test byte [edi + 0x10f], 4
je 0x1005e6ee
and dword [ebp - 0x40], 0
and dword [ebp - 0x3c], 0
cmp dword [esi + 0x1c], 0
je 0x1005e5c3
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea ecx, [ebp - 0x64]
call fcn.100836af
push dword [ebp - 0x30]
and dword [ebp - 4], 0
test byte [ebx + 0x80], 6
push dword [ebp - 0x34]
jne 0x1005e5e3
mov ecx, dword [esi + 8]
jmp 0x1005e5e6
lea ecx, [ebp - 0x64]
call fcn.100838e3
push eax
push dword [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x28], eax
push edi
call fcn.1005cc2f
mov eax, dword [edi + 0xc]
mov byte [ebp - 4], 1
sub eax, 1
je 0x1005e651
dec eax
sub eax, 1
je 0x1005e643
sub eax, 1
je 0x1005e635
sub eax, 1
je 0x1005e627
push 0x2073da
call fcn.10153dc1
mov byte [ebp - 0x21], 0
jmp 0x1005e672
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push edi
call fcn.1005e16f
jmp 0x1005e65c
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push edi
call fcn.1005e431
jmp 0x1005e65c
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push edi
call fcn.1005e32b
jmp 0x1005e65c
push 0xe
push dword [ebp - 0x28]
push edi
call fcn.1005e524
test al, al
sete al
shl al, 3
xor al, byte [edi + 0x10c]
and al, 8
xor byte [edi + 0x10c], al
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 0
call fcn.1005d093
mov al, byte [edi + 0x10c]
test al, 8
je 0x1005e68c
test al, 0x10
je 0x1005e6b4
mov eax, dword [esi + 4]
push 0xcc0020
push 0
push 0
push dword [ebp - 0x28]
mov byte [esi + 0x14], 1
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [esi + 0x10]
push dword [esi + 0xc]
push dword [eax + 8]
call dword [sym.imp.GDI32.dll_BitBlt]
xor eax, eax
cmp dword [esi + 0x1c], eax
je 0x1005e6e2
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [ebp - 0x38]
sub ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x34]
sbb eax, dword [ebp - 0x3c]
push eax
push ecx
mov ecx, dword [esi + 0x1c]
push edi
call fcn.100b364e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x64]
call fcn.100836de
cmp dword [edi + 0xe8], 0
je 0x1005e7e1
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebx + 0x28]
call fcn.1005f785
mov eax, dword [ebx + 0x50]
add eax, dword [esi + 0x10]
push eax
mov eax, dword [esi + 0xc]
add eax, dword [ebx + 0x4c]
push eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [esi + 4]
push dword [eax + 8]
call dword [sym.imp.GDI32.dll_SaveDC]
push dword [ebp - 0x14]
mov eax, dword [esi + 4]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [eax + 8]
call dword [sym.imp.GDI32.dll_IntersectClipRect]
mov ebx, dword [edi + 0xe8]
jmp 0x1005e7c6
test byte [ebx + 0x10f], 8
je 0x1005e7c0
mov edx, dword [ebp - 0x44]
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0x10]
lea ecx, [edx + edi]
mov dword [ebp - 0x30], eax
test byte [ecx + 0x80], 2
je 0x1005e789
mov eax, dword [edx + ebx + 0x2c]
sub eax, dword [edx + ebx + 0x70]
sub eax, dword [edx + ebx + 0x34]
sub eax, dword [ecx + 0x54]
sub eax, dword [ecx + 0x2c]
add eax, dword [ecx + 0x34]
add eax, dword [ecx + 0x4c]
jmp 0x1005e78d
mov eax, dword [edx + ebx + 0x70]
add dword [esi + 0xc], eax
mov eax, dword [edx + ebx + 0x74]
add dword [esi + 0x10], eax
push esi
push dword [ebp - 0x2c]
push ebx
call fcn.1005e543
and byte [ebp - 0x21], al
mov eax, dword [ebp - 0x34]
mov ecx, dword [esi + 0x18]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x30]
mov dword [esi + 0x10], eax
test ecx, ecx
je 0x1005e7c0
call fcn.1005e110
test al, al
jne 0x1005e7ca
mov ebx, dword [ebx + 0xf4]
test ebx, ebx
jne 0x1005e74b
cmp dword [edi + 0xe8], 0
je 0x1005e7e1
mov eax, dword [esi + 4]
push 0xffffffffffffffff
push dword [eax + 8]
call dword [sym.imp.GDI32.dll_RestoreDC]
mov ecx, dword [esi + 0x18]
test ecx, ecx
je 0x1005e7f5
call fcn.1005e110
test al, al
je 0x1005e7f5
xor al, al
jmp 0x1005e7f8
mov al, byte [ebp - 0x21]
call fcn.102790cd
ret 0xc