Function at 0x5e8fe0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x646295
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x20], esi
mov eax, dword [esi + 0x69]
lea ebx, [esi + 0x69]
mov dword [0x6ac6cc], 0
test eax, eax
je 0x5e90a8
mov esi, dword [eax + 4]
mov ecx, 0x10000
cmp esi, ecx
cmovg esi, ecx
push esi
push dword [eax + 0xc]
push dword [ebp + 8]
call fcn.00609db0
add esp, 0xc
lea eax, [ebp + 8]
mov ecx, ebx
push 0xffffffffffffffff
push esi
push eax
call fcn.005ac6c0
mov ecx, dword [ebx]
mov edx, eax
or eax, 0xffffffff
mov edi, dword [edx]
cmp ecx, edi
je 0x5e9078
mov dword [ebx], edi
mov dword [edx], 0
test ecx, ecx
je 0x5e9078
lock xadd dword [ecx], eax
dec eax
jne 0x5e9075
push ecx
call fcn.005a47b0
or eax, 0xffffffff
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x5e908c
lock xadd dword [ecx], eax
dec eax
jne 0x5e908c
push ecx
call fcn.005a47b0
mov dword [0x6ac6cc], esi
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
sub esp, 8
push 0x800493e0
push 0x10000
call fcn.005e8b70
mov eax, dword [ebx]
xor edx, edx
xor edi, edi
mov dword [ebp - 0x10], edx
test eax, eax
je 0x5e90d4
cmp dword [eax + 4], 0x10000
jg 0x5e926b
mov dword [ebp - 0x18], edx
push 0
push 0
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
mov ecx, esi
call fcn.005e8d30
mov esi, dword [ebp - 0x18]
mov edi, eax
mov eax, dword [ebx]
mov dword [ebp - 0x14], edi
test eax, eax
jne 0x5e9198
test esi, esi
je 0x5e924e
movzx edx, word [esi + 0x10]
mov ecx, edx
and ecx, 4
je 0x5e911b
mov eax, dword [esi + 0x14]
movzx eax, word [eax + 0x10]
jmp 0x5e911d
mov eax, edx
and al, 0x88
cmp al, 0x80
jne 0x5e9170
test cx, cx
je 0x5e9131
mov eax, dword [esi + 0x14]
movzx eax, word [eax + 0x10]
jmp 0x5e9133
mov eax, edx
and eax, 0x400
lea ecx, [ebp - 0x1c]
push eax
push dword [esi + 4]
push dword [esi + 0xc]
call fcn.005a5770
mov ecx, dword [ebx]
mov edx, dword [eax]
cmp ecx, edx
je 0x5e916b
mov dword [ebx], edx
mov dword [eax], 0
test ecx, ecx
je 0x5e916b
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x5e916b
push ecx
call fcn.005a47b0
mov ecx, dword [ebp - 0x1c]
jmp 0x5e9177
lock inc dword [esi]
mov ecx, dword [ebx]
mov dword [ebx], esi
test ecx, ecx
je 0x5e924e
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x5e924e
push ecx
call fcn.005a47b0
jmp 0x5e924e
test esi, esi
je 0x5e924e
movzx ecx, word [eax + 0x10]
test cl, 4
je 0x5e91b2
mov eax, dword [eax + 0x14]
movzx edx, word [eax + 0x10]
jmp 0x5e91b4
mov edx, ecx
movzx eax, word [esi + 0x10]
and edx, 0x400
test al, 4
je 0x5e91cb
mov eax, dword [esi + 0x14]
movzx ecx, word [eax + 0x10]
jmp 0x5e91cd
mov ecx, eax
mov eax, dword [ebx]
and ecx, 0x400
or ecx, edx
push ecx
mov eax, dword [eax + 4]
add eax, dword [esi + 4]
push eax
push ecx
lea ecx, [ebp - 0x1c]
call fcn.005a67d0
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x5e924b
mov eax, dword [ebx]
push dword [eax + 4]
push dword [eax + 0xc]
push dword [edi + 0xc]
call fcn.00609db0
mov eax, dword [ebx]
push dword [esi + 4]
push dword [esi + 0xc]
mov eax, dword [eax + 4]
add eax, dword [edi + 0xc]
push eax
call fcn.00609db0
add esp, 0x18
cmp edi, dword [ebx]
je 0x5e9235
lock inc dword [edi]
mov ecx, dword [ebx]
mov dword [ebx], edi
test ecx, ecx
je 0x5e9235
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x5e9235
push ecx
call fcn.005a47b0
test edi, edi
je 0x5e924b
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
jne 0x5e924b
push ecx
mov ecx, edi
call fcn.005a47b0
mov edi, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x5e926b
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
jne 0x5e926b
push ecx
mov ecx, esi
call fcn.005a47b0
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
call esi
mov eax, dword [ebx]
test eax, eax
je 0x5e9280
mov ecx, dword [eax + 4]
jmp 0x5e9282
xor ecx, ecx
mov edx, dword [ebp - 0x10]
mov esi, 0x10000
sub esi, edx
cmp ecx, esi
jg 0x5e929b
test eax, eax
je 0x5e9299
mov esi, dword [eax + 4]
jmp 0x5e929b
xor esi, esi
test eax, eax
je 0x5e92a4
mov eax, dword [eax + 0xc]
jmp 0x5e92a9
mov eax, 0x651f68
push esi
push eax
mov eax, dword [ebp + 8]
add eax, edx
push eax
call fcn.00609db0
add esp, 0xc
lea eax, [ebp - 0x24]
mov ecx, ebx
push 0xffffffffffffffff
push esi
push eax
call fcn.005ac6c0
push eax
mov ecx, ebx
call fcn.005a5c80
lea ecx, [ebp - 0x24]
call fcn.004250c0
mov ecx, dword [ebp - 0x10]
add dword [0x6ac6cc], esi
add ecx, esi
mov dword [ebp - 0x10], ecx
test edi, edi
jns 0x5e94ac
cmp ecx, 0x10000
jge 0x5e94a0
cmp edi, 0xffffff9c
jne 0x5e9498
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x20]
lea eax, [ebp - 0x18]
push 1
push 0xffffffffffffffff
mov dword [ebp - 4], 1
push eax
mov dword [0x6ac6c8], 1
call fcn.005e8d30
cmp dword [ebx], 0
mov edi, eax
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x14], edi
mov dword [0x6ac6c8], 0
jne 0x5e93b1
test esi, esi
je 0x5e943a
movzx eax, word [esi + 0x10]
test al, 4
je 0x5e9358
mov eax, dword [esi + 0x14]
movzx eax, word [eax + 0x10]
and al, 0x88
cmp al, 0x80
jne 0x5e9389
mov ecx, esi
call fcn.0041aff0
push eax
push dword [esi + 4]
lea ecx, [ebp - 0x28]
push dword [esi + 0xc]
call fcn.005a5770
push eax
mov ecx, ebx
call fcn.005a5c80
lea ecx, [ebp - 0x28]
call fcn.004250c0
jmp 0x5e943a
lock inc dword [esi]
mov ecx, dword [ebx]
mov dword [ebx], esi
test ecx, ecx
je 0x5e943a
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x5e943a
push ecx
call fcn.005a47b0
jmp 0x5e943a
test esi, esi
je 0x5e943a
mov ecx, esi
call fcn.0041aff0
mov ecx, dword [ebx]
mov edx, eax
and edx, 0x400
call fcn.0041aff0
mov ecx, dword [ecx + 4]
or edx, eax
add ecx, dword [esi + 4]
push edx
push ecx
push ecx
lea ecx, [ebp - 0x1c]
call fcn.005a67d0
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x5e942f
mov eax, dword [ebx]
push dword [eax + 4]
push dword [eax + 0xc]
push dword [edi + 0xc]
call fcn.00609db0
mov eax, dword [ebx]
push dword [esi + 4]
push dword [esi + 0xc]
mov eax, dword [eax + 4]
add eax, dword [edi + 0xc]
push eax
call fcn.00609db0
add esp, 0x18
cmp edi, dword [ebx]
je 0x5e942f
lock inc dword [edi]
mov ecx, dword [ebx]
mov dword [ebx], edi
test ecx, ecx
je 0x5e942f
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
jne 0x5e942f
push ecx
call fcn.005a47b0
lea ecx, [ebp - 0x1c]
call fcn.004250c0
mov edi, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x5e9457
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
jne 0x5e9457
push ecx
mov ecx, esi
call fcn.005a47b0
mov ecx, dword [ebx]
test ecx, ecx
je 0x5e9462
mov edx, dword [ecx + 4]
jmp 0x5e9464
xor edx, edx
mov eax, 0x10000
sub eax, edx
sub eax, dword [ebp - 0x10]
test eax, eax
jle 0x5e9476
test edi, edi
jle 0x5e947a
test edi, edi
jg 0x5e947f
cmp edi, 0xffffffff
jne 0x5e948d
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
test ecx, ecx
jne 0x5e9273
mov ecx, dword [ebp - 0x10]
lea eax, [edi + 0x186a0]
jmp 0x5e94b1
lea eax, [edi + 0x2710]
jmp 0x5e94b1
mov dword [0x6ac6c8], 0x37
jmp 0x5e94e3
mov eax, 4
mov dword [0x6ac6c8], eax
test ecx, ecx
jg 0x5e94e3
mov ecx, dword [ebp - 0x20]
add eax, 0x4e20
mov dword [0x6ac6c8], eax
call fcn.005e79a0
mov ecx, dword [ebp - 0x10]
test al, al
mov eax, 0xffffffff
cmovne ecx, eax
sub dword [0x6ac6c8], 0x4e20
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10