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

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x40
xor r13d, r13d
mov ebp, r8d
mov r12, rdx
mov dword [rax + 0x20], r13d
mov dword [rax + 8], r13d
mov eax, dword [rcx + 0x100]
xchg dword [rsp + 0x70], eax
mov edi, dword [rcx + 0x54]
mov rbx, rcx
mov esi, r13d
test edi, edi
jle 0x14001373b
mov eax, dword [rcx + 0x58]
test eax, eax
js 0x14001373b
cmp edi, eax
jle 0x14001373b
sub edi, eax
mov r14d, 0x400
test edi, edi
jle 0x1400133b7
call fcn.140013210
test eax, eax
je 0x1400134e8
mov rcx, rbx
call fcn.140004690
test eax, eax
je 0x14001346c
movsxd rax, dword [rbx + 0x58]
cmp eax, dword [rbx + 0x50]
jg 0x1400133b7
mov ecx, dword [rbx + 0x54]
sub ecx, eax
test ecx, ecx
jle 0x1400133b7
mov rdx, qword [rbx + 0x48]
test rdx, rdx
je 0x1400133b7
add rax, rdx
cmp ecx, r14d
lea rdx, [rbx + 0xb8]
cmovg ecx, r14d
mov qword [rsp + 0x30], r13
lea r9, [rsp + 0x88]
mov dword [rdx], ecx
mov r8d, 1
mov rcx, r12
mov qword [rsp + 0x28], r13
mov qword [rbx + 0xc0], rax
mov dword [rsp + 0x88], r13d
mov dword [rsp + 0x20], r13d
call qword [0x1400abcf8]
cmp eax, 0xffffffff
je 0x1400133ee
mov eax, dword [rsp + 0x88]
test eax, eax
je 0x1400133af
add dword [rbx + 0x58], eax
sub edi, eax
add esi, eax
sub dword [rbx + 0x108], eax
lock add dword [0x1400ad658], 0xffffffff
test edi, edi
jne 0x140013300
mov eax, esi
lock xadd dword [0x1400ad648], eax
mov ecx, esi
lock xadd dword [0x1400ad650], ecx
lea rcx, [0x1400acfc0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, esi
test ebp, ebp
je 0x140013584
add qword [rbx + 0x178], rax
jmp 0x14001358b
call qword [0x1400acda0]
cmp eax, 0x2733
je 0x140013419
mov eax, 5
test ebp, ebp
jne 0x140013409
mov eax, 4
xchg dword [rbx + 0x188], eax
mov rcx, qword [rbx]
call fcn.14000a360
jmp 0x140013423
mov edx, ebp
mov rcx, rbx
call fcn.14000dfc0
lea rcx, [0x1400acfc0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, esi
test ebp, ebp
je 0x140013451
add qword [rbx + 0x178], rax
lea rcx, [0x1400acfc0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x1400137e0
add qword [rbx + 0x180], rax
lea rcx, [0x1400acfc0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x1400137e0
cmp dword [rsp + 0x70], r13d
jne 0x1400137db
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x3e8
sub eax, dword [rbx + 0x10c]
cmp eax, ecx
jae 0x1400137db
sub ecx, eax
mov edx, ecx
mov rcx, rbx
call fcn.14000a340
test eax, eax
je 0x1400134ab
mov eax, 1
xchg dword [rbx + 0x100], eax
test ebp, ebp
je 0x1400134cb
mov eax, dword [rbx + 0xd4]
test al, 4
jne 0x1400137db
add eax, 4
mov dword [rbx + 0xd4], eax
jmp 0x1400137db
mov ecx, dword [rbx + 0xd4]
test cl, 8
jne 0x1400137db
add ecx, 8
mov dword [rbx + 0xd4], ecx
jmp 0x1400137db
cmp dword [rsp + 0x70], r13d
jne 0x1400137db
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x3e8
mov r11d, eax
sub r11d, dword [0x1400ad664]
cmp r11d, ecx
jbe 0x140013521
mov eax, 0x10624dd3
mul r11d
shr edx, 6
imul edx, edx, 0xfffffc18
add r11d, edx
mov edx, ecx
sub edx, r11d
jne 0x14001352f
mov edx, 0xa
jmp 0x140013537
cmp edx, ecx
ja 0x1400137db
mov rcx, rbx
call fcn.14000a340
test eax, eax
je 0x14001354e
mov eax, 1
xchg dword [rbx + 0x100], eax
mov eax, dword [rbx + 0xd4]
test ebp, ebp
je 0x14001356e
test al, 4
jne 0x1400137db
add eax, 4
mov dword [rbx + 0xd4], eax
jmp 0x1400137db
test al, 8
jne 0x1400137db
add eax, 8
mov dword [rbx + 0xd4], eax
jmp 0x1400137db
add qword [rbx + 0x180], rax
lea rcx, [0x1400acfc0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r11d, dword [rbx + 0x54]
cmp dword [rbx + 0x58], r11d
jne 0x1400137db
cmp dword [rbx + 0x110], r13d
je 0x140013652
cmp dword [rbx + 0x60], 4
jne 0x140013652
inc dword [rbx + 0x114]
cmp dword [rbx + 0x114], 8
movsxd r8, dword [rbx + 0x50]
mov rcx, qword [rbx + 0x48]
mov dword [rbx + 0x58], r13d
jae 0x1400135fd
mov edx, 0x41
call fcn.14005fe50
mov r11d, dword [rbx + 0x50]
mov dword [rbx + 0x54], r11d
mov r8, qword [rbx]
mov r9d, 2
mov edx, 0x401
jmp 0x1400137ce
xor edx, edx
call fcn.14005fe50
movsxd r8, dword [rbx + 0x50]
mov rcx, qword [rbx + 0x48]
lea rdx, [0x140077b58]
call fcn.140060000
mov rdx, qword [rbx + 0x48]
mov rcx, qword [rbx]
mov r8d, SQLNumResultCols
mov dword [rbx + 0x54], SQLNumResultCols
call fcn.140004dc0
cmp eax, dword [rbx + 0x54]
jne 0x1400135ea
movsxd r8, dword [rbx + 0x50]
mov rcx, qword [rbx + 0x48]
xor edx, edx
mov dword [rbx + 0x58], r13d
mov dword [rbx + 0x54], r13d
call fcn.14005fe50
jmp 0x1400137db
movsxd r8, dword [rbx + 0x50]
mov rcx, qword [rbx + 0x48]
xor edx, edx
mov dword [rbx + 0x58], r13d
mov dword [rbx + 0x54], r13d
call fcn.14005fe50
mov ecx, dword [rbx + 0xd4]
test ecx, ecx
je 0x140013700
mov eax, ecx
and eax, 1
je 0x1400136a9
test cl, 2
je 0x1400136a9
mov eax, dword [rbx + 0x174]
mov r9d, 1
cmp dword [rbx + 0x170], eax
jl 0x1400136a4
mov r8, qword [rbx]
lea eax, [rcx - 1]
mov edx, 0x401
jmp 0x1400136ed
lea eax, [rcx - 2]
jmp 0x1400136e4
test eax, eax
je 0x1400136d1
mov r8, qword [rbx]
lea eax, [rcx - 1]
mov r9d, 1
mov dword [rbx + 0xd4], eax
mov rcx, qword [0x1400ad4a0]
mov edx, 0x401
call qword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [rbx + 0xd4]
test al, 2
je 0x140013700
add eax, 0xfffffffe
mov r9d, 1
mov r8, qword [rbx + 8]
mov edx, 0x402
mov dword [rbx + 0xd4], eax
mov rcx, qword [0x1400ad4a0]
call qword [sym.imp.USER32.dll_PostMessageA]
cmp dword [rbx + 0xd0], r13d
je 0x1400137db
mov edx, 1
test ebp, ebp
je 0x140013736
mov rcx, qword [rbx + 8]
call fcn.1400046f0
test eax, eax
jne 0x1400137db
mov rcx, qword [rbx]
call fcn.14000a360
xor eax, eax
jmp 0x1400137e0
mov rcx, qword [rbx]
jmp 0x14001371a
cmp dword [rcx + 0x58], edi
jne 0x1400137db
mov ecx, dword [rcx + 0xd4]
test ecx, ecx
je 0x1400137db
mov eax, ecx
and eax, 1
je 0x140013784
test cl, 2
je 0x140013784
mov eax, dword [rbx + 0x174]
mov r9d, 1
cmp dword [rbx + 0x170], eax
jl 0x14001377f
mov r8, qword [rbx]
lea eax, [rcx - 1]
mov edx, 0x401
jmp 0x1400137c8
lea eax, [rcx - 2]
jmp 0x1400137bf
test eax, eax
je 0x1400137ac
mov r8, qword [rbx]
lea eax, [rcx - 1]
mov r9d, 1
mov dword [rbx + 0xd4], eax
mov rcx, qword [0x1400ad4a0]
mov edx, 0x401
call qword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [rbx + 0xd4]
test al, 2
je 0x1400137db
add eax, 0xfffffffe
mov r9d, 1
mov r8, qword [rbx + 8]
mov edx, 0x402
mov dword [rbx + 0xd4], eax
mov rcx, qword [0x1400ad4a0]
call qword [sym.imp.USER32.dll_PostMessageA]
mov eax, 1
mov rbx, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x80]
add rsp, 0x40
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret