Function at 0x4bd75c
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 r13, qword [rcx + 0x18]
mov rbx, rcx
mov dword [rsp + 0x7c], 0
call sym.fts5StructureRead
lea rdi, [rbx + 0x34]
mov rdx, rax
mov rcx, rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x88], rax
call sym.fts5AllocateSegid.isra.337
lea rcx, [rbx + 0x88]
mov dword [rsp + 0x38], eax
call sym.fts5StructureInvalidate.isra.269
cmp dword [rsp + 0x38], 0
je 0x4bdd73
mov rax, qword [rbx]
lea rsi, [rsp + 0xa8]
mov rcx, rbx
mov r8d, dword [rsp + 0x38]
mov rdx, rsi
mov edi, dword [rax + 0x5c]
mov r15d, dword [rax + 0x88]
mov eax, dword [rax + 0xb0]
mov dword [rsp + 0x44], edi
mov dword [rsp + 0x3c], eax
call sym.fts5WriteInit
cmp dword [rbx + 0x34], 0
jne 0x4bdcca
lea r9, [r13 + 0x18]
xor r8d, r8d
xor edx, edx
mov rcx, r13
call sym.fts5HashEntrySort
mov qword [rsp + 0x28], rsi
mov dword [rbx + 0x34], eax
mov r12d, dword [rbx + 0x34]
test r12d, r12d
jne 0x4bdcca
cmp qword [r13 + 0x18], 0
je 0x4bdcca
lea r9, [rsp + 0x80]
mov rcx, r13
lea r8, [rsp + 0x98]
lea rdx, [rsp + 0x90]
call sym.sqlite3Fts5HashScanEntry
mov r9, qword [rsp + 0x90]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r9
repne scasb al, byte [rdi]
cmp dword [rsp + 0x3c], 0
mov rsi, rcx
not rsi
lea r8, [rsi - 1]
mov dword [rsp + 0x68], r8d
jne 0x4bd8ac
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call sym.fts5WriteAppendTerm
cmp dword [rbx + 0x34], 0
jne 0x4bdcca
movsxd rax, dword [rsp + 0xc0]
mov edx, dword [rsp + 0xd0]
movsxd rcx, dword [rsp + 0x80]
add edx, eax
add edx, ecx
cmp edx, r15d
jl 0x4bde8d
mov qword [rsp + 0x30], 0
xor eax, eax
cmp dword [rsp + 0x3c], 0
sete al
xor esi, esi
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x60], rax
cmp dword [rbx + 0x34], 0
jne 0x4bd810
cmp dword [rsp + 0x80], r12d
jg 0x4bd8f7
mov rax, qword [r13 + 0x18]
mov rax, qword [rax + 8]
mov qword [r13 + 0x18], rax
jmp 0x4bd810
movsxd rcx, r12d
mov rdx, qword [rsp + 0x60]
mov qword [rsp + 0xa0], 0
add rcx, qword [rsp + 0x98]
call sym.sqlite3Fts5GetVarint
movzx ebp, al
mov rax, qword [rsp + 0x30]
add ebp, r12d
add rax, qword [rsp + 0xa0]
cmp dword [rsp + 0x3c], 0
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], rax
je 0x4bda08
cmp dword [rsp + 0x44], 1
jne 0x4bd9bd
cmp dword [rsp + 0x80], ebp
jle 0x4bda08
mov rdx, qword [rsp + 0x98]
movsxd rax, ebp
cmp byte [rdx + rax], 0
jne 0x4bda08
mov r9, qword [rsp + 0x30]
lea r12d, [rbp + 1]
mov rcx, rbx
mov r8, qword [rsp + 0x90]
mov rdx, qword [rsp + 0x88]
call sym.fts5FlushSecureDelete
cmp dword [rsp + 0x80], r12d
jle 0x4bd8d2
mov rdx, qword [rsp + 0x98]
movsxd rax, r12d
cmp byte [rdx + rax], 0
jne 0x4bd8d2
mov dword [rsp + 0x80], 0
add ebp, 2
jmp 0x4bda08
mov rax, qword [rsp + 0x98]
movsxd rdi, ebp
test byte [rax + rdi], 1
je 0x4bda08
mov r9, qword [rsp + 0x30]
mov rcx, rbx
mov r8, qword [rsp + 0x90]
mov rdx, qword [rsp + 0x88]
call sym.fts5FlushSecureDelete
cmp dword [rbx + 0x34], 0
jne 0x4bd9ff
mov rax, qword [rsp + 0x98]
cmp byte [rax + rdi], 1
jne 0x4bda08
lea r12d, [rbp + 1]
jmp 0x4bd8d2
mov eax, dword [rsp + 0x40]
or eax, dword [rbx + 0x34]
jne 0x4bda33
mov r9, qword [rsp + 0x90]
mov rcx, rbx
mov r8d, dword [rsp + 0x68]
mov rdx, qword [rsp + 0x28]
call sym.fts5WriteAppendTerm
mov dword [rsp + 0x40], 1
mov edx, dword [rsp + 0xc0]
mov rcx, qword [rsp + 0xb8]
movsxd rax, dword [rsp + 0xc0]
xchg dl, dh
cmp byte [rsp + 0xf1], 0
je 0x4bda96
mov word [rcx], dx
mov rdx, qword [rsp + 0x20]
movsxd rcx, dword [rsp + 0xc0]
add rcx, qword [rsp + 0xb8]
call sym.sqlite3Fts5PutVarint
mov r8, qword [rsp + 0x20]
mov rcx, rbx
mov byte [rsp + 0xf1], 0
mov rdx, qword [rsp + 0x28]
add dword [rsp + 0xc0], eax
call sym.fts5WriteDlidxAppend
jmp 0x4bdaad
mov rdx, qword [rsp + 0x20]
add rcx, rax
sub rdx, rsi
call sym.sqlite3Fts5PutVarint
add dword [rsp + 0xc0], eax
mov r14d, dword [rbx + 0x34]
test r14d, r14d
jne 0x4bd810
cmp dword [rsp + 0x44], 1
jne 0x4bdb68
cmp dword [rsp + 0x80], ebp
jle 0x4bdb3f
mov rdx, qword [rsp + 0x98]
movsxd rax, ebp
cmp byte [rdx + rax], 0
jne 0x4bdb3f
movsxd rax, dword [rsp + 0xc0]
lea edx, [rax + 1]
mov dword [rsp + 0xc0], edx
mov rdx, qword [rsp + 0xb8]
mov byte [rdx + rax], 0
lea eax, [rbp + 1]
cmp dword [rsp + 0x80], eax
jle 0x4bdb3d
mov rcx, qword [rsp + 0x98]
movsxd rdx, eax
cmp byte [rcx + rdx], 0
jne 0x4bdb3d
movsxd rax, dword [rsp + 0xc0]
add ebp, 2
lea edx, [rax + 1]
mov dword [rsp + 0xc0], edx
mov rdx, qword [rsp + 0xb8]
mov byte [rdx + rax], 0
jmp 0x4bdb3f
mov ebp, eax
mov eax, dword [rsp + 0xd0]
add eax, dword [rsp + 0xc0]
cmp eax, r15d
jl 0x4bdcbd
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call sym.fts5WriteFlushLeaf
jmp 0x4bdcbd
mov rcx, qword [rsp + 0x98]
movsxd rsi, ebp
mov r12d, 1
add rcx, rsi
movzx edx, byte [rcx]
test dl, dl
mov dword [rsp + 0x84], edx
jns 0x4bdb9a
lea rdx, [rsp + 0x84]
call sym.sqlite3Fts5GetVarint32
mov r12d, eax
mov eax, dword [rsp + 0x84]
mov ecx, 2
add rsi, qword [rsp + 0x98]
cdq
idiv ecx
mov edx, dword [rsp + 0xd0]
mov qword [rsp + 0x48], rsi
add r12d, eax
movsxd rax, dword [rsp + 0xc0]
add edx, eax
add edx, r12d
cmp edx, r15d
jle 0x4bdbe4
lea rax, [rsp + 0x84]
mov qword [rsp + 0x58], rax
jmp 0x4bdc74
add rax, qword [rsp + 0xb8]
movsxd rcx, r12d
mov rsi, qword [rsp + 0x48]
mov rdi, rax
rep movsb byte [rdi], byte [rsi]
add dword [rsp + 0xc0], r12d
jmp 0x4bdcba
mov edi, r15d
sub edi, dword [rsp + 0xc0]
mov r8d, r12d
movsxd rsi, r14d
sub edi, dword [rsp + 0xd0]
sub r8d, r14d
add rsi, qword [rsp + 0x48]
cmp r8d, edi
jg 0x4bdc7c
movsxd rax, dword [rsp + 0xc0]
movsxd rcx, r8d
add r14d, r8d
add rax, qword [rsp + 0xb8]
mov rdi, rax
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rsp + 0xc0]
add eax, r8d
mov dword [rsp + 0xc0], eax
add eax, dword [rsp + 0xd0]
cmp eax, r15d
jl 0x4bdc6f
mov rdx, qword [rsp + 0x28]
mov rcx, rbx
call sym.fts5WriteFlushLeaf
cmp r12d, r14d
jle 0x4bdcba
cmp dword [rbx + 0x34], 0
je 0x4bdc06
jmp 0x4bdcba
mov rdx, qword [rsp + 0x58]
mov rcx, rsi
call sym.sqlite3Fts5GetVarint32
cmp edi, eax
mov r8d, eax
jle 0x4bdc2a
mov rdx, qword [rsp + 0x58]
movsxd rcx, r8d
mov dword [rsp + 0x6c], r8d
add rcx, rsi
call sym.sqlite3Fts5GetVarint32
mov r8d, dword [rsp + 0x6c]
add eax, r8d
cmp edi, eax
jl 0x4bdc2a
mov r8d, eax
jmp 0x4bdc90
add ebp, r12d
mov r12d, ebp
mov rsi, qword [rsp + 0x20]
jmp 0x4bd8d2
mov rcx, r13
call sym.sqlite3Fts5HashClear
lea rdx, [rsp + 0xa8]
mov rcx, rbx
lea r8, [rsp + 0x7c]
call sym.fts5WriteFinish
cmp dword [rsp + 0x7c], 0
jle 0x4bdd73
mov rax, qword [rsp + 0x88]
cmp dword [rax + 0x14], 0
jne 0x4bdd12
mov rcx, qword [rsp + 0x50]
lea rdx, [rsp + 0x88]
call sym.fts5StructureAddLevel
cmp dword [rbx + 0x34], 0
jne 0x4bdd30
mov rdx, qword [rsp + 0x88]
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x50]
call sym.fts5StructureExtendLevel.part.572.constprop.762
cmp dword [rbx + 0x34], 0
mov r8, qword [rsp + 0x88]
jne 0x4bdd73
movsxd rax, dword [r8 + 0x1c]
mov rcx, rbx
mov edi, dword [rsp + 0x38]
lea edx, [rax + 1]
imul rax, rax, 0xc
mov dword [r8 + 0x1c], edx
mov edx, dword [rsp + 0x7c]
add rax, qword [r8 + 0x20]
mov dword [rax + 8], edx
xor edx, edx
mov dword [rax], edi
mov dword [rax + 4], 1
inc dword [r8 + 0x10]
call sym.fts5StructurePromote.part.573
cmp dword [rbx + 0x34], 0
jne 0x4bddda
mov rax, qword [rbx]
mov r9d, dword [rax + 0x8c]
test r9d, r9d
jle 0x4bddda
mov r11, qword [rsp + 0x88]
test r11, r11
je 0x4bddda
mov r10, qword [r11 + 8]
xor edx, edx
movsxd r8, dword [rsp + 0x7c]
movsxd rsi, dword [rbx + 0x10]
lea rax, [r8 + r10]
mov qword [r11 + 8], rax
div rsi
mov rcx, rax
xor edx, edx
mov edi, ecx
mov rax, r10
mov r8, rsi
div rsi
lea rdx, [rsp + 0x88]
sub edi, eax
mov rcx, rbx
imul r8d, edi
imul r8d, dword [r11 + 0x14]
call sym.fts5IndexMerge
mov rax, qword [rbx]
mov edi, dword [rax + 0x90]
mov rax, qword [rsp + 0x88]
test rax, rax
mov qword [rsp + 0xa8], rax
je 0x4bde5b
lea rbp, [rsp + 0xa8]
xor esi, esi
cmp dword [rax + 0x14], 0
jle 0x4bde5b
cmp dword [rbx + 0x34], 0
mov rdx, qword [rsp + 0xa8]
jne 0x4bde53
movsxd rax, esi
inc rax
shl rax, 4
cmp edi, dword [rdx + rax + 0xc]
jg 0x4bde53
xor r9d, r9d
mov r8d, esi
mov rdx, rbp
mov rcx, rbx
inc esi
call sym.fts5IndexMergeLevel
cmp dword [rbx + 0x34], 0
jne 0x4bde08
mov r8, qword [rsp + 0xa8]
mov edx, esi
mov rcx, rbx
call sym.fts5StructurePromote.part.573
jmp 0x4bde08
mov qword [rsp + 0x88], rdx
mov rdx, qword [rsp + 0x88]
mov rcx, rbx
call sym.fts5StructureWrite
mov rcx, qword [rsp + 0x88]
call sym.fts5StructureRelease
nop
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
add rax, qword [rsp + 0xb8]
mov rsi, qword [rsp + 0x98]
mov rdi, rax
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rsp + 0x80]
add dword [rsp + 0xc0], eax
cmp dword [rbx + 0x34], 0
je 0x4bd8e6
jmp 0x4bd810