Function at 0x1401d0460
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
movaps xmmword [rsp + 0xb0], xmm6
mov rbx, rdx
mov rdi, rcx
mov ebp, r8d
cmp byte [rbx + 0x65], 0
lea rdx, str.cannot_VACUUM_from_within_a_transaction
mov rsi, r9
je 0x1401d04cd
cmp dword [rbx + 0xd8], 1
jg 0x1401d08f0
test r9, r9
mov r12d, dword [rbx + 0x4c]
je 0x1401d0900
movzx eax, word [r9 + 0x14]
lea rcx, [0x140342d80]
mov rdx, rax
and edx, 0x3f
cmp byte [rcx + rdx], 3
je 0x1401d0510
lea rdx, str.non_text_filename
mov rcx, rbx
call sym.sqlite3DbStrDup
mov rdx, qword [rdi]
mov rsi, rax
test rdx, rdx
je 0x1401d04e8
mov rcx, rbx
call sym.sqlite3DbFreeNN
mov qword [rdi], rsi
mov r15d, 1
movaps xmm6, xmmword [rsp + 0xb0]
mov eax, r15d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov edx, eax
and dx, 0x202
cmp dx, 0x202
je 0x1401d0910
test al, 1
jne 0x1401d0930
mov edx, 1
mov rcx, rsi
call dbg.valueToText
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
mov eax, dword [rbx + 0x2c]
lea r8, str.ATTACH__Q_AS_vacuum_db
movsxd r15, ebp
mov rcx, qword [rbx + 0x30]
shl r15, 5
movzx edx, byte [rbx + 0x6e]
mov byte [rbx + 0x6e], 0
mov r13d, dword [rbx + 0x28]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], eax
or eax, 6
movdqu xmm6, xmmword [rbx + 0x78]
mov dword [rbx + 0x2c], eax
movabs rax, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x20], rcx
or rax, 0x201
mov byte [rsp + 0x2f], dl
mov rdx, rdi
mov qword [rbx + 0x30], rax
mov rax, r15
add rax, qword [rbx + 0x20]
mov dword [rsp + 0x48], r13d
mov r14, qword [rax + 8]
mov rcx, qword [rax]
mov rax, qword [r14 + 8]
mov qword [rsp + 0x40], rcx
mov rcx, rbx
mov rax, qword [rax]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x38], rax
call dbg.execSqlF
mov dword [rbx + 0x4c], r12d
test eax, eax
mov r15d, eax
jne 0x1401d0940
mov rax, qword [rbx + 0x20]
movsxd r12, r13d
shl r12, 5
add r12, rax
test rsi, rsi
mov r13, qword [r12 + 8]
je 0x1401d0a20
mov rdx, qword [r13 + 8]
mov rdx, qword [rdx]
mov rcx, qword [rdx + 0x48]
mov qword [rsp + 0x60], 0
mov r8, qword [rcx]
test r8, r8
je 0x1401d0639
lea r9, [rsp + 0x60]
mov rdx, r9
call qword [r8 + 0x30]
test eax, eax
jne 0x1401d0988
cmp qword [rsp + 0x60], 0
jg 0x1401d0988
mov rax, qword [rbx + 0x20]
mov rcx, qword [rsp + 0x30]
mov edx, dword [rbx + 0x30]
or dword [rbx + 0x2c], 8
movzx eax, byte [rax + rcx + 0x10]
and edx, 0x38
or eax, edx
or eax, 0x20
mov r15d, eax
mov rcx, r14
call sym.sqlite3BtreeGetRequestedReserve
mov edx, dword [rbx + 0x74]
mov dword [rsp + 0x4c], eax
test edx, edx
jne 0x1401d09c0
mov rcx, qword [rsp + 0x30]
mov rax, qword [rbx + 0x20]
mov rax, qword [rax + rcx + 0x18]
mov rcx, r13
mov edx, dword [rax + 0x74]
call sym.sqlite3BtreeSetCacheSize.isra.0
xor edx, edx
mov rcx, r14
call dbg.sqlite3BtreeSetSpillSize
mov rcx, r13
mov edx, eax
call dbg.sqlite3BtreeSetSpillSize
cmp byte [r13 + 0x11], 0
mov rbp, qword [r13 + 8]
je 0x1401d06b8
add dword [r13 + 0x14], 1
cmp byte [r13 + 0x12], 0
jne 0x1401d06b8
mov rcx, r13
call dbg.btreeLockCarefully
mov rcx, qword [rbp]
mov edx, r15d
call sym.sqlite3PagerSetFlags
cmp byte [r13 + 0x11], 0
je 0x1401d06d6
sub dword [r13 + 0x14], 1
je 0x1401d0a30
lea r8, str.BEGIN
mov rdx, rdi
mov rcx, rbx
call dbg.execSql
test eax, eax
mov r15d, eax
jne 0x1401d0880
test rsi, rsi
mov rcx, r14
sete dl
sete bpl
xor r8d, r8d
movzx edx, dl
add edx, edx
call dbg.sqlite3BtreeBeginTrans
test eax, eax
mov r15d, eax
jne 0x1401d0880
mov rax, qword [r14 + 8]
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
jne 0x1401d0738
test bpl, bpl
je 0x1401d0738
mov dword [rbx + 0x74], 0
nop dword [rax]
mov edx, dword [rax + 0x34]
xor r9d, r9d
mov rcx, r13
mov r8d, dword [rsp + 0x4c]
call dbg.sqlite3BtreeSetPageSize
test eax, eax
jne 0x1401d0a10
movabs rax, 0xff000000ff
test qword [rsp + 0x38], rax
je 0x1401d09f0
cmp byte [rbx + 0x67], 0
jne 0x1401d0a10
movsx edx, byte [rbx + 0x6a]
test dl, dl
js 0x1401d0a3d
mov rcx, r13
call dbg.sqlite3BtreeSetAutoVacuum
movzx eax, byte [rsp + 0x48]
mov rdx, rdi
mov rcx, rbx
mov rbp, qword [rsp + 0x40]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov byte [rbx + 0xc4], al
mov r9, rbp
call dbg.execSqlF
test eax, eax
mov r15d, eax
jne 0x1401d0880
mov r9, rbp
mov rdx, rdi
mov rcx, rbx
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
call dbg.execSqlF
test eax, eax
mov r15d, eax
jne 0x1401d0880
mov byte [rbx + 0xc4], 0
mov r9, rbp
mov rdx, rdi
mov rcx, rbx
lea r8, str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
call dbg.execSqlF
and dword [rbx + 0x2c], 0xfffffffb
test eax, eax
mov r15d, eax
jne 0x1401d0880
mov r9, rbp
mov rdx, rdi
mov rcx, rbx
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
call dbg.execSqlF
test eax, eax
mov r15d, eax
jne 0x1401d0880
lea rdi, [0x1403415f8]
lea rax, [rsp + 0x5c]
lea rbp, [rdi + 0xa]
mov qword [rsp + 0x30], rax
movzx r15d, byte [rdi]
mov rcx, r14
mov r8, qword [rsp + 0x30]
mov edx, r15d
call sym.sqlite3BtreeGetMeta
movzx r8d, byte [rdi + 1]
mov edx, r15d
mov rcx, r13
add r8d, dword [rsp + 0x5c]
call dbg.sqlite3BtreeUpdateMeta
test eax, eax
mov r15d, eax
jne 0x1401d0880
add rdi, 2
cmp rbp, rdi
jne 0x1401d0832
test rsi, rsi
je 0x1401d0a4c
mov rcx, r13
call dbg.sqlite3BtreeCommit
mov r15d, eax
nop
mov eax, dword [rsp + 0x28]
mov r9d, 1
xor r8d, r8d
mov rcx, r14
mov edx, 0xffffffff
mov byte [rbx + 0xc4], 0
movups xmmword [rbx + 0x78], xmm6
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [rbx + 0x30], rax
movzx eax, byte [rsp + 0x2f]
mov byte [rbx + 0x6e], al
call dbg.sqlite3BtreeSetPageSize
mov byte [rbx + 0x65], 1
mov rcx, qword [r12 + 8]
call sym.sqlite3BtreeClose.isra.0
mov qword [r12 + 8], 0
mov qword [r12 + 0x18], 0
mov rcx, rbx
call dbg.sqlite3ResetAllSchemasOfConnection
jmp 0x1401d04f1
lea rdx, str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x1401d04cd
lea r9, [0x1403370ef]
jmp 0x1401d0546
cmp byte [r9 + 0x16], 1
jne 0x1401d0522
mov r9, qword [r9 + 8]
mov eax, r12d
jmp 0x1401d053d
mov eax, r12d
xor r9d, r9d
jmp 0x1401d053d
mov eax, dword [rsp + 0x28]
movups xmmword [rbx + 0x78], xmm6
xor r8d, r8d
mov edx, 0xffffffff
mov byte [rbx + 0xc4], 0
mov r9d, 1
mov rcx, r14
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [rbx + 0x30], rax
movzx eax, byte [rsp + 0x2f]
mov byte [rbx + 0x6e], al
call dbg.sqlite3BtreeSetPageSize
mov byte [rbx + 0x65], 1
jmp 0x1401d08d9
lea rdx, str.output_file_already_exists
mov rcx, rbx
call sym.sqlite3DbStrDup
mov rdx, qword [rdi]
mov rsi, rax
test rdx, rdx
je 0x1401d09aa
mov rcx, rbx
call sym.sqlite3DbFreeNN
mov qword [rdi], rsi
mov r15d, 1
jmp 0x1401d0880
lea r9, [rsp + 0x5c]
mov edx, ebp
mov rcx, rbx
lea r8, [rsp + 0x60]
call dbg.sqlcipherCodecGetKey
mov eax, dword [rsp + 0x5c]
test eax, eax
je 0x1401d066c
mov dword [rbx + 0x74], 0
jmp 0x1401d066c
mov edx, dword [rbx + 0x74]
xor r9d, r9d
mov rcx, r13
mov r8d, dword [rsp + 0x4c]
call dbg.sqlite3BtreeSetPageSize
test eax, eax
je 0x1401d0768
nop dword [rax + rax]
mov r15d, 7
jmp 0x1401d0880
mov r15d, 0x21
jmp 0x1401d0655
mov rcx, r13
call dbg.unlockBtreeMutex
jmp 0x1401d06d6
mov rcx, r14
call dbg.sqlite3BtreeGetAutoVacuum
mov edx, eax
jmp 0x1401d077e
cmp byte [r14 + 0x11], 0
je 0x1401d0a67
add dword [r14 + 0x14], 1
cmp byte [r14 + 0x12], 0
jne 0x1401d0a67
mov rcx, r14
call dbg.btreeLockCarefully
cmp byte [r13 + 0x11], 0
je 0x1401d0a82
add dword [r13 + 0x14], 1
cmp byte [r13 + 0x12], 0
jne 0x1401d0a82
mov rcx, r13
call dbg.btreeLockCarefully
mov rax, qword [r14 + 8]
lea r9, [rsp + 0x60]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov r10, qword [rcx]
test r10, r10
je 0x1401d0ad9
mov rdx, qword [r13 + 8]
lea r9, [rsp + 0x60]
mov r8, r9
mov qword [rsp + 0x30], r9
movsxd rax, dword [rdx + 0x34]
mov edx, dword [rdx + 0x40]
imul rax, rdx
mov edx, 0xb
mov qword [rsp + 0x60], rax
call qword [r10 + 0x50]
mov r9, qword [rsp + 0x30]
test eax, eax
mov r15d, eax
je 0x1401d0ad9
cmp eax, 0xc
jne 0x1401d0c21
xor eax, eax
mov ecx, 0x12
mov rdi, r9
rep stosd dword [rdi], eax
movq xmm1, r13
movq xmm0, qword [r13]
mov qword [rsp + 0x68], r14
mov dword [rsp + 0x78], 1
punpcklqdq xmm0, xmm1
movaps xmmword [rsp + 0x80], xmm0
mov rax, qword [r14 + 8]
mov rdx, qword [r13 + 8]
mov rax, qword [rax]
mov rdx, qword [rdx]
movsx r8d, word [rdx + 0xb2]
cmp word [rax + 0xb2], r8w
je 0x1401d0b57
mov r10, qword [rax + 0x120]
mov word [rax + 0xb2], r8w
test r10, r10
je 0x1401d0b57
mov qword [rsp + 0x30], r9
mov rcx, qword [rax + 0x130]
mov edx, dword [rax + 0xc8]
call r10
mov r9, qword [rsp + 0x30]
mov rcx, r9
mov edx, 0x7fffffff
mov qword [rsp + 0x30], r9
call dbg.sqlite3_backup_step
mov rcx, qword [rsp + 0x30]
call dbg.sqlite3_backup_finish
test eax, eax
mov r15d, eax
jne 0x1401d0be6
mov rax, qword [r14 + 8]
and word [rax + 0x28], 0xfffd
cmp byte [r13 + 0x11], 0
jne 0x1401d0c4b
cmp byte [r14 + 0x11], 0
jne 0x1401d0c6e
mov rcx, r13
call dbg.sqlite3BtreeCommit
test eax, eax
mov r15d, eax
jne 0x1401d0880
mov rcx, r13
call dbg.sqlite3BtreeGetAutoVacuum
mov rcx, r14
mov edx, eax
call dbg.sqlite3BtreeSetAutoVacuum
mov rcx, r13
call sym.sqlite3BtreeGetRequestedReserve
mov r9d, 1
mov rcx, r14
mov r8d, eax
mov rax, qword [r13 + 8]
mov edx, dword [rax + 0x34]
call dbg.sqlite3BtreeSetPageSize
mov r15d, eax
jmp 0x1401d0880
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 8]
mov rax, qword [rax]
cmp byte [rax + 0x10], 0
jne 0x1401d0c21
add dword [rax + 0x84], 1
mov rdx, qword [rax + 0x70]
jmp 0x1401d0c10
mov dword [rdx + 0x18], 1
mov rdx, qword [rdx + 0x40]
test rdx, rdx
jne 0x1401d0c05
mov rcx, qword [rax + 0x140]
call dbg.sqlite3PcacheTruncate
cmp byte [r13 + 0x11], 0
jne 0x1401d0c4b
cmp byte [r14 + 0x11], 0
je 0x1401d0880
sub dword [r14 + 0x14], 1
jne 0x1401d0880
mov rcx, r14
call dbg.unlockBtreeMutex
jmp 0x1401d0880
sub dword [r13 + 0x14], 1
je 0x1401d0c86
cmp byte [r14 + 0x11], 0
je 0x1401d0c60
sub dword [r14 + 0x14], 1
je 0x1401d0c90
test r15d, r15d
jne 0x1401d0880
jmp 0x1401d0b99
sub dword [r14 + 0x14], 1
jne 0x1401d0b99
mov rcx, r14
call dbg.unlockBtreeMutex
jmp 0x1401d0b99
mov rcx, r13
call dbg.unlockBtreeMutex
jmp 0x1401d0c52
mov rcx, r14
call dbg.unlockBtreeMutex
jmp 0x1401d0c60