Function at 0x14012f230
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, 0xf8
mov rax, qword [rcx]
mov ebx, dword [rcx + 0x10]
mov qword [rsp + 0x80], rdx
mov rsi, rcx
mov r12, r8
mov qword [rsp + 0xa8], rax
mov qword [rsp + 0xd0], 0
test ebx, ebx
je 0x14012f2db
mov rcx, qword [rsi + 8]
mov r8, qword [rsp + 0x80]
mov edx, 1
call sym.sqlite3Fts5IndexBeginWrite
mov ebp, eax
test eax, eax
jne 0x14012f2c5
mov rdi, qword [rsi]
mov r11d, dword [rdi + 0x44]
test r11d, r11d
je 0x14012f2ed
xor r9d, r9d
lea r8, [rsp + 0xe0]
mov edx, 8
mov rcx, rsi
mov qword [rsp + 0xe0], 0
call sym.fts5StorageGetStmt
mov ebp, eax
test eax, eax
je 0x14012f438
mov eax, ebp
add rsp, 0xf8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov edx, 1
call sym.fts5StorageLoadTotals.part.0
mov ebp, eax
test eax, eax
je 0x14012f26f
jmp 0x14012f2c5
mov qword [rsp + 0xd8], 0
xor ebx, ebx
test r12, r12
je 0x14012f644
mov qword [rsp + 0xe0], rsi
xor r14d, r14d
lea r15, [rsp + 0xe0]
mov dword [rsp + 0xe8], 0xffffffff
lea r13d, [r14 + 1]
cmp r13d, dword [rdi + 0x18]
jg 0x14012f592
mov rax, qword [rdi + 0x28]
cmp byte [rax + r14], 0
jne 0x14012f500
test rbx, rbx
je 0x14012f509
mov edx, r13d
mov rcx, rbx
call sym.columnMem
mov rbp, rax
test rax, rax
je 0x14012f389
movzx eax, word [rax + 0x14]
mov edx, eax
and dx, 0x202
cmp dx, 0x202
je 0x14012f578
test al, 1
jne 0x14012f58b
mov rcx, rbp
mov edx, 1
call sym.valueToText
mov rbp, rax
mov rcx, rbx
call sym.columnMallocFailure.part.0
mov edx, r13d
mov rcx, rbx
lea r13, [r14*8]
call sym.columnMem
mov edx, 1
mov rcx, rax
call sym.sqlite3ValueBytes
mov rcx, rbx
mov dword [rsp + 0x3c], eax
call sym.columnMallocFailure.part.0
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0xec], 0
test rbp, rbp
je 0x14012f6ba
mov r10, qword [rdi + 0x78]
mov rcx, qword [rdi + 0x70]
mov r9, rbp
mov dword [rsp + 0x20], eax
lea rdx, [sym.fts5StorageInsertCallback]
mov r8d, 4
mov qword [rsp + 0x28], rdx
mov rdx, r15
call qword [r10 + 0x10]
movsxd rcx, dword [rsp + 0xec]
mov ebp, eax
mov rdx, qword [rsi + 0x20]
add rdx, r13
sub qword [rdx], rcx
js 0x14012f561
add r14, 1
test ebp, ebp
je 0x14012f322
sub qword [rsi + 0x18], 1
mov rcx, rbx
call sym.sqlite3_reset
jmp 0x14012f2c5
mov rbx, qword [rsp + 0xe0]
mov r8, qword [rsp + 0x80]
mov edx, 1
mov rcx, rbx
call sym.sqlite3_bind_int64
mov rcx, rbx
call sym.sqlite3_step
cmp eax, 0x64
je 0x14012f6c3
mov rcx, rbx
call sym.sqlite3_reset
mov ebp, eax
test ebp, ebp
jne 0x14012f2c5
mov rax, qword [rsp + 0xa8]
mov ebp, dword [rax + 0x58]
test ebp, ebp
jne 0x14012f5ac
mov edx, dword [rax + 0x40]
test edx, edx
jne 0x14012f2c5
lea rbx, [rsp + 0xd0]
xor r9d, r9d
mov r8, rbx
mov edx, 5
mov rcx, rsi
call sym.fts5StorageGetStmt
mov ebp, eax
test eax, eax
jne 0x14012f2c5
mov rbx, qword [rsp + 0xd0]
mov r8, qword [rsp + 0x80]
mov edx, 1
mov rcx, rbx
call sym.sqlite3_bind_int64
mov rcx, rbx
call sym.sqlite3_step
mov rcx, rbx
add rsp, 0xf8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.sqlite3_reset
add r14, 1
jmp 0x14012f322
test r12, r12
je 0x14012f500
mov rcx, qword [r12 + r14*8]
lea r13, [r14*8]
test rcx, rcx
je 0x14012f6ab
movzx eax, word [rcx + 0x14]
mov edx, eax
and dx, 0x202
cmp dx, 0x202
je 0x14012f631
mov edx, 1
test al, 1
jne 0x14012f618
call sym.valueToText
mov rcx, qword [r12 + r14*8]
mov rbp, rax
mov edx, 1
call sym.sqlite3ValueBytes
jmp 0x14012f3c1
sub qword [rsi + 0x18], 1
mov rcx, rbx
mov ebp, 0x10b
call sym.sqlite3_reset
jmp 0x14012f2c5
cmp byte [rbp + 0x16], 1
jne 0x14012f371
mov rbp, qword [rbp + 8]
jmp 0x14012f389
xor ebp, ebp
jmp 0x14012f389
mov rax, qword [rsi + 0x18]
test rax, rax
jle 0x14012f699
sub rax, 1
mov qword [rsi + 0x18], rax
jmp 0x14012f466
lea rbx, [rsp + 0xd0]
xor r9d, r9d
mov edx, 7
mov rcx, rsi
mov r8, rbx
call sym.fts5StorageGetStmt
mov ebp, eax
test eax, eax
jne 0x14012f2c5
mov rdi, qword [rsp + 0xd0]
mov r8, qword [rsp + 0x80]
mov edx, 1
mov rcx, rdi
call sym.sqlite3_bind_int64
mov rcx, rdi
call sym.sqlite3_step
mov rcx, rdi
call sym.sqlite3_reset
mov ebp, eax
mov rax, qword [rsp + 0xa8]
mov edx, ebp
or edx, dword [rax + 0x40]
jne 0x14012f2c5
jmp 0x14012f49e
call sym.sqlite3ValueBytes
mov dword [rsp + 0xec], 0
xor ebp, ebp
xor ecx, ecx
jmp 0x14012f407
cmp byte [rcx + 0x16], 1
jne 0x14012f539
mov rbp, qword [rcx + 8]
jmp 0x14012f552
xor r9d, r9d
lea r8, [rsp + 0xd8]
mov edx, 2
mov rcx, rsi
call sym.fts5StorageGetStmt
mov ebp, eax
test eax, eax
jne 0x14012f2c5
mov rbx, qword [rsp + 0xd8]
mov r8, qword [rsp + 0x80]
mov edx, 1
mov rcx, rbx
call sym.sqlite3_bind_int64
mov rcx, rbx
call sym.sqlite3_step
cmp eax, 0x64
je 0x14012f304
jmp 0x14012f466
mov rcx, rbx
mov ebp, 0x10b
call sym.sqlite3_reset
jmp 0x14012f2c5
mov edx, 1
call sym.sqlite3ValueBytes
jmp 0x14012f61d
xor ebp, ebp
xor ecx, ecx
jmp 0x14012f407
mov rcx, rbx
mov edx, 1
call sym.sqlite3_column_int64
mov rcx, rbx
mov qword [rsp + 0xb0], rax
mov rdi, rax
call sym.sqlite3_reset
test eax, eax
jne 0x14012f46e
test rdi, rdi
je 0x14012f46e
mov r13, qword [rsi + 8]
mov rcx, r13
call sym.fts5StructureRead
mov rbx, rax
test rax, rax
je 0x14012fbb1
mov edx, dword [rax + 0x1c]
test edx, edx
jle 0x14012fba2
movsxd rax, edx
mov qword [rsp + 0x48], r13
shl rax, 4
mov qword [rsp + 0xc0], rsi
lea rcx, [rbx + rax - 0x10]
lea r8, [rbx + rax]
mov qword [rsp + 0xb8], rbx
lea eax, [rdx - 1]
mov rdi, rcx
mov rbx, r8
shl rax, 4
sub rdi, rax
mov r12, rdi
movsxd rax, dword [rbx + 0x14]
mov edx, eax
sub edx, 1
js 0x14012fb80
movsxd r8, edx
mov edx, edx
mov qword [rsp + 0xc8], r12
sub rax, rdx
lea rcx, [r8*8]
lea rdx, [rax*8]
sub rcx, r8
sub rdx, rax
lea rdi, [rcx*8]
lea rax, [rdx*8 - 0x70]
mov r14, rdi
mov rdi, qword [rsp + 0xb0]
mov qword [rsp + 0xa0], rax
mov r12, qword [rbx + 0x18]
add r12, r14
cmp rdi, qword [r12 + 0x10]
jb 0x14012fb66
cmp qword [r12 + 0x18], rdi
jb 0x14012fb66
test ebp, ebp
jne 0x14012f7ce
add qword [r12 + 0x28], 1
mov rcx, qword [rsp + 0x48]
mov eax, dword [r12 + 0x20]
add dword [rcx + 0x34], 1
mov dword [rsp + 0x3c], eax
test eax, eax
jg 0x14012fdc5
mov dword [rsp + 0x70], 0xffffffff
mov r9d, 4
mov qword [rsp + 0x60], 0
mov rsi, qword [rsp + 0x80]
mov eax, 0xffffffff
cmp rax, rsi
mov eax, 8
cmovb r9d, eax
mov rax, qword [rsp + 0x48]
mov rax, qword [rax]
mov eax, dword [rax + 0x90]
sub eax, 8
cdq
idiv r9d
mov edx, 0x20
cmp eax, edx
cmovge edx, eax
mov eax, dword [rsp + 0x3c]
mov r11d, edx
test eax, eax
je 0x14012feb6
cmp eax, 1
je 0x14012fef8
mov eax, dword [rsp + 0x3c]
mov ebp, r11d
lea eax, [rax + rax + 1]
mov dword [rsp + 0x3c], eax
mov qword [rsp + 0x88], rdi
mov dword [rsp + 0x74], r9d
mov dword [rsp + 0x78], r11d
mov qword [rsp + 0x90], rbx
mov qword [rsp + 0x98], r14
mov byte [rsp + 0x7f], r9b
nop dword [rax]
mov rax, qword [rsp + 0x48]
movsxd r14, dword [rsp + 0x3c]
mov eax, dword [rax + 0x3c]
test eax, eax
jne 0x14012fd36
mov r9d, dword [0x14014efd4]
lea rax, [r14*8]
mov qword [rsp + 0x68], rax
test r9d, r9d
jne 0x14012fd5a
call sym.sqlite3MutexInit
test eax, eax
jne 0x14012fd65
call sym.sqlite3_initialize.part.0
test eax, eax
jne 0x14012fd65
mov rcx, qword [rsp + 0x68]
call sym.sqlite3Malloc
mov r13, rax
test rax, rax
je 0x14012fd65
mov r8, qword [rsp + 0x68]
xor edx, edx
mov rcx, rax
call sym.memset
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x3c]
mov ebx, dword [rsp + 0x74]
mov ecx, dword [rsp + 0x3c]
imul ebp, ebx
lea edx, [rbp + 8]
test ecx, ecx
jle 0x14012fec8
mov rsi, qword [rsp + 0x68]
movsxd rbx, edx
mov qword [rsp + 0x40], r12
mov rdi, r13
mov r12, qword [rsp + 0x48]
add rbx, 0x10
mov ebp, edx
lea r15, [r13 + rsi]
mov rsi, r13
jmp 0x14012f98a
call sym.sqlite3MutexInit
test eax, eax
jne 0x14012f9b0
call sym.sqlite3_initialize.part.0
test eax, eax
jne 0x14012f9b0
mov rcx, rbx
call sym.sqlite3Malloc
mov rcx, rax
test rax, rax
je 0x14012f9b0
mov r8, rbx
xor edx, edx
call sym.memset
mov dword [rax + 8], ebp
mov rcx, rax
lea rax, [rax + 0x10]
mov qword [rcx], rax
mov eax, dword [r12 + 0x3c]
mov qword [rsi], rcx
add rsi, 8
cmp r15, rsi
je 0x14012f9d0
test eax, eax
jne 0x14012f981
mov eax, dword [0x14014efd4]
test eax, eax
je 0x14012f940
lock or qword [rsp], 0
mov rcx, rbx
call sym.sqlite3Malloc
mov rcx, rax
test rax, rax
jne 0x14012f962
nop
add rsi, 8
mov eax, 7
mov dword [r12 + 0x3c], 7
cmp r15, rsi
jne 0x14012f98a
nop word [rax + rax]
mov r12, qword [rsp + 0x40]
test eax, eax
jne 0x14012fe57
movzx esi, byte [rsp + 0x7f]
nop word [rax + rax]
mov rax, qword [rdi]
add rdi, 8
mov rax, qword [rax]
mov byte [rax], sil
mov rax, qword [rdi - 8]
mov rax, qword [rax]
mov dword [rax + 4], 0
cmp r15, rdi
jne 0x14012f9e8
xor edi, edi
mov dword [rsp + 0x40], edi
cmp dword [r12 + 0x20], edi
jle 0x14012fa60
cmp dword [rsp + 0x70], edi
je 0x14012fbc8
mov eax, dword [r12]
mov rcx, qword [rsp + 0x48]
lea edx, [rax + 0x10000]
shl rdx, 0x25
add rdx, rdi
call sym.fts5DataRead
mov r15, rax
mov r11, rax
test r15, r15
jne 0x14012fbd9
mov rcx, r11
add rdi, 1
call sym.sqlite3_free
mov dword [rsp + 0x40], edi
cmp dword [r12 + 0x20], edi
jg 0x14012fa15
mov rax, qword [rsp + 0x48]
mov rsi, r14
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x90]
mov r14, qword [rsp + 0x98]
mov r11d, dword [rax + 0x3c]
test r11d, r11d
jne 0x14012fe6f
mov rax, qword [rsp + 0x80]
xor edx, edx
mov r15, rsi
mov r9, qword [rsp + 0x80]
div rsi
mov esi, dword [rsp + 0x3c]
mov r8d, esi
mov rcx, qword [r13 + rdx*8]
mov edx, 1
call sym.fts5IndexTombstoneAddToPage
test esi, esi
jle 0x14012ff58
mov rbp, qword [rsp + 0x48]
xor esi, esi
mov eax, dword [rbp + 0x3c]
test eax, eax
jne 0x14012faf9
mov edx, dword [r12]
mov rax, qword [r13 + rsi*8]
mov rcx, rbp
add edx, 0x10000
mov r9d, dword [rax + 8]
mov r8, qword [rax]
shl rdx, 0x25
add rdx, rsi
call sym.fts5DataWrite.part.0
mov eax, dword [rbp + 0x3c]
add rsi, 1
cmp r15, rsi
jne 0x14012facd
mov esi, dword [rsp + 0x3c]
mov dword [r12 + 0x20], esi
test eax, eax
jne 0x14012fb20
mov rcx, qword [rsp + 0x48]
mov rdx, qword [rcx + 0xa0]
call sym.fts5StructureWrite.part.0
mov rcx, qword [rsp + 0x60]
call sym.sqlite3_free
test r13, r13
je 0x14012fb61
mov r15, qword [rsp + 0x68]
mov r8d, dword [rsp + 0x3c]
mov rsi, r13
add r15, r13
test r8d, r8d
jle 0x14012fb59
nop dword [rax]
mov rcx, qword [rsi]
add rsi, 8
call sym.sqlite3_free
cmp r15, rsi
jne 0x14012fb48
mov rcx, r13
call sym.sqlite3_free
mov ebp, 1
sub r14, 0x38
cmp qword [rsp + 0xa0], r14
jne 0x14012f7a7
mov r12, qword [rsp + 0xc8]
sub rbx, 0x10
cmp r12, rbx
jne 0x14012f74f
mov r13, qword [rsp + 0x48]
mov rbx, qword [rsp + 0xb8]
mov rsi, qword [rsp + 0xc0]
mov eax, dword [rbx]
sub eax, 1
mov dword [rbx], eax
test eax, eax
jle 0x14012ff65
mov ebp, dword [r13 + 0x3c]
mov dword [r13 + 0x3c], 0
jmp 0x14012f470
mov r15, qword [rsp + 0x60]
xor r11d, r11d
test r15, r15
je 0x14012fa49
mov rcx, qword [r15]
mov eax, dword [r15 + 8]
xor esi, esi
cmp byte [rcx], 4
setne sil
sub eax, 8
lea esi, [rsi*4 + 4]
cdq
idiv esi
test eax, eax
jle 0x14012fcfa
mov ebx, 1
mov qword [rsp + 0x58], rdi
mov ebp, 8
mov edi, ebx
mov qword [rsp + 0x50], r11
mov ebx, eax
jmp 0x14012fc4c
lea rcx, [rcx + rbp*2 - 8]
cmp qword [rcx], 0
je 0x14012fc38
call sym.fts5GetU64
mov r9, rax
test r9, r9
jne 0x14012fc65
mov eax, edi
add rbp, 4
add edi, 1
cmp ebx, eax
jle 0x14012fcf0
mov rcx, qword [r15]
cmp esi, 4
jne 0x14012fc20
mov r9d, dword [rcx + rbp]
test r9d, r9d
je 0x14012fc38
bswap r9d
mov r9d, r9d
test r9, r9
je 0x14012fc38
xor edx, edx
mov rax, r9
mov r8d, dword [rsp + 0x3c]
div r14
mov rcx, qword [r13 + rdx*8]
xor edx, edx
call sym.fts5IndexTombstoneAddToPage
test eax, eax
je 0x14012fc38
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x50]
test eax, eax
jne 0x14012fd26
mov rax, qword [r13]
mov rdx, qword [r15]
mov rax, qword [rax]
movzx edx, byte [rdx + 1]
mov byte [rax + 1], dl
call sym.sqlite3_free
mov rbx, qword [rsp + 0x68]
mov r9d, dword [rsp + 0x3c]
mov rdi, r13
add rbx, r13
test r9d, r9d
jle 0x14012fcd1
nop
mov rcx, qword [rdi]
add rdi, 8
call sym.sqlite3_free
cmp rdi, rbx
jne 0x14012fcc0
mov rcx, r13
call sym.sqlite3_free
mov eax, dword [rsp + 0x3c]
mov ebp, dword [rsp + 0x78]
lea eax, [rax + rax + 1]
mov dword [rsp + 0x3c], eax
jmp 0x14012f888
mov r11, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
test rdi, rdi
jne 0x14012fa49
mov rax, qword [r13]
mov rdx, qword [r15]
mov rcx, r11
mov edi, 1
mov rax, qword [rax]
movzx edx, byte [rdx + 1]
mov byte [rax + 1], dl
call sym.sqlite3_free
jmp 0x14012fa0a
call sym.sqlite3_free
test r13, r13
jne 0x14012fca9
jmp 0x14012fcd9
mov esi, dword [rsp + 0x74]
imul ebp, esi
lea edx, [rbp + 8]
test r14d, r14d
jle 0x14012fd9e
lea rbx, [r14*8]
xor r13d, r13d
mov qword [rsp + 0x68], rbx
jmp 0x14012f917
lock or qword [rsp], 0
jmp 0x14012f8d4
cmp qword [rsp + 0x68], 0
jle 0x14012fe47
mov edx, dword [rsp + 0x74]
mov rax, qword [rsp + 0x48]
mov r8d, dword [rsp + 0x3c]
imul edx, ebp
mov dword [rax + 0x3c], 7
add edx, 8
test r8d, r8d
jle 0x14012fd9e
mov eax, 7
xor r13d, r13d
jmp 0x14012f917
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x90]
mov r14, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x60]
call sym.sqlite3_free
jmp 0x14012fb61
movsxd rsi, eax
mov rax, qword [rsp + 0x80]
xor edx, edx
div rsi
mov dword [rsp + 0x70], edx
mov rsi, rdx
mov edx, dword [r12]
add edx, 0x10000
shl rdx, 0x25
add rdx, rsi
call sym.fts5DataRead
mov qword [rsp + 0x60], rax
mov rcx, rax
test rax, rax
je 0x14012fb61
mov r9, qword [rsp + 0x80]
mov r8d, dword [r12 + 0x20]
xor edx, edx
call sym.fts5IndexTombstoneAddToPage
test eax, eax
je 0x14012ff1f
mov eax, dword [r12 + 0x20]
xor r9d, r9d
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x60]
mov rax, qword [rax]
cmp byte [rax], 4
setne r9b
lea r9d, [r9*4 + 4]
jmp 0x14012f7ff
mov rax, qword [rsp + 0x48]
xor r13d, r13d
mov eax, dword [rax + 0x3c]
jmp 0x14012f901
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x90]
mov r14, qword [rsp + 0x98]
test r13, r13
je 0x14012fdb6
mov r15, qword [rsp + 0x68]
mov r10d, dword [rsp + 0x3c]
mov rbp, r13
add r15, r13
test r10d, r10d
jle 0x14012fe9f
mov rcx, qword [rbp]
add rbp, 8
call sym.sqlite3_free
cmp rbp, r15
jne 0x14012fe8d
mov rcx, r13
call sym.sqlite3_free
mov rcx, qword [rsp + 0x60]
call sym.sqlite3_free
jmp 0x14012fb61
mov dword [rsp + 0x3c], 1
mov ebp, 0x20
jmp 0x14012f85e
test eax, eax
je 0x14012fa08
mov rdi, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x90]
mov r14, qword [rsp + 0x98]
test r13, r13
jne 0x14012fe9f
jmp 0x14012fdb6
mov rax, qword [rsp + 0x60]
mov rax, qword [rax]
mov ebp, dword [rax + 4]
mov eax, 0x20
bswap ebp
shl ebp, 2
cmp ebp, eax
cmovl ebp, eax
cmp edx, ebp
jge 0x14012f85e
jmp 0x14012f84f
mov rcx, qword [rsp + 0x48]
mov r10d, dword [rcx + 0x3c]
test r10d, r10d
jne 0x14012fdb6
mov edx, dword [r12]
mov rax, qword [rsp + 0x60]
add edx, 0x10000
mov r9d, dword [rax + 8]
mov r8, qword [rax]
shl rdx, 0x25
add rdx, rsi
call sym.fts5DataWrite.part.0
jmp 0x14012fdb6
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x3c]
jmp 0x14012fb02
mov ecx, dword [rbx + 0x1c]
xor edi, edi
test ecx, ecx
jle 0x14012ff88
mov rax, rdi
add rdi, 1
shl rax, 4
mov rcx, qword [rbx + rax + 0x28]
call sym.sqlite3_free
cmp dword [rbx + 0x1c], edi
jg 0x14012ff6e
mov rcx, rbx
call sym.sqlite3_free
jmp 0x14012fbb1