Function at 0x140297520
Capabilities:
Create thread

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
movaps xmmword [rsp + 0x50], xmm6
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
mov qword [rsp + 0x48], 0
mov rbx, rcx
jl 0x1402977f8
mov rsi, qword [rcx + 0x48]
test rsi, rsi
je 0x14029761c
mov ecx, dword [rsi + 0x20]
test ecx, ecx
je 0x140297820
mov r13, qword [rsi]
mov rbp, qword [r13]
test rbp, rbp
je 0x1402975f2
cmp qword [rbp + 0x10], 0
je 0x1402975d0
mov r12, qword [rbp]
nop dword [rax]
mov r8d, 1
mov edx, 0xffffffff
mov rcx, r12
call qword [sym.WaitForSingleObjectEx]
cmp eax, 0xc0
mov edi, eax
je 0x140297580
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x1402975d0
mov rcx, rbp
mov ebp, 1
call sym.sqlite3_free
mov dword [r13 + 8], 0
mov qword [r13], 0
jmp 0x14029761e
mov rdi, qword [rbp + 0x20]
mov rcx, rbp
call sym.sqlite3_free
mov dword [r13 + 8], 0
mov qword [r13], 0
test edi, edi
mov ebp, edi
jne 0x14029761e
mov rax, qword [rsi + 0x30]
movdqu xmm0, xmmword [rsi + 0x38]
mov rdx, qword [rsi + 0x28]
movups xmmword [rsi + 0x28], xmm0
mov qword [rsi + 0x40], rax
mov rax, qword [rsi + 0x10]
cmp qword [rsi + 0x30], rax
mov qword [rsi + 0x38], rdx
jne 0x140297668
mov dword [rsi + 0x1c], 1
xor ebp, ebp
mov rcx, qword [rbx + 0x20]
call sym.sqlite3_free
mov rcx, qword [rbx + 0x30]
call sym.sqlite3_free
mov r8, qword [rbx + 0x40]
test r8, r8
je 0x140297648
mov rcx, qword [rbx + 0x18]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
mov rcx, qword [rbx + 0x48]
mov rdi, rbx
call sym.vdbeIncrFree
mov ecx, 0xa
xor eax, eax
rep stosq qword [rdi], rax
jmp 0x14029780b
mov edx, dword [0x1402b90a0]
mov rbp, qword [rsi]
test edx, edx
mov qword [rbp], 0
je 0x140297960
mov rcx, qword [0x1402b8d40]
test rcx, rcx
je 0x140297693
call qword [0x1402b9120]
mov ecx, 0x28
call sym.sqlite3Malloc.part.0
mov rdi, rax
test rdi, rdi
je 0x140297988
cmp byte [0x1402b90a4], 0
je 0x140297910
mov rax, qword [0x1402b9230]
test rax, rax
je 0x1402976d1
mov ecx, 0xc8
call rax
test eax, eax
jne 0x140297910
lea rax, [sym.vdbeIncrPopulateThread]
mov qword [rdi + 0x18], rsi
xor edx, edx
xor ecx, ecx
mov qword [rdi + 0x10], rax
lea rax, [rdi + 8]
mov r9, rdi
mov qword [rsp + 0x28], rax
lea r8, [sym.sqlite3ThreadProc]
mov dword [rsp + 0x20], 0
call qword [sym.imp.msvcrt.dll__beginthreadex]
test rax, rax
mov qword [rdi], rax
je 0x140297910
cmp qword [rdi + 0x10], 0
je 0x140297937
mov qword [rbp], rdi
mov eax, dword [rsi + 0x1c]
test eax, eax
jne 0x14029761c
mov rax, qword [0x1402b9230]
mov rdi, qword [rsi]
movq xmm6, qword [rsi + 0x10]
test rax, rax
je 0x14029774e
mov ecx, 0xc9
call rax
test eax, eax
jne 0x140297978
mov r8, qword [rbx + 0x40]
test r8, r8
je 0x14029776e
mov rcx, qword [rbx + 0x18]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
mov qword [rbx + 0x40], 0
mov rax, qword [rdi + 0x10]
mov r8, qword [rsi + 0x30]
mov rcx, qword [rsi + 0x28]
mov rdx, qword [rax + 0x20]
movq xmm2, r8
punpcklqdq xmm6, xmm2
mov qword [rbx + 0x18], rcx
movups xmmword [rbx], xmm6
movsxd rdx, dword [rdx + 0xb8]
cmp r8, rdx
jle 0x140297880
mov r9, qword [rbx]
movsxd rcx, dword [rax + 0xc]
mov rax, r9
cqo
mov rsi, rcx
idiv rcx
mov rax, qword [rbx + 0x30]
test rax, rax
je 0x1402978d4
test rdx, rdx
je 0x1402977f8
mov r10, qword [rbx + 8]
sub esi, edx
movsxd rcx, esi
mov r8, rcx
add rcx, r9
mov r11d, r10d
sub r11d, r9d
cmp rcx, r10
mov rcx, qword [rbx + 0x18]
cmovg r8d, r11d
add rdx, rax
mov rax, qword [rcx]
call qword [rax + 0x10]
test eax, eax
mov ebp, eax
jne 0x14029780b
nop dword [rax]
lea rdx, [rsp + 0x48]
mov rcx, rbx
call sym.vdbePmaReadVarint.constprop.0
test eax, eax
mov ebp, eax
je 0x140297850
movaps xmm6, xmmword [rsp + 0x50]
mov eax, ebp
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rcx, rsi
call sym.vdbeIncrPopulate
movdqu xmm1, xmmword [rsi + 0x38]
mov ebp, eax
mov rax, qword [rsi + 0x10]
movups xmmword [rsi + 0x28], xmm1
cmp qword [rsi + 0x30], rax
je 0x1402978c0
test ebp, ebp
jne 0x14029761e
jmp 0x140297720
mov rax, qword [rsp + 0x48]
lea r8, [rbx + 0x28]
mov rcx, rbx
mov dword [rbx + 0x14], eax
movaps xmm6, xmmword [rsp + 0x50]
mov edx, eax
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sym.vdbePmaReadBlob
mov r10, qword [rcx]
cmp dword [r10], 2
jle 0x14029779e
lea r9, [rbx + 0x40]
xor edx, edx
call qword [r10 + 0x88]
test eax, eax
mov ebp, eax
jne 0x14029780b
cmp qword [rbx + 0x40], 0
jne 0x1402977f8
mov rax, qword [rdi + 0x10]
jmp 0x14029779e
test ebp, ebp
mov dword [rsi + 0x1c], 1
jne 0x14029761e
jmp 0x14029761c
mov qword [rsp + 0x38], rdx
mov ebp, 7
call sym.sqlite3Malloc
mov rdx, qword [rsp + 0x38]
mov dword [rbx + 0x38], esi
test rax, rax
mov qword [rbx + 0x30], rax
je 0x14029780b
test rdx, rdx
je 0x1402977f8
mov r9, qword [rbx]
jmp 0x1402977c2
mov qword [rdi], 0
mov qword [rdi + 8], 0
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], 0
mov qword [rdi + 0x20], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, rsi
mov dword [rdi + 8], eax
call sym.vdbeIncrPopulate
mov rdx, qword [rsi]
cdqe
mov dword [rdx + 8], 1
mov qword [rdi + 0x20], rax
jmp 0x14029771c
mov ecx, 0x28
call qword [0x1402b90c0]
mov rdi, rax
jmp 0x1402976a0
mov ebp, 0x10a
jmp 0x14029780b
mov ebp, 7
jmp 0x14029761e