Function at 0x14029ce60
Capabilities:
Create thread

Disassembly:
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
mov rax, qword [rcx + 8]
mov qword [rsp + 0x48], 0
mov r12, rcx
cmp qword [rcx], rax
jl 0x14029d020
mov rbx, qword [rcx + 0x48]
test rbx, rbx
je 0x14029d084
mov ecx, dword [rbx + 0x20]
test ecx, ecx
je 0x14029cf18
mov rdi, qword [rbx]
mov r14, qword [rdi]
test r14, r14
je 0x14029d120
cmp qword [r14 + 0x10], 0
je 0x14029d170
mov rsi, qword [r14]
nop word [rax + rax]
mov r8d, 1
mov edx, 0xffffffff
mov rcx, rsi
call qword [sym.WaitForSingleObjectEx]
mov r13d, eax
cmp eax, 0xc0
je 0x14029cec0
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test r13d, r13d
je 0x14029d170
mov rcx, r14
mov r13d, 1
call sym.sqlite3_free
mov dword [rdi + 8], 0
mov qword [rdi], 0
jmp 0x14029d087
mov rcx, rbx
call sym.vdbeIncrPopulate
movdqu xmm0, xmmword [rbx + 0x38]
mov r13d, eax
mov rax, qword [rbx + 0x10]
movups xmmword [rbx + 0x28], xmm0
cmp qword [rbx + 0x30], rax
je 0x14029d078
test r13d, r13d
jne 0x14029d087
mov eax, dword [rbx + 0x1c]
test eax, eax
jne 0x14029d084
mov rdx, qword [0x1402ba850]
mov rsi, qword [rbx + 0x10]
mov rdi, qword [rbx]
test rdx, rdx
je 0x14029cf76
mov ecx, 0xc9
mov r13d, 0x10a
call rdx
test eax, eax
jne 0x14029d060
mov r8, qword [r12 + 0x40]
test r8, r8
je 0x14029cf99
mov rcx, qword [r12 + 0x18]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
mov qword [r12 + 0x40], 0
mov rax, qword [rdi + 0x10]
mov r8, qword [rbx + 0x30]
mov qword [r12], rsi
mov rcx, qword [rbx + 0x28]
mov rdx, qword [rax + 0x20]
mov qword [r12 + 8], r8
mov qword [r12 + 0x18], rcx
movsxd rdx, dword [rdx + 0xb8]
cmp r8, rdx
jle 0x14029d260
movsxd rcx, dword [rax + 0xc]
mov rax, rsi
cqo
idiv rcx
mov rax, qword [r12 + 0x30]
mov rbx, rcx
test rax, rax
je 0x14029d2c4
test rdx, rdx
je 0x14029d020
mov r9, qword [r12]
mov r10, qword [r12 + 8]
sub ebx, edx
movsxd rcx, ebx
mov r8, rcx
mov r11d, r10d
add rcx, r9
sub r11d, r9d
cmp rcx, r10
mov rcx, qword [r12 + 0x18]
cmovg r8d, r11d
add rdx, rax
mov rax, qword [rcx]
call qword [rax + 0x10]
mov r13d, eax
test eax, eax
jne 0x14029d060
nop
lea rdx, [rsp + 0x48]
mov rcx, r12
call sym.vdbePmaReadVarint
mov r13d, eax
test eax, eax
jne 0x14029d060
mov rdx, qword [rsp + 0x48]
mov rax, qword [r12 + 0x40]
mov dword [r12 + 0x14], edx
test rax, rax
je 0x14029d158
add rax, qword [r12]
movsxd rdx, edx
add rdx, qword [r12]
mov qword [r12 + 0x28], rax
mov qword [r12], rdx
mov eax, r13d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
ret
mov dword [rbx + 0x1c], 1
test r13d, r13d
jne 0x14029d087
xor r13d, r13d
mov rcx, qword [r12 + 0x20]
call sym.sqlite3_free
mov rcx, qword [r12 + 0x30]
call sym.sqlite3_free
mov r8, qword [r12 + 0x40]
test r8, r8
je 0x14029d0b5
mov rcx, qword [r12 + 0x18]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
mov rcx, qword [r12 + 0x48]
call sym.vdbeIncrFree
mov qword [r12], 0
mov qword [r12 + 8], 0
mov qword [r12 + 0x10], 0
mov qword [r12 + 0x18], 0
mov qword [r12 + 0x20], 0
mov qword [r12 + 0x28], 0
mov qword [r12 + 0x30], 0
mov qword [r12 + 0x38], 0
mov qword [r12 + 0x40], 0
mov qword [r12 + 0x48], 0
jmp 0x14029d060
mov rdx, qword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
movdqu xmm1, xmmword [rbx + 0x38]
mov qword [rbx + 0x38], rdx
mov qword [rbx + 0x40], rax
movups xmmword [rbx + 0x28], xmm1
mov rax, qword [rbx + 0x10]
cmp qword [rbx + 0x30], rax
jne 0x14029d1b0
mov dword [rbx + 0x1c], 1
xor r13d, r13d
jmp 0x14029d087
lea r8, [r12 + 0x28]
mov rcx, r12
call sym.vdbePmaReadBlob.part.0
mov r13d, eax
jmp 0x14029d060
mov rsi, qword [r14 + 0x20]
mov rcx, r14
call sym.sqlite3_free
mov dword [rdi + 8], 0
mov qword [rdi], 0
mov r13d, esi
test esi, esi
jne 0x14029d087
movdqu xmm2, xmmword [rbx + 0x38]
mov rdx, qword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
mov qword [rbx + 0x38], rdx
mov qword [rbx + 0x40], rax
movups xmmword [rbx + 0x28], xmm2
jmp 0x14029d139
mov rdi, qword [rbx]
mov edx, dword [0x1402ba6c0]
mov qword [rdi], 0
test edx, edx
jne 0x14029d2a0
mov ecx, 0x28
call qword [0x1402ba6e0]
mov rsi, rax
test rsi, rsi
je 0x14029d345
cmp byte [0x1402ba6c4], 0
je 0x14029d2f8
mov rax, qword [0x1402ba850]
test rax, rax
je 0x14029d207
mov ecx, 0xc8
call rax
test eax, eax
jne 0x14029d2f8
lea rax, [sym.vdbeIncrPopulateThread]
mov qword [rsi + 0x18], rbx
mov r9, rsi
xor edx, edx
mov qword [rsi + 0x10], rax
lea rax, [rsi + 8]
lea r8, [sym.sqlite3ThreadProc]
xor ecx, ecx
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.msvcrt.dll__beginthreadex]
mov qword [rsi], rax
test rax, rax
je 0x14029d2f8
cmp qword [rsi + 0x10], 0
je 0x14029d31f
mov qword [rdi], rsi
jmp 0x14029cf43
mov r10, qword [rcx]
cmp dword [r10], 2
jle 0x14029cfc7
lea r9, [r12 + 0x40]
xor edx, edx
call qword [r10 + 0x88]
mov r13d, eax
test eax, eax
jne 0x14029d060
cmp qword [r12 + 0x40], 0
jne 0x14029d020
mov rax, qword [rdi + 0x10]
mov rsi, qword [r12]
jmp 0x14029cfc7
mov rcx, qword [0x1402ba340]
test rcx, rcx
je 0x14029d2b2
call qword [0x1402ba740]
mov ecx, 0x28
call sym.sqlite3Malloc.part.0
mov rsi, rax
jmp 0x14029d1d6
mov qword [rsp + 0x38], rdx
mov r13d, 7
call sym.sqlite3Malloc
mov dword [r12 + 0x38], ebx
mov rdx, qword [rsp + 0x38]
test rax, rax
mov qword [r12 + 0x30], rax
jne 0x14029cfe4
jmp 0x14029d060
mov qword [rsi], 0
mov qword [rsi + 8], 0
mov qword [rsi + 0x10], 0
mov qword [rsi + 0x18], 0
mov qword [rsi + 0x20], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov rcx, rbx
mov dword [rsi + 8], eax
call sym.vdbeIncrPopulate
mov rdx, qword [rbx]
cdqe
mov dword [rdx + 8], 1
mov qword [rsi + 0x20], rax
jmp 0x14029d252
mov r13d, 7
jmp 0x14029d087