Function at 0x180002590
Capabilities:
Create thread
Resume thread

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
lea rbp, [rsp - 0x6c00]
mov eax, 0x6d00
call fcn.18002b690
sub rsp, rax
call fcn.180020f70
lea rcx, [rsp + 0x50]
call fcn.180025664
mov rcx, qword [0x180033c78]
xor r12d, r12d
mov edi, 0x20
test rcx, rcx
jne 0x18000261e
mov ecx, 0x690
call fcn.1800251fc
mov rcx, rax
test rax, rax
je 0x180002614
add rax, 8
mov edx, edi
nop
mov dword [rax - 8], 0xffffffff
mov qword [rax - 4], r12
add rax, 0x34
dec rdx
jne 0x1800025f0
mov qword [rcx + 0x680], r12
mov qword [rcx + 0x688], r12
jmp 0x180002617
mov rcx, r12
mov qword [0x180033c78], rcx
call fcn.18001e6d0
mov rbx, qword [0x180033c80]
test rbx, rbx
jne 0x180002678
mov ecx, 0x2038
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x18000266e
lea rcx, [rax + 0x2010]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor edx, edx
mov r8d, 0x2000
mov rcx, rbx
call fcn.1800252b0
mov qword [rbx + 0x2000], r12
mov qword [rbx + 0x2008], r12
jmp 0x180002671
mov rbx, r12
mov qword [0x180033c80], rbx
mov rcx, rbx
call fcn.18000c430
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x30], r12d
call fcn.18001d330
lea rcx, [rbp + 0x248]
call fcn.180003430
lea rcx, [rbp + 0x128]
xor edx, edx
mov r8d, 0x120
mov qword [rbp + 0xf0], r12
mov qword [rbp + 0xf8], r12
call fcn.1800252b0
mov rdx, qword [rsp + 0x48]
lea rcx, [rbp + 0x100]
mov r8d, SQLNumResultCols
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rbx, qword [0x180033c70]
mov qword [rbp + 0xf8], rax
test rbx, rbx
jne 0x18000273d
lea ecx, [rbx + 0x40]
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x180002733
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea r11, [rbx + 0x28]
mov qword [r11], r11
mov qword [r11 + 8], r11
mov dword [r11 + 0x10], r12d
jmp 0x180002736
mov rbx, r12
mov qword [0x180033c70], rbx
mov ecx, 0x38
call fcn.1800251fc
mov rsi, rax
test rax, rax
je 0x180002802
lea rax, [rbp + 0x6c20]
lea r8, [0x180024fd0]
mov r9, rsi
mov qword [rsp + 0x28], rax
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [rbp + 0xf0], rax
test rax, rax
jne 0x180002797
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
call sub.KERNEL32.dll_LocalFree
jmp 0x180002802
mov qword [rsi + 0x18], rbx
mov eax, dword [rbp + 0x6c20]
mov rcx, rbx
mov dword [rsi + 0x10], eax
lea rax, str.OlProc
mov qword [rsi + 0x30], rax
lea rax, [0x180007c60]
mov qword [rsi + 0x20], rax
lea rax, [rbp + 0xf0]
mov qword [rsi + 0x28], rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea r11, [rbx + 0x28]
mov qword [rsi], r11
mov rax, qword [r11 + 8]
mov rcx, rbx
mov qword [rsi + 8], rax
mov rax, qword [r11 + 8]
mov qword [rax], rsi
mov qword [r11 + 8], rsi
inc dword [r11 + 0x10]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0xf0]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rbx, qword [0x180033c58]
test rbx, rbx
jne 0x18000284f
lea ecx, [rbx + 0x30]
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x180002845
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
mov qword [rax + 0x18], r12
mov qword [rax + 0x28], r12
mov qword [rax + 0x20], r12
mov dword [rax + 0x10], r12d
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx], rax
jmp 0x180002848
mov rbx, r12
mov qword [0x180033c58], rbx
mov rcx, qword [rbx]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rbx, qword [0x180033c78]
test rbx, rbx
jne 0x1800028b5
mov ecx, 0x690
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x1800028ab
lea rcx, [rax + 8]
nop dword [rax]
mov dword [rcx - 8], 0xffffffff
mov qword [rcx - 4], r12
add rcx, 0x34
dec rdi
jne 0x180002880
mov qword [rax + 0x680], r12
mov qword [rax + 0x688], r12
mov qword [0x180033c78], rax
jmp 0x1800028b5
mov rbx, r12
mov qword [0x180033c78], rbx
mov rcx, qword [rbx + 0x688]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbx + 0x680]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x680]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x688]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp + 0xf0]
mov qword [rbx + 0x680], r12
mov qword [rbx + 0x688], r12
call fcn.180007b50
mov rbx, qword [0x180033c80]
test rbx, rbx
jne 0x18000295b
mov ecx, 0x2038
call fcn.1800251fc
mov rbx, rax
test rax, rax
je 0x180002951
lea rcx, [rax + 0x2010]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor edx, edx
mov r8d, 0x2000
mov rcx, rbx
call fcn.1800252b0
mov qword [rbx + 0x2000], r12
mov qword [rbx + 0x2008], r12
jmp 0x180002954
mov rbx, r12
mov qword [0x180033c80], rbx
mov rcx, qword [rbx + 0x2008]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbx + 0x2000]
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x2008]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x2000]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x2000], r12
mov qword [rbx + 0x2008], r12
mov rcx, qword [rbp + 0x6be8]
test rcx, rcx
je 0x1800029c6
call sub.KERNEL32.dll_LocalFree
mov qword [rbp + 0x6be8], r12
mov qword [rbp + 0x6bf8], r12
mov qword [rbp + 0x6bf0], r12
mov rcx, qword [rbp + 0x6bc8]
test rcx, rcx
je 0x1800029ec
call sub.KERNEL32.dll_LocalFree
mov qword [rbp + 0x6bc8], r12
mov qword [rbp + 0x6bd8], r12
mov qword [rbp + 0x6bd0], r12
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1800029fb
call sub.KERNEL32.dll_LocalFree
lea r11, [rsp + 0x6d00]
xor eax, eax
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret