Function at 0x14019a640
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x158
mov rbp, qword [rdx]
movsxd r14, r8d
mov rbx, rcx
mov rsi, rdx
mov qword [rsp + 0x1b8], r9
lea r15, [r14 + 2]
mov dword [rsp + 0x50], 0
mov r13, r14
mov qword [rsp + 0xa8], 0
shl r15, 4
mov r8, r15
test r9, r9
je 0x14019a695
mov eax, dword [r9]
mov dword [rsp + 0x50], eax
mov rax, qword [rbx]
lea r12, [rsp + 0xd0]
mov ecx, 0xf
shl r14, 4
mov qword [rsp + 0xb0], 0
mov rdi, r12
mov qword [rsp + 0xb8], 0
mov eax, dword [rax + 0x5c]
mov dword [rsp + 0x60], eax
xor eax, eax
rep stosq qword [rdi], rax
lea rax, [rbp + r14]
mov edi, dword [rax + 0x20]
mov dword [rsp + 0x88], edi
test edi, edi
jne 0x14019a860
mov r11d, dword [rbx + 0x3c]
test r11d, r11d
jne 0x14019a704
cmp dword [rbp + 0x18], 0x7cf
jle 0x14019b0a0
mov dword [rbx + 0x3c], 0xd
mov eax, dword [rbp + 0x1c]
sub eax, 1
cmp eax, r13d
je 0x14019b078
mov r10d, dword [rbx + 0x3c]
test r10d, r10d
je 0x14019a730
add rsp, 0x158
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
add r14, rbp
mov qword [rsp + 0x58], r8
mov esi, dword [r14 + 0x34]
mov r15, qword [r14 + 0x38]
call sym.sqlite3_initialize
test eax, eax
jne 0x14019af48
add esi, 1
mov rcx, r15
movsxd rsi, esi
lea rdx, [rsi*8]
sub rdx, rsi
shl rdx, 3
call sym.sqlite3Realloc
mov rdx, rax
test rax, rax
je 0x14019af48
movsxd rcx, dword [r14 + 0x34]
mov r8, qword [rsp + 0x58]
lea rax, [rcx*8]
sub rax, rcx
lea rax, [rdx + rax*8]
mov qword [rax], 0
mov qword [rax + 8], 0
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], 0
mov qword [rax + 0x20], 0
mov qword [rax + 0x28], 0
mov qword [rax + 0x30], 0
mov r9d, dword [rbx + 0x3c]
mov qword [r14 + 0x38], rdx
test r9d, r9d
jne 0x14019a71c
lea rax, [rbp + r8 + 0x10]
mov rdx, r12
lea r15, [rbp + r8]
mov rcx, rbx
mov esi, dword [rsp + 0x88]
mov qword [rsp + 0x58], rax
mov r8d, esi
call sym.fts5WriteInit
movsxd rcx, dword [r14 + 0x34]
lea rdx, [rcx*8]
mov rax, rcx
sub rdx, rcx
mov rcx, qword [r14 + 0x38]
add eax, 1
mov dword [r14 + 0x34], eax
lea rdi, [rcx + rdx*8]
mov dword [rdi + 4], 1
mov dword [rdi], esi
add dword [rbp + 0x18], 1
mov eax, dword [r14 + 0x24]
cmp qword [rbp + 0x10], 0
mov dword [rsp + 0x88], eax
je 0x14019a8ad
mov rdx, qword [r14 + 0x28]
movsxd rcx, eax
lea rax, [rcx*8]
movq xmm0, qword [rdx + 0x10]
sub rax, rcx
movhps xmm0, qword [rdx + rax*8 - 0x20]
movups xmmword [rdi + 0x10], xmm0
jmp 0x14019a8ad
movsxd rcx, dword [rax + 0x34]
mov rax, qword [rax + 0x38]
lea rdi, [rbp + r8 + 0x10]
lea r15, [rbp + r8]
mov qword [rsp + 0x58], rdi
lea rdx, [rcx*8]
sub rdx, rcx
mov rcx, rbx
lea rdi, [rax + rdx*8 - 0x38]
mov rdx, r12
mov r8d, dword [rdi]
call sym.fts5WriteInit
mov eax, dword [rdi + 8]
mov dword [rsp + 0x140], 0
add eax, 1
mov dword [rsp + 0xd8], eax
mov rax, qword [rsp + 0x58]
xor esi, esi
cmp dword [rax + 4], 1
jne 0x14019a8c7
xor esi, esi
lea eax, [r13 + 2]
cmp dword [rbp + 0x1c], eax
sete sil
mov dword [rsp + 0x30], r13d
xor r9d, r9d
mov rdx, rbp
mov rcx, rbx
lea rax, [rsp + 0xa8]
mov dword [rsp + 0x28], 0
mov r8d, 0x20
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x88]
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x38], eax
call sym.fts5MultiIterNew
mov r8d, dword [rbx + 0x3c]
test r8d, r8d
jne 0x14019ab38
mov r10, qword [rsp + 0xa8]
lea rax, [rsp + 0xb0]
mov dword [rsp + 0x68], 0
mov qword [rsp + 0x80], rax
lea rax, [rbx + 0x3c]
mov r13, r10
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0xe0]
cmp byte [r13 + 0x14], 0
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x8c], esi
jne 0x14019ab38
mov rax, qword [r13 + 0x58]
movzx esi, word [rax + 4]
movzx r14d, si
mov rax, r14
shl rax, 4
add rax, r14
lea rax, [r13 + rax*8]
mov r11d, dword [rax + 0xd0]
mov r9, qword [rax + 0xc8]
cmp dword [rsp + 0xb8], r11d
je 0x14019aef8
cmp qword [rsp + 0x1b8], 0
je 0x14019a9b4
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x11c], eax
jg 0x14019ab38
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x70]
mov r8d, r11d
mov qword [rsp + 0x98], r9
mov dword [rsp + 0x90], r11d
mov dword [rsp + 0xb8], 0
call sym.sqlite3Fts5BufferAppendBlob
mov dword [rsp + 0x68], 0
mov r9, qword [rsp + 0x98]
mov r11d, dword [rsp + 0x90]
mov rax, r14
shl rax, 4
add rax, r14
lea rax, [r13 + rax*8]
mov ecx, dword [rax + 0xe0]
test ecx, ecx
jne 0x14019aa31
mov edx, dword [rsp + 0x8c]
test edx, edx
jne 0x14019ab02
cmp byte [rax + 0xe4], 0
je 0x14019ab02
mov eax, dword [rbx + 0x3c]
mov ecx, dword [rsp + 0x68]
or ecx, eax
je 0x14019b180
test eax, eax
jne 0x14019aad8
mov rdx, qword [rsp + 0xa8]
mov rax, qword [rdx + 0x58]
movzx ecx, word [rax + 4]
mov rax, rcx
shl rax, 4
add rax, rcx
mov r9, qword [rdx + rax*8 + 0xd8]
mov rdx, qword [rbx]
mov eax, dword [rsp + 0xf8]
add eax, dword [rsp + 0xe8]
cmp eax, dword [rdx + 0x88]
jge 0x14019b21f
cmp byte [rsp + 0x119], 0
jne 0x14019b1e5
cmp word [rsp + 0x118], 0
mov qword [rsp + 0x90], r9
mov r8, r9
je 0x14019b19e
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x70]
call sym.sqlite3Fts5BufferAppendVarint
mov r9, qword [rsp + 0x90]
xor eax, eax
mov word [rsp + 0x118], ax
mov qword [rsp + 0x110], r9
mov rax, r14
shl rax, 4
add r14, rax
cmp dword [rsp + 0x60], 1
lea r14, [r13 + r14*8]
movzx eax, byte [r14 + 0xe4]
jne 0x14019b0c0
test al, al
jne 0x14019b1ab
mov rdx, qword [rsp + 0xa8]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call sym.fts5MultiIterNext
mov eax, dword [rbx + 0x3c]
test eax, eax
jne 0x14019ab38
mov r13, qword [rsp + 0xa8]
cmp byte [r13 + 0x14], 0
je 0x14019a961
nop word [rax + rax]
lea r8, [rdi + 8]
mov rdx, r12
mov rcx, rbx
call sym.fts5WriteFinish
mov esi, dword [rbx + 0x3c]
test esi, esi
jne 0x14019ac70
mov rax, qword [rsp + 0xa8]
cmp byte [rax + 0x14], 0
mov qword [rsp + 0x60], rax
jne 0x14019ac70
mov edx, dword [rax + 0x40]
lea r13, [rax + 0x60]
lea rax, [rsp + 0xa4]
mov qword [rsp + 0xc0], 0
mov qword [rsp + 0xc8], 0
lea r14, [rsp + 0xc0]
lea rbp, [rbx + 0x3c]
mov qword [rsp + 0x58], rax
test edx, edx
jle 0x14019b045
mov qword [rsp + 0x68], r15
mov r15d, esi
jmp 0x14019ac4f
mov edi, dword [rax]
mov esi, dword [r13 + 0x44]
mov rcx, rbx
mov dword [rsp + 0xa4], 0
movsxd r12, dword [r13 + 0x40]
shl rdi, 0x25
mov dword [rsp + 0x50], esi
add r12, rdi
mov rdx, r12
call sym.fts5DataRead
mov rsi, rax
test rax, rax
je 0x14019ac26
mov r8d, dword [rax + 8]
cmp r8d, 3
jle 0x14019b060
mov eax, dword [rax + 0xc]
cmp r8d, eax
jl 0x14019b060
cmp dword [rsp + 0x50], eax
jle 0x14019af58
mov dword [rbx + 0x3c], 0x10b
mov rcx, rsi
call sym.sqlite3_free
mov rax, qword [rsp + 0x60]
mov edx, dword [rax + 0x40]
add r15d, 1
cmp r15d, edx
jge 0x14019b040
mov r11d, dword [rbx + 0x3c]
add r13, 0x88
test r11d, r11d
jne 0x14019b040
mov rax, qword [r13]
test rax, rax
je 0x14019ac2e
cmp qword [r13 + 0x10], 0
jne 0x14019abc0
mov qword [rax + 4], 0
jmp 0x14019ac2e
mov eax, dword [rsp + 0x88]
test eax, eax
jle 0x14019ae1d
movsxd rax, dword [rsp + 0x88]
mov qword [rsp + 0x50], rbp
xor esi, esi
lea r12, [rax*8]
sub r12, rax
lea rax, [rbx + 0x60]
mov qword [rsp + 0x60], rax
shl r12, 3
jmp 0x14019acd1
cmp qword [rbx + 0x60], 0
je 0x14019ad34
mov r9d, dword [rbx + 0x3c]
test r9d, r9d
je 0x14019adb0
add rsi, 0x38
cmp r12, rsi
je 0x14019ae18
mov rbp, qword [r15 + 8]
mov rcx, rbx
add rbp, rsi
movsxd r14, dword [rbp]
mov rax, qword [rbp + 0x30]
add rax, qword [rdi + 0x30]
sub rax, qword [rbp + 0x28]
mov qword [rdi + 0x30], rax
lea eax, [r14 + 1]
mov rdx, r14
shl rax, 0x25
shl rdx, 0x25
lea r8, [rax - 1]
call sym.fts5DataDelete
mov r8d, dword [rbp + 0x20]
test r8d, r8d
je 0x14019acb0
sub r8d, 1
lea edx, [r14 + 0x10000]
mov rcx, rbx
shl rdx, 0x25
movsxd r8, r8d
add r8, rdx
call sym.fts5DataDelete
cmp qword [rbx + 0x60], 0
jne 0x14019acb7
mov rax, qword [rbx]
lea rcx, str.DELETE_FROM__q._q_idx_WHERE_segid_
mov rdx, qword [rax + 8]
mov r8, qword [rax + 0x10]
call sym.sqlite3_mprintf
mov r10d, dword [rbx + 0x3c]
mov r13, rax
test r10d, r10d
jne 0x14019ad99
test rax, rax
je 0x14019aee0
mov rcx, qword [rsp + 0x60]
mov rax, qword [rbx]
mov rdx, r13
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], 0
mov r9d, 0x85
mov r8d, 0xffffffff
mov qword [rsp + 0x28], rcx
mov rcx, qword [rax]
call sym.sqlite3LockAndPrepare
mov dword [rbx + 0x3c], eax
mov rcx, r13
call sym.sqlite3_free
mov r9d, dword [rbx + 0x3c]
test r9d, r9d
jne 0x14019acc4
nop
mov r13, qword [rbx + 0x60]
xor edx, edx
mov rcx, r13
call sym.vdbeUnbind
test eax, eax
jne 0x14019adf6
mov rcx, qword [r13 + 0x80]
test word [rcx + 0x14], 0x9000
jne 0x14019aed0
mov r8d, 4
mov qword [rcx], r14
mov word [rcx + 0x14], r8w
mov rax, qword [r13]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x14019adf6
call qword [0x1402ba750]
mov rcx, qword [rbx + 0x60]
add rsi, 0x38
call sym.sqlite3_step
mov rcx, qword [rbx + 0x60]
call sym.sqlite3_reset
mov dword [rbx + 0x3c], eax
cmp r12, rsi
jne 0x14019acd1
mov rbp, qword [rsp + 0x50]
mov r8d, dword [r15 + 4]
cmp r8d, dword [rsp + 0x88]
je 0x14019ae55
movsxd rdx, dword [rsp + 0x88]
mov rcx, qword [r15 + 8]
sub r8d, edx
lea rax, [rdx*8]
imul r8d, r8d, 0x38
sub rax, rdx
lea rdx, [rcx + rax*8]
movsxd r8, r8d
call sub.msvcrt.dll_memmove
mov eax, dword [rbp + 0x18]
mov esi, dword [rsp + 0x88]
mov edx, dword [rdi + 8]
sub eax, esi
mov dword [rbp + 0x18], eax
sub dword [r15 + 4], esi
mov dword [r15], 0
test edx, edx
jne 0x14019ae85
mov rdi, qword [rsp + 0x58]
sub eax, 1
sub dword [rdi + 4], 1
mov dword [rbp + 0x18], eax
mov rcx, qword [rsp + 0xa8]
test rcx, rcx
je 0x14019ae97
call sym.fts5MultiIterFree.part.0
mov rcx, qword [rsp + 0xb0]
call sym.sqlite3_free
cmp qword [rsp + 0x1b8], 0
je 0x14019a71c
mov rdi, qword [rsp + 0x1b8]
mov eax, dword [rsp + 0x11c]
sub dword [rdi], eax
jmp 0x14019a71c
mov rdx, r14
call sym.vdbeReleaseAndSetInt64
jmp 0x14019ade3
mov dword [rbx + 0x3c], 7
mov rcx, r13
call sym.sqlite3_free
jmp 0x14019ada1
test r11d, r11d
jle 0x14019a9fc
mov rdx, qword [rsp + 0xb0]
movsxd r8, r11d
mov rcx, r9
mov dword [rsp + 0x98], r11d
mov qword [rsp + 0x90], r9
call sub.msvcrt.dll_memcmp
mov r9, qword [rsp + 0x90]
mov r11d, dword [rsp + 0x98]
test eax, eax
je 0x14019a9fc
jmp 0x14019a998
mov dword [rbx + 0x3c], 7
jmp 0x14019a71c
mov dword [rsp + 0xc8], 0
cmp r8d, dword [rsp + 0xcc]
ja 0x14019b170
mov r9, qword [rsp + 0x58]
mov r8d, 4
mov rdx, r14
mov rcx, rbp
call sym.sqlite3Fts5BufferAppendBlob
movsxd r8, dword [r13 + 0x70]
mov rdx, r14
mov rcx, rbp
call sym.sqlite3Fts5BufferAppendVarint
mov r9, qword [r13 + 0x68]
mov r8d, dword [r13 + 0x70]
mov rdx, r14
mov rcx, rbp
call sym.sqlite3Fts5BufferAppendBlob
movsxd r9, dword [rsp + 0x50]
mov rdx, r14
mov rcx, rbp
mov r8d, dword [rsi + 0xc]
mov rax, r9
add r9, qword [rsi]
sub r8d, eax
call sym.sqlite3Fts5BufferAppendBlob
mov eax, dword [rbx + 0x3c]
test eax, eax
jne 0x14019afe5
movzx eax, word [rsp + 0xc8]
mov rdx, qword [rsp + 0xc0]
rol ax, 8
mov word [rdx + 2], ax
mov r8d, 4
mov rdx, r14
mov rcx, rbp
call sym.sqlite3Fts5BufferAppendVarint
mov eax, dword [r13 + 0x40]
cmp dword [r13 + 0xc], eax
je 0x14019b108
mov rdx, qword [r13]
mov r8, r12
mov rcx, rbx
mov dword [rdx + 4], eax
lea rdx, [rdi + 1]
call sym.fts5DataDelete
mov r9d, dword [rsp + 0xc8]
mov rdx, r12
mov rcx, rbx
mov r8, qword [rsp + 0xc0]
call sym.fts5DataWrite
jmp 0x14019ac1e
mov r15, qword [rsp + 0x68]
mov rcx, r14
call sym.sqlite3Fts5BufferFree
mov eax, dword [rsp + 0x88]
mov dword [r15], eax
jmp 0x14019ae85
mov dword [rbx + 0x3c], 0x10b
mov rcx, rsi
call sym.sqlite3_free
jmp 0x14019ac26
lea rcx, [rbx + 0x3c]
mov rdx, rsi
mov qword [rsp + 0x58], r8
call sym.fts5StructureAddLevel
mov rbp, qword [rsi]
mov r8, qword [rsp + 0x58]
jmp 0x14019a713
mov rcx, rbp
mov qword [rsp + 0x58], r8
call sym.fts5AllocateSegid.part.0
mov r8, qword [rsp + 0x58]
mov dword [rsp + 0x88], eax
jmp 0x14019a704
mov edx, dword [r14 + 0xe0]
mov rcx, qword [rsp + 0x70]
lea r8d, [rax + rdx*2]
mov rdx, qword [rsp + 0x78]
movsxd r8, r8d
call sym.sqlite3Fts5BufferAppendVarint
mov rax, rsi
mov r8, r12
mov rcx, rbx
shl rax, 4
lea r9, [sym.fts5MergeChunkCallback]
add rsi, rax
lea rdx, [r13 + rsi*8 + 0x60]
call sym.fts5ChunkIterate
jmp 0x14019ab02
mov ecx, dword [r13 + 0x4c]
mov edx, dword [rsi + 0xc]
cmp ecx, edx
jge 0x14019b004
mov r10d, dword [rsi + 8]
cmp dword [r13 + 0x48], r10d
jg 0x14019b004
movsxd r8, dword [rsp + 0xc8]
sub edx, ecx
mov rcx, rbp
movsxd rax, edx
mov rdx, r8
sub rdx, rax
lea r8, [rdx - 5]
mov rdx, r14
call sym.sqlite3Fts5BufferAppendVarint
movsxd r9, dword [r13 + 0x48]
mov r8d, dword [rsi + 8]
mov rdx, r14
mov rcx, rbp
mov rax, r9
add r9, qword [rsi]
sub r8d, eax
call sym.sqlite3Fts5BufferAppendBlob
mov eax, dword [r13 + 0x40]
jmp 0x14019b004
mov rdx, r14
mov rcx, rbp
call sym.sqlite3Fts5BufferSize
jmp 0x14019af71
mov r8d, r11d
mov rdx, r12
mov rcx, rbx
call sym.fts5WriteAppendTerm
mov dword [rsp + 0x68], 1
mov eax, dword [rbx + 0x3c]
jmp 0x14019aa40
sub r8, qword [rsp + 0x110]
jmp 0x14019aaaf
mov r13, qword [rsp + 0x78]
mov rsi, qword [rsp + 0x70]
xor r8d, r8d
mov rdx, r13
mov rcx, rsi
call sym.sqlite3Fts5BufferAppendVarint
mov eax, dword [r14 + 0xe0]
test eax, eax
jle 0x14019ab02
xor r8d, r8d
mov rdx, r13
mov rcx, rsi
call sym.sqlite3Fts5BufferAppendVarint
jmp 0x14019ab02
movzx eax, word [rsp + 0xe8]
mov rdx, qword [rsp + 0xe0]
mov r8, r9
mov rcx, rbx
mov qword [rsp + 0x90], r9
rol ax, 8
mov word [rdx], ax
mov rdx, r12
call sym.fts5WriteDlidxAppend
mov r9, qword [rsp + 0x90]
jmp 0x14019aa95
mov rdx, r12
mov rcx, rbx
mov qword [rsp + 0x90], r9
call sym.fts5WriteFlushLeaf
mov r9, qword [rsp + 0x90]
jmp 0x14019aa87