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

Disassembly:
push rbx
push rdi
sub rsp, 0x38
mov rax, qword [0x1400acff0]
xor ebx, ebx
mov rdi, rcx
cmp rax, 0xffffffffffffffff
je 0x140012c9c
cmp rax, rcx
jne 0x140012c9c
mov eax, dword [0x1400ad40e]
mov dword [rsp + 0x20], ebx
xchg dword [rsp + 0x20], eax
mov edx, dword [rsp + 0x20]
cmp edx, 1
jne 0x140012c9c
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r11d, eax
mov eax, dword [0x1400ad412]
cmp r11d, eax
jb 0x140012c9c
sub r11d, eax
mov eax, 0x10624dd3
mul r11d
shr edx, 6
cmp edx, 0x12c
jb 0x140012c9c
mov r8, qword [0x1400acff0]
mov rcx, qword [0x1400ad4a0]
lea r9d, [rbx + 0x20]
mov edx, 0x40a
call qword [sym.imp.USER32.dll_PostMessageA]
test rdi, rdi
jne 0x140012dbb
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rcx, [0x1400acd68]
mov dword [0x1400ad664], eax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11d, dword [0x1400abd0c]
inc r11d
lea rcx, [0x1400acd68]
xchg dword [0x1400ad658], r11d
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x1400ad5cc]
mov dword [rsp + 0x60], ebx
mov dword [rsp + 0x50], ebx
mov dword [rsp + 0x24], ebx
xchg dword [rsp + 0x60], eax
mov ecx, dword [0x1400ad640]
xchg dword [rsp + 0x50], ecx
mov eax, dword [0x1400ad634]
xchg dword [rsp + 0x24], eax
mov eax, dword [rsp + 0x60]
mov edx, dword [rsp + 0x50]
cmp eax, edx
mov ecx, edx
cmovg ecx, eax
cmp ecx, dword [rsp + 0x24]
mov dword [rsp + 0x60], ecx
jle 0x140012d29
xchg dword [0x1400ad634], ecx
mov edx, dword [rsp + 0x50]
xchg dword [0x1400ad644], edx
mov dword [rsp + 0x50], ebx
mov dword [rsp + 0x60], ebx
mov eax, ebx
xchg dword [0x1400ad5cc], eax
mov ecx, dword [rsp + 0x50]
xchg dword [0x1400ad640], ecx
mov eax, dword [0x1400ad648]
mov dword [rsp + 0x68], ebx
mov dword [rsp + 0x58], ebx
mov dword [rsp + 0x28], ebx
xchg dword [rsp + 0x68], eax
mov ecx, dword [0x1400ad650]
xchg dword [rsp + 0x58], ecx
mov eax, dword [0x1400ad64c]
xchg dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x68]
mov ecx, dword [rsp + 0x58]
cmp eax, ecx
mov edx, ecx
cmovg edx, eax
cmp edx, dword [rsp + 0x28]
mov dword [rsp + 0x68], edx
jle 0x140012d96
xchg dword [0x1400ad64c], edx
mov ecx, dword [rsp + 0x58]
xchg dword [0x1400ad654], ecx
mov dword [rsp + 0x58], ebx
mov dword [rsp + 0x68], ebx
xchg dword [0x1400ad648], ebx
mov eax, dword [rsp + 0x58]
xchg dword [0x1400ad650], eax
add rsp, 0x38
pop rdi
pop rbx
ret
lea rcx, [0x1400acfc0]
mov qword [rsp + 0x30], rsi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rdi
call fcn.140004d20
mov rsi, rax
test rax, rax
je 0x140012e1d
cmp dword [rax + 0x16c], ebx
je 0x140012e1d
mov rcx, qword [0x1400ad4a0]
mov rdx, rdi
call qword [sym.imp.USER32.dll_KillTimer]
mov rcx, rdi
mov dword [rsi + 0x16c], ebx
call qword [0x1400abc70]
lea rcx, [0x1400acfc0]
mov rsi, qword [rsp + 0x30]
add rsp, 0x38
pop rdi
pop rbx
jmp qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [0x1400acfc0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x1400ad73c], ebx
jne 0x140012ee1
lea rcx, [0x1400acfc0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rcx, rdi
call fcn.1400045a0
lea rcx, [0x1400acfc0]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test rsi, rsi
jne 0x140012e7c
mov rcx, qword [0x1400ad4a0]
mov rdx, rdi
mov rsi, qword [rsp + 0x30]
add rsp, 0x38
pop rdi
pop rbx
jmp qword [sym.imp.USER32.dll_KillTimer]
mov eax, dword [rsi + 0x104]
shl eax, 0xa
mov dword [rsi + 0x108], eax
mov eax, dword [rsi + 0xd4]
test al, 4
je 0x140012ea2
mov r8, qword [rsi]
add eax, 0xfffffffc
mov edx, 0x401
jmp 0x140012eb2
test al, 8
je 0x140012ecb
mov r8, qword [rsi + 8]
add eax, 0xfffffff8
mov edx, 0x402
mov dword [rsi + 0xd4], eax
mov rcx, qword [0x1400ad4a0]
mov r9d, 2
call qword [sym.imp.USER32.dll_PostMessageA]
mov rcx, qword [0x1400ad4a0]
mov rdx, rdi
call qword [sym.imp.USER32.dll_KillTimer]
xchg dword [rsi + 0x100], ebx
mov rsi, qword [rsp + 0x30]
add rsp, 0x38
pop rdi
pop rbx
ret