Function at 0x1401974c0
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, 0x128
mov rax, qword [rcx + 0x18]
mov r15, rcx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x84], 0
call sym.fts5StructureRead
mov r12, qword [r15 + 0x90]
mov qword [rsp + 0x88], rax
mov r8, rax
test r12, r12
je 0x140197524
mov eax, dword [r12]
sub eax, 1
mov dword [r12], eax
test eax, eax
jle 0x1401976a0
mov qword [r15 + 0x90], 0
mov rdi, qword [rsp + 0x38]
mov eax, dword [r15 + 0x3c]
mov ebx, dword [rdi + 0x10]
test ebx, ebx
jne 0x1401975f0
mov edx, dword [rsp + 0x84]
mov rcx, qword [r15]
test eax, eax
jne 0x1401975fb
mov r9d, dword [rcx + 0x8c]
test r9d, r9d
jle 0x140197710
test r8, r8
je 0x1401975d0
mov r10, qword [r8 + 8]
add edx, dword [r15 + 0x34]
movsxd r11, dword [r15 + 0x10]
movsxd rdx, edx
lea rax, [rdx + r10]
xor edx, edx
mov qword [r8 + 8], rax
div r11
xor edx, edx
mov rcx, rax
mov rax, r10
div r11
lea rdx, [rsp + 0x88]
sub ecx, eax
imul ecx, r11d
imul ecx, dword [r8 + 0x1c]
mov r8d, ecx
mov rcx, r15
call sym.fts5IndexMerge
mov r8, qword [rsp + 0x88]
mov rdx, qword [r15]
mov eax, dword [r15 + 0x3c]
mov esi, dword [rdx + 0x90]
mov qword [rsp + 0xa0], r8
test r8, r8
jne 0x14019760e
test eax, eax
jne 0x14019768b
nop
mov rdx, r8
mov rcx, r15
call sym.fts5StructureWrite.part.0
mov r8, qword [rsp + 0x88]
jmp 0x140197670
test eax, eax
je 0x1401976e8
mov rcx, qword [r15]
mov esi, dword [rcx + 0x90]
mov qword [rsp + 0xa0], r8
test r8, r8
je 0x14019768b
mov r9d, dword [r8 + 0x1c]
test r9d, r9d
jle 0x140197780
test eax, eax
jne 0x140197668
xor ebx, ebx
lea rdi, [rsp + 0xa0]
movsxd rax, ebx
shl rax, 4
cmp esi, dword [rax + r8 + 0x24]
jg 0x140197770
nop dword [rax + rax]
mov r8d, ebx
mov rcx, r15
xor r9d, r9d
mov rdx, rdi
call sym.fts5IndexMergeLevel
mov ecx, dword [r15 + 0x3c]
add ebx, 1
mov r8, qword [rsp + 0xa0]
test ecx, ecx
je 0x140197740
mov qword [rsp + 0x88], r8
test r8, r8
je 0x14019768b
mov eax, dword [r8]
sub eax, 1
mov dword [r8], eax
test eax, eax
jg 0x14019768b
mov rcx, r8
call sym.fts5StructureRelease.part.0
nop
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov esi, dword [r12 + 0x1c]
xor ebx, ebx
test esi, esi
jle 0x1401976cc
nop dword [rax + rax]
mov rax, rbx
add rbx, 1
shl rax, 4
mov rcx, qword [r12 + rax + 0x28]
call sym.sqlite3_free
cmp dword [r12 + 0x1c], ebx
jg 0x1401976b0
mov rcx, r12
call sym.sqlite3_free
mov r8, qword [rsp + 0x88]
jmp 0x140197519
cmp dword [r8 + 0x18], 0x7cf
jle 0x140197790
mov dword [r15 + 0x3c], 0xd
mov eax, 0xd
jmp 0x1401975f8
mov esi, dword [rcx + 0x90]
mov qword [rsp + 0xa0], r8
test r8, r8
je 0x1401975d0
mov eax, dword [r8 + 0x1c]
test eax, eax
jg 0x14019761f
jmp 0x1401975d0
mov edx, ebx
mov rcx, r15
call sym.fts5StructurePromote.part.0
mov edx, dword [r15 + 0x3c]
mov r8, qword [rsp + 0xa0]
test edx, edx
jne 0x140197668
movsxd rax, ebx
shl rax, 4
cmp esi, dword [rax + r8 + 0x24]
jle 0x140197640
mov qword [rsp + 0x88], r8
jmp 0x1401975d0
test eax, eax
jne 0x140197675
jmp 0x1401975d0
mov rcx, r8
call sym.fts5AllocateSegid.part.0
mov dword [rsp + 0x7c], eax
test eax, eax
jne 0x1401977b8
mov edx, dword [rsp + 0x84]
mov eax, dword [r15 + 0x3c]
mov r8, qword [rsp + 0x88]
jmp 0x14019753f
mov r8d, eax
mov rax, qword [r15]
mov rcx, r15
mov esi, dword [rax + 0x5c]
mov r13d, dword [rax + 0x88]
mov eax, dword [rax + 0xb0]
mov dword [rsp + 0x54], esi
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0xa0]
mov rdx, rax
mov qword [rsp + 0x48], rax
call sym.fts5WriteInit
mov eax, dword [r15 + 0x3c]
test eax, eax
je 0x140197980
mov rdx, qword [rsp + 0x48]
lea r8, [rsp + 0x84]
mov rcx, r15
call sym.fts5WriteFinish
mov edx, dword [rsp + 0x84]
test edx, edx
jle 0x1401977a7
mov r8, qword [rsp + 0x88]
mov r11d, dword [r8 + 0x1c]
test r11d, r11d
je 0x140198102
mov eax, dword [r15 + 0x3c]
mov edx, dword [rsp + 0x84]
test eax, eax
jne 0x14019753f
mov ebx, dword [r8 + 0x24]
mov r12, qword [r8 + 0x28]
mov qword [rsp + 0x28], r8
call sym.sqlite3_initialize
test eax, eax
jne 0x140198128
lea eax, [rbx + 1]
mov r8, qword [rsp + 0x28]
cdqe
lea rdx, [rax*8]
sub rdx, rax
shl rdx, 3
test r12, r12
je 0x140198145
test rdx, rdx
je 0x140198120
mov qword [rsp + 0x28], r8
cmp rdx, 0x7ffffeff
ja 0x140198128
mov rcx, r12
call sym.sqlite3Realloc.part.0
mov r8, qword [rsp + 0x28]
test rax, rax
je 0x140198128
movsxd rcx, dword [r8 + 0x24]
lea rdx, [rcx*8]
sub rdx, rcx
lea rdx, [rax + rdx*8]
mov qword [rdx], 0
mov qword [rdx + 8], 0
mov qword [rdx + 0x10], 0
mov qword [rdx + 0x18], 0
mov qword [rdx + 0x20], 0
mov qword [rdx + 0x28], 0
mov qword [rdx + 0x30], 0
mov edx, dword [rsp + 0x84]
mov qword [r8 + 0x28], rax
mov eax, dword [r15 + 0x3c]
mov r8, qword [rsp + 0x88]
test eax, eax
jne 0x14019753f
movsxd rcx, dword [r8 + 0x24]
mov r10, qword [r8 + 0x28]
mov esi, dword [rsp + 0x7c]
lea eax, [rcx + 1]
mov dword [r8 + 0x24], eax
lea rax, [rcx*8]
sub rax, rcx
lea rax, [r10 + rax*8]
mov dword [rax + 8], edx
mov rdx, qword [r8 + 0x10]
mov dword [rax], esi
mov dword [rax + 4], 1
test rdx, rdx
je 0x14019796c
movsxd rcx, dword [r15 + 0x38]
movq xmm0, rdx
add rdx, 1
punpcklqdq xmm0, xmm0
mov qword [rax + 0x30], rcx
movups xmmword [rax + 0x10], xmm0
mov qword [r8 + 0x10], rdx
add dword [r8 + 0x18], 1
xor edx, edx
mov rcx, r15
call sym.fts5StructurePromote.part.0
jmp 0x1401977a0
mov rax, qword [rsp + 0x38]
xor r8d, r8d
xor edx, edx
mov r14, r15
lea r9, [rax + 0x18]
mov rcx, rax
call sym.fts5HashEntrySort
mov dword [r15 + 0x3c], eax
mov r15d, r13d
test eax, eax
jne 0x1401980fa
mov rax, qword [rsp + 0x38]
mov rbx, qword [rax + 0x18]
test rbx, rbx
je 0x1401980fa
lea rdi, [rbx + 0x30]
mov rcx, rdi
mov qword [rsp + 0x60], rdi
call sym.strlen
mov rcx, qword [rsp + 0x38]
xor r8d, r8d
mov rdx, rbx
mov rsi, rax
call sym.fts5HashAddPoslistSize
movsxd rax, esi
mov rcx, rdi
lea rax, [rdi + rax + 1]
mov qword [rsp + 0x28], rax
mov eax, dword [rbx + 0x18]
sub eax, 0x31
sub eax, esi
mov dword [rsp + 0x40], eax
call sym.strlen
mov r11d, dword [rsp + 0x44]
mov dword [rsp + 0x6c], eax
test r11d, r11d
je 0x140197f30
mov r9d, dword [rsp + 0x40]
mov eax, dword [r14 + 0x3c]
test r9d, r9d
jle 0x140197f94
test eax, eax
jne 0x1401979a0
mov dword [rsp + 0x50], 0
lea rax, [rsp + 0x90]
xor esi, esi
xor ebx, ebx
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x58], rax
jmp 0x140197b60
mov word [rcx], ax
movsxd rcx, dword [rsp + 0xb8]
add rcx, qword [rsp + 0xb0]
cmp r12, 0x7f
jbe 0x140197ed0
cmp r12, 0x3fff
jbe 0x140197fe0
mov rdx, r12
call sym.putVarint64
mov rdx, qword [rsp + 0x48]
mov r8, r12
mov rcx, r14
add dword [rsp + 0xb8], eax
mov byte [rsp + 0xe9], 0
call sym.fts5WriteDlidxAppend
mov ebp, dword [r14 + 0x3c]
test ebp, ebp
jne 0x1401980e8
cmp dword [rsp + 0x54], 1
jne 0x140197c30
mov edi, dword [rsp + 0x40]
cmp esi, edi
jge 0x140197b30
mov rbx, qword [rsp + 0x28]
movsxd rax, esi
cmp byte [rbx + rax], 0
jne 0x140197b30
movsxd rax, dword [rsp + 0xb8]
lea edx, [rax + 1]
mov dword [rsp + 0xb8], edx
mov rdx, qword [rsp + 0xb0]
mov byte [rdx + rax], 0
lea eax, [rsi + 1]
cmp eax, edi
jge 0x140198080
movsxd rdx, eax
cmp byte [rbx + rdx], 0
jne 0x140198080
movsxd rax, dword [rsp + 0xb8]
add esi, 2
lea edx, [rax + 1]
mov dword [rsp + 0xb8], edx
mov rdx, qword [rsp + 0xb0]
mov byte [rdx + rax], 0
nop dword [rax]
mov eax, dword [rsp + 0xc8]
add eax, dword [rsp + 0xb8]
cmp eax, r15d
jge 0x140197ef0
mov eax, dword [r14 + 0x3c]
mov rbx, r12
cmp dword [rsp + 0x40], esi
jle 0x140197f94
test eax, eax
jne 0x1401979a0
mov rdx, qword [rsp + 0x58]
movsxd rcx, esi
add rcx, qword [rsp + 0x28]
mov qword [rsp + 0x90], 0
call sym.sqlite3Fts5GetVarint
mov r8d, dword [rsp + 0x44]
mov r12, qword [rsp + 0x30]
movzx eax, al
add r12, qword [rsp + 0x90]
mov qword [rsp + 0x30], r12
add esi, eax
test r8d, r8d
je 0x140197bbb
cmp dword [rsp + 0x54], 1
je 0x140197e60
movsxd rdi, esi
add rdi, qword [rsp + 0x28]
test byte [rdi], 1
jne 0x140198000
mov edx, dword [r14 + 0x3c]
or edx, dword [rsp + 0x50]
je 0x140197cb0
movzx eax, word [rsp + 0xb8]
mov rcx, qword [rsp + 0xb0]
movsxd rdx, dword [rsp + 0xb8]
rol ax, 8
cmp byte [rsp + 0xe9], 0
jne 0x140197a58
mov r8, r12
add rcx, rdx
sub r8, rbx
cmp r8, 0x7f
jbe 0x140197ee0
cmp r8, 0x3fff
jbe 0x140197fb8
mov rdx, r8
call sym.putVarint64
add dword [rsp + 0xb8], eax
jmp 0x140197aa9
movsxd r13, esi
add r13, qword [rsp + 0x28]
mov ebx, 1
movzx edx, byte [r13]
mov dword [rsp + 0x98], edx
test dl, dl
js 0x140197f08
mov eax, edx
mov ecx, dword [rsp + 0x44]
shr eax, 0x1f
add eax, edx
sar eax, 1
mov edi, eax
test ecx, ecx
je 0x140197c6d
and edx, 1
jne 0x1401980a0
lea edi, [rax + rbx]
movsxd rcx, dword [rsp + 0xb8]
mov eax, dword [rsp + 0xc8]
add eax, ecx
add eax, edi
cmp eax, r15d
jg 0x140197cd8
add rcx, qword [rsp + 0xb0]
movsxd r8, edi
mov rdx, r13
add esi, edi
call sym.memcpy
add dword [rsp + 0xb8], edi
mov eax, dword [r14 + 0x3c]
jmp 0x140197b4b
mov r9, qword [rsp + 0x60]
mov r8d, dword [rsp + 0x6c]
mov rcx, r14
mov rdx, qword [rsp + 0x48]
call sym.fts5WriteAppendTerm
mov dword [rsp + 0x50], 1
jmp 0x140197bc9
mov dword [rsp + 0x78], esi
mov esi, ebp
mov qword [rsp + 0x70], r12
jmp 0x140197d30
movsxd r8, ebx
add rcx, qword [rsp + 0xb0]
mov rdx, r12
call sym.memcpy
add ebx, dword [rsp + 0xb8]
mov dword [rsp + 0xb8], ebx
add ebx, dword [rsp + 0xc8]
cmp r15d, ebx
jg 0x140198050
mov esi, edi
mov rdx, qword [rsp + 0x48]
mov rcx, r14
call sym.fts5WriteFlushLeaf
cmp edi, esi
jle 0x140198050
mov eax, dword [r14 + 0x3c]
test eax, eax
jne 0x140198038
movsxd rcx, dword [rsp + 0xb8]
mov r10d, r15d
mov ebx, edi
movsxd r9, esi
sub ebx, esi
lea r12, [r13 + r9]
sub r10d, ecx
sub r10d, dword [rsp + 0xc8]
cmp ebx, r10d
jle 0x140197ce8
movzx eax, byte [r12]
test al, al
jns 0x140197e50
cmp byte [r12 + 1], 0
jns 0x140198068
test byte [r12 + 2], 0x80
je 0x140198090
lea rdx, [rsp + 0x98]
mov rcx, r12
mov dword [rsp + 0x68], r10d
call sym.sqlite3Fts5GetVarint
mov r10d, dword [rsp + 0x68]
movzx ebx, al
movzx ebp, al
cmp r10d, ebx
jle 0x140197e09
mov dword [rsp + 0x68], esi
mov rsi, r12
mov r12d, r10d
jmp 0x140197dc2
mov ebx, eax
movsxd rbp, ebx
mov eax, 1
lea rcx, [rsi + rbp]
movzx edx, byte [rcx]
test dl, dl
jns 0x140197dfb
cmp byte [rcx + 1], 0
mov eax, 2
jns 0x140197dfb
mov eax, 3
test byte [rcx + 2], 0x80
je 0x140197dfb
lea rdx, [rsp + 0x98]
call sym.sqlite3Fts5GetVarint
movzx eax, al
add eax, ebx
cmp r12d, eax
jge 0x140197dc0
mov r12, rsi
mov esi, dword [rsp + 0x68]
movsxd rcx, dword [rsp + 0xb8]
mov r8, rbp
mov rdx, r12
add esi, ebx
add rcx, qword [rsp + 0xb0]
call sym.memcpy
add ebx, dword [rsp + 0xb8]
mov dword [rsp + 0xb8], ebx
add ebx, dword [rsp + 0xc8]
cmp ebx, r15d
jl 0x140197d28
jmp 0x140197d1b
mov ebp, 1
mov ebx, 1
jmp 0x140197da8
cmp esi, dword [rsp + 0x40]
jge 0x140197bbb
mov rdi, qword [rsp + 0x28]
movsxd rax, esi
cmp byte [rdi + rax], 0
jne 0x140197bbb
mov r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x88]
mov r9, r12
mov rcx, r14
call sym.fts5FlushSecureDelete
lea eax, [rsi + 1]
cmp eax, dword [rsp + 0x40]
jge 0x1401980ef
mov rdi, qword [rsp + 0x28]
movsxd rdx, eax
cmp byte [rdi + rdx], 0
jne 0x1401980ef
mov dword [rsp + 0x40], 0
mov edx, dword [r14 + 0x3c]
add esi, 2
jmp 0x140197bbf
mov byte [rcx], r12b
mov eax, 1
jmp 0x140197a8a
mov byte [rcx], r8b
mov eax, 1
jmp 0x140197c1b
mov rdx, qword [rsp + 0x48]
mov rcx, r14
call sym.fts5WriteFlushLeaf
jmp 0x140197b47
lea rdx, [rsp + 0x98]
mov rcx, r13
call sym.sqlite3Fts5GetVarint32
mov edx, dword [rsp + 0x98]
mov ebx, eax
jmp 0x140197c51
mov r9, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x48]
mov r8d, eax
mov rcx, r14
call sym.fts5WriteAppendTerm
mov r10d, dword [r14 + 0x3c]
test r10d, r10d
jne 0x1401980fa
mov eax, dword [rsp + 0xb8]
mov edx, dword [rsp + 0xc8]
mov edi, dword [rsp + 0x40]
add edx, eax
add edx, edi
cmp edx, r15d
jge 0x1401980d0
mov rdx, qword [rsp + 0x28]
movsxd rcx, eax
movsxd r8, edi
add rcx, qword [rsp + 0xb0]
call sym.memcpy
add dword [rsp + 0xb8], edi
mov eax, dword [r14 + 0x3c]
test eax, eax
jne 0x1401979a0
mov rdi, qword [rsp + 0x38]
mov rax, qword [rdi + 0x18]
mov rax, qword [rax + 8]
mov qword [rdi + 0x18], rax
jmp 0x1401979a8
mov rax, r8
and r8d, 0x7f
shr rax, 7
mov byte [rcx + 1], r8b
or eax, 0xffffff80
mov byte [rcx], al
mov eax, 2
jmp 0x140197c1b
mov rax, r12
shr rax, 7
or eax, 0xffffff80
mov byte [rcx], al
mov eax, r12d
and eax, 0x7f
mov byte [rcx + 1], al
mov eax, 2
jmp 0x140197a8a
mov rdx, qword [rsp + 0x88]
mov r8, qword [rsp + 0x60]
mov r9, r12
mov rcx, r14
call sym.fts5FlushSecureDelete
mov eax, dword [r14 + 0x3c]
mov edx, eax
test eax, eax
jne 0x14019802b
cmp byte [rdi], 1
jne 0x140197bbf
add esi, 1
jmp 0x140197b4e
mov esi, dword [rsp + 0x78]
mov r12, qword [rsp + 0x70]
add esi, edi
jmp 0x140197b4b
mov esi, dword [rsp + 0x78]
mov r12, qword [rsp + 0x70]
mov eax, dword [r14 + 0x3c]
add esi, edi
jmp 0x140197b4b
mov ebp, 2
mov ebx, 2
jmp 0x140197da8
mov esi, eax
jmp 0x140197b30
mov ebp, 3
mov ebx, 3
jmp 0x140197da8
movsxd r8, eax
lea rdx, [rsp + 0xb0]
lea rcx, [r14 + 0x3c]
add esi, ebx
add r8, r8
movsxd r13, esi
call sym.sqlite3Fts5BufferAppendVarint
add r13, qword [rsp + 0x28]
jmp 0x140197c70
mov dword [rsp + 0x50], 1
test edi, edi
jg 0x140197a33
jmp 0x140197f9c
mov eax, ebp
jmp 0x1401979a0
mov esi, eax
mov eax, dword [r14 + 0x3c]
jmp 0x140197b4e
mov r15, r14
jmp 0x1401977fa
lea rdx, [rsp + 0x88]
lea rcx, [r15 + 0x3c]
call sym.fts5StructureAddLevel
mov r8, qword [rsp + 0x88]
jmp 0x14019782f
mov rcx, r12
call sym.sqlite3_free
mov dword [r15 + 0x3c], 7
mov rcx, qword [r15]
mov eax, 7
mov r8, qword [rsp + 0x88]
jmp 0x1401975fb
mov rcx, rdx
call sym.sqlite3Malloc
mov r8, qword [rsp + 0x28]
jmp 0x1401978a6