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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x101dc68]
mov ecx, dword [0x101d1dc]
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 4], eax
mov eax, dword [0x101d1d8]
xor esi, esi
inc esi
push edi
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x70], esi
mov byte [ebp - 0x74], 1
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x48], ebx
call fcn.0100bc76
test eax, eax
je 0x101585d
push 0x101d488
call dword [sym.imp.ntdll.dll_RtlNumberGenericTableElementsAvl]
push eax
push 0x10045f8
push 2
push 0x1024
push 0x4e
call fcn.0100bd8d
add esp, 0x14
mov eax, dword [0x1028834]
mov dword [0x1028824], 2
mov dword [ebp - 0x64], eax
call fcn.01013475
push 8
xor eax, eax
cmp dword [0x101d834], 3
pop ecx
lea edi, [ebp - 0x24]
rep stosd dword es:[edi], eax
jne 0x101589e
push ebx
push ebx
push 0x10
push dword [0x10287dc]
call dword [sym.imp.USER32.dll_PostMessageW]
mov eax, esi
jmp 0x1015da3
cmp dword [ebp + 0x14], ebx
je 0x101594c
mov ecx, dword [0x101d2a8]
mov eax, dword [0x101d2a4]
mov edx, dword [0x101d2a0]
mov edi, dword [0x101d2ac]
mov dword [ebp - 0x34], ecx
mov ecx, dword [0x101d3f4]
cmp eax, ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x30], edi
jg 0x1015980
mov esi, dword [0x101d3f0]
jl 0x10158e8
cmp edx, esi
jae 0x1015980
mov edx, dword [0x101d3ec]
cmp edi, edx
jl 0x1015980
mov eax, dword [0x101d3e8]
jg 0x1015908
cmp dword [ebp - 0x34], eax
jbe 0x1015980
mov esi, dword [0x101d3f0]
cmp dword [ebp - 0x28], edx
jg 0x101591e
jl 0x1015914
cmp dword [ebp - 0x2c], eax
jae 0x101591e
mov edi, edx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edi
jmp 0x1015980
cmp edi, ecx
jg 0x1015944
jl 0x1015929
cmp dword [ebp - 0x34], esi
ja 0x1015944
call fcn.0100bc76
test eax, eax
je 0x10159c3
push 0x10045a8
push 2
push 0x1040
jmp 0x10159b9
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], ecx
jmp 0x1015980
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01013564
test eax, eax
jne 0x101597d
call fcn.0100bc76
test eax, eax
je 0x10159c3
push 0x1004560
push 2
push 0x104c
jmp 0x10159b9
mov edi, dword [ebp - 0x30]
push 1
push 1
push edi
push dword [ebp - 0x34]
mov esi, 0x101d4f8
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push ebx
push ebx
push esi
call fcn.0100a224
cmp eax, ebx
jne 0x10159ca
call fcn.010133e6
call fcn.0100bc76
test eax, eax
je 0x10159c3
push 0x1004520
push 2
push 0x1058
push 0x4e
call fcn.0100bd8d
add esp, 0x10
xor eax, eax
jmp 0x1015da3
mov eax, dword [ebp - 0x34]
push esi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], edi
call fcn.01008cf7
mov esi, eax
call fcn.0100bc76
test eax, eax
je 0x1015a00
push dword [esi + 0xc]
push dword [esi + 8]
push 0x1004500
push 2
push 0x105f
push 0x4e
call fcn.0100bd8d
add esp, 0x18
mov eax, dword [ebp - 0x34]
or dword [ebp - 0x1c], 0xffffffff
or dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x58]
push eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x1015a49
cmp dword [ebp - 0x58], ebx
jne 0x1015a3b
cmp dword [ebp - 0x54], ebx
je 0x1015a49
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
jne 0x1015a7d
call fcn.0100bc76
test eax, eax
je 0x1015a68
push 0x1004178
push 2
push 0x106d
push 0x4e
call fcn.0100bd8d
add esp, 0x10
mov dword [ebp - 0x70], ebx
jmp 0x1015a7d
mov edi, dword [ebp - 0x30]
jmp 0x1015a7d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x101d834], 2
je 0x1015a72
cmp dword [0x101d834], 3
je 0x1015d5e
add dword [ebp - 0x44], 1
adc dword [ebp - 0x40], ebx
cmp dword [ebp - 0x70], ebx
je 0x1015b75
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x1015b75
cmp dword [ebp - 0x40], ebx
ja 0x1015ac4
cmp dword [ebp - 0x44], 1
jbe 0x1015bd7
mov edi, dword [ebp - 0x3c]
sub edi, dword [ebp - 0x60]
mov esi, dword [ebp - 0x38]
sbb esi, dword [ebp - 0x5c]
push ebx
push 4
push dword [ebp - 0x54]
push dword [ebp - 0x58]
call fcn.0101b380
cmp esi, edx
jl 0x1015bd7
jg 0x1015af0
cmp edi, eax
jbe 0x1015bd7
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x28]
sbb ecx, dword [ebp - 0x4c]
push ebx
push dword [ebp + 0x18]
push ecx
push eax
call fcn.0101b380
mov ecx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
sbb esi, dword [ebp - 0x28]
push esi
push ecx
push edx
push eax
call fcn.0101b3e0
add eax, dword [ebp - 0x64]
mov ecx, dword [0x1028830]
add ecx, eax
mov dword [0x1028834], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x38]
mov dword [0x1028828], ecx
mov dword [ebp - 0x5c], eax
call fcn.01013475
mov edi, dword [ebp - 0x3c]
sub edi, dword [ebp - 0x6c]
mov esi, dword [ebp - 0x38]
sbb esi, dword [ebp - 0x68]
push ebx
push 0x40
push dword [ebp - 0x54]
push dword [ebp - 0x58]
call fcn.0101b380
cmp esi, edx
jl 0x1015bd7
jg 0x1015b67
cmp edi, eax
jbe 0x1015bd7
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x68], eax
jmp 0x1015bcd
mov eax, dword [ebp - 0x44]
and eax, 0x1f
or eax, ebx
je 0x1015bd7
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 0x28]
sbb ecx, dword [ebp - 0x4c]
push ebx
push dword [ebp + 0x18]
push ecx
push eax
call fcn.0101b380
mov ecx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x2c]
sbb edi, dword [ebp - 0x28]
push edi
push ecx
push edx
push eax
call fcn.0101b3e0
add eax, dword [ebp - 0x64]
mov ecx, dword [0x1028830]
add ecx, eax
mov dword [0x1028834], eax
mov dword [0x1028828], ecx
call fcn.01013475
mov eax, dword [ebp - 0x44]
and eax, 0x7f
or eax, ebx
je 0x1015bd7
push 0x101d9b6
call fcn.01006923
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x7c]
push dword [ebp - 0x80]
push dword [ebp - 0x74]
push 0x101d488
call fcn.0100df64
mov ecx, dword [0x101d238]
mov esi, eax
mov eax, dword [0x101d23c]
cmp eax, dword [ebp - 0x28]
mov byte [ebp - 0x74], bl
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], eax
jl 0x1015d6e
jg 0x1015c18
cmp ecx, dword [ebp - 0x2c]
jb 0x1015d6e
cmp esi, ebx
je 0x1015c54
mov edx, dword [0x101d408]
test byte [edx + 0x1c], 0x10
je 0x1015c54
cmp eax, dword [0x101d3ec]
jl 0x1015c54
jg 0x1015c3a
cmp ecx, dword [0x101d3e8]
jbe 0x1015c54
cmp eax, dword [0x101d3f4]
jl 0x1015d54
jg 0x1015c54
cmp ecx, dword [0x101d3f0]
jb 0x1015d54
lea eax, [ebp - 0x48]
push eax
mov dword [ebp - 0x48], ebx
call fcn.0100c263
cmp esi, ebx
je 0x1015d6e
push ebx
push ebx
call fcn.0100f43f
test eax, eax
je 0x1015ceb
push dword [ebp - 0x48]
push 0x101d4f8
call fcn.010091ed
test eax, eax
je 0x1015cca
push dword [ebp - 0x48]
push ebx
call fcn.010153e7
test eax, eax
jne 0x1015cf5
call fcn.0100bc76
test eax, eax
je 0x1015cf5
push dword [0x101d24c]
push dword [0x101d248]
push dword [0x101d23c]
push dword [0x101d238]
push 0x10044d0
push 2
push 0x10cf
push 0x4e
call fcn.0100bd8d
add esp, 0x20
jmp 0x1015cf5
call fcn.0100bc76
test eax, eax
je 0x1015cf5
push 0x10044bc
push 1
push 0x10d5
push 0x4e
call fcn.0100bd8d
add esp, 0x10
jmp 0x1015cf5
cmp dword [ebp + 0x14], ebx
je 0x1015cf5
mov dword [ebp - 0x78], ebx
xor esi, esi
mov eax, dword [0x101d99c]
cmp eax, 0xffffffff
je 0x1015d0d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x101d99c], 0xffffffff
cmp dword [0x101d9a0], ebx
je 0x1015d4f
push dword [0x101d9a0]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
test eax, eax
jne 0x1015d15
push dword [0x101d9a0]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
test eax, eax
je 0x1015d49
push 0x10e7
push 0x1003838
push 0x10037d8
call fcn.01007cb4
mov dword [0x101d9a0], ebx
call fcn.0100842d
cmp esi, ebx
jne 0x1015a6d
jmp 0x1015d6e
push ebx
push ebx
push 0x10
push dword [0x10287dc]
call dword [sym.imp.USER32.dll_PostMessageW]
call fcn.010133e6
call fcn.0100bc76
test eax, eax
je 0x1015da0
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
add eax, 0xffffffff
adc ecx, 0xffffffff
push ecx
push eax
push 0x1004484
push 2
push 0x10f2
push 0x4e
call fcn.0100bd8d
add esp, 0x18
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.0101b02f
leave
ret 0x14