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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
xor r15d, r15d
mov r12, rdx
mov rsi, rcx
mov r13d, r15d
test rdx, rdx
je 0x180027178
lea eax, [r15 + 2]
cmp word [rdx], ax
jne 0x180027178
mov rbx, qword [0x180037c90]
lea edi, [rax + 0x3e]
test rbx, rbx
jne 0x180026e0b
mov ecx, edi
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x180026e01
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea r11, [rbx + 0x28]
mov dword [r11 + 0x10], r15d
mov qword [r11], r11
mov qword [r11 + 8], r11
jmp 0x180026e04
mov rbx, r15
mov qword [0x180037c90], rbx
mov rcx, rbx
call fcn.180026ac8
mov r14, rax
mov rcx, qword [rax + 0x10]
mov qword [rbp - 0x10], r15
mov qword [rbp - 8], rcx
test rcx, rcx
je 0x180026e87
call qword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x180026e87
mov rbx, qword [0x180037c90]
test rbx, rbx
jne 0x180026e71
mov rcx, rdi
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x180026e67
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea r11, [rbx + 0x28]
mov dword [r11 + 0x10], r15d
mov qword [r11], r11
mov qword [r11 + 8], r11
jmp 0x180026e6a
mov rbx, r15
mov qword [0x180037c90], rbx
mov rdx, r14
mov rcx, rbx
call fcn.180026b50
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x18002717d
mov eax, 0xffffffff
lea rcx, [rsi + 0x4120]
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x20], rax
mov edi, r15d
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [rsi + 0x408c], 1
jne 0x180026ed9
xor eax, eax
lea rdx, [rbp - 0x30]
mov rcx, rsi
mov qword [rbp - 0x2e], rax
mov dword [rbp - 0x26], eax
mov word [rbp - 0x22], ax
movzx eax, word [r12]
mov word [rbp - 0x30], ax
call fcn.18002813c
mov edi, eax
test eax, eax
jne 0x1800270ad
cmp dword [rsi + 0x408c], 2
je 0x180026ef9
mov edi, 0x139f
lea rcx, [rsi + 0x4120]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180027100
lea rcx, [rsi + 0x19420]
mov edx, 0x30
call fcn.18002b1a0
mov r13, rax
test rax, rax
jne 0x180026f19
mov edi, 0x718
jmp 0x180026ee7
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r14
lea rax, [rbp - 0x20]
mov qword [r13 + 0x20], rax
xor eax, eax
mov qword [r13 + 0x28], r15
lea rcx, [rsi + 0x40bc]
mov rdx, r12
cmp word [rsi + 0x40cc], ax
je 0x180026f5a
lea r8d, [rax + 0x10]
call fcn.18002525c
mov r8d, SQLNumResultCols
lea rdx, [rsi + 0x40cc]
jmp 0x180026f6e
mov r15d, SQLNumResultCols
mov r8d, r15d
call fcn.18002525c
mov r8d, r15d
mov rdx, r12
lea rcx, [rsi + 0x40ac]
call fcn.18002525c
xor r15d, r15d
lea r12, [0x180037ca8]
cmp qword [0x180037ca8], r15
jne 0x180026fbc
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
movabs rax, 0x20c49ba5e353f7cf
imul qword [0x180037ca8]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [0x180037ca8], rdx
lea rcx, [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbp + 0x38]
xor edx, edx
div qword [0x180037ca8]
mov dword [rsi + 0x4114], eax
cmp qword [0x180037ca8], r15
jne 0x180027011
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
movabs rax, 0x20c49ba5e353f7cf
imul qword [0x180037ca8]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [0x180037ca8], rdx
lea rcx, [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbp + 0x38]
xor edx, edx
div qword [0x180037ca8]
mov dword [rsi + 0x4114], eax
cmp qword [0x180037ca8], r15
jne 0x180027066
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
movabs rax, 0x20c49ba5e353f7cf
imul qword [0x180037ca8]
sar rdx, 7
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov qword [0x180037ca8], rdx
lea rcx, [rbp + 0x38]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbp + 0x38]
xor edx, edx
div qword [0x180037ca8]
mov rcx, rsi
mov dword [rsi + 0x4114], eax
call fcn.18002aef8
mov rcx, rsi
call fcn.180028048
mov rcx, rsi
call fcn.180028048
mov rcx, rsi
call fcn.180028048
mov dword [rsi + 0x408c], 4
lea rcx, [rsi + 0x4120]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
jne 0x180027100
mov edx, dword [rsi + 0x4110]
mov rcx, qword [r14 + 0x10]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1800270e0
cmp eax, 0x102
jne 0x180027129
mov edi, 0x274c
jmp 0x180027100
mov eax, 0xffffffff
cmp qword [rbp - 0x20], rax
je 0x1800270f7
mov edi, dword [rbp - 0x10]
test edi, edi
jne 0x180027100
mov edi, r15d
jmp 0x180027129
mov edi, 0x3e4
test edi, edi
je 0x180027129
lea rcx, [rsi + 0x4120]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [rsi + 0x19420]
mov rdx, r13
call fcn.18002b2b8
lea rcx, [rsi + 0x4120]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [0x180037c90]
test rbx, rbx
jne 0x180027169
lea ecx, [rbx + 0x40]
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x18002715f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea r11, [rbx + 0x28]
mov dword [r11 + 0x10], r15d
mov qword [r11], r11
mov qword [r11 + 8], r11
jmp 0x180027162
mov rbx, r15
mov qword [0x180037c90], rbx
mov rdx, r14
mov rcx, rbx
call fcn.180026b50
mov eax, edi
jmp 0x18002717d
mov eax, 0x57
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret