Function at 0x140202f50
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
mov r12, rdx
mov r13, rcx
lea rdx, str.cannot_VACUUM_from_within_a_transaction
mov rbp, r9
cmp byte [r12 + 0x65], 0
je 0x140202fba
cmp dword [r12 + 0xd8], 1
lea rdx, str.cannot_VACUUM___SQL_statements_in_progress
jg 0x140202fba
mov esi, dword [r12 + 0x4c]
test r9, r9
je 0x1402031c0
movzx eax, word [r9 + 0x14]
lea rcx, [0x140387cc0]
mov rdx, rax
and edx, 0x3f
cmp byte [rcx + rdx], 3
je 0x140202ff8
lea rdx, str.non_text_filename
mov rcx, r12
call sym.sqlite3DbStrDup
mov rdx, qword [r13]
mov rbx, rax
test rdx, rdx
je 0x140202fd6
mov rcx, r12
call sym.sqlite3DbFreeNN
mov qword [r13], rbx
mov edi, 1
mov eax, edi
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 0x1402031d0
test al, 1
jne 0x1402031f0
mov edx, 1
mov rcx, rbp
mov dword [rsp + 0x120], r8d
call dbg.valueToText
mov r8d, dword [rsp + 0x120]
mov r9, rax
mov eax, dword [r12 + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [r12 + 0x4c], eax
mov eax, dword [r12 + 0x2c]
mov rbx, qword [r12 + 0x30]
mov rdx, r13
mov rcx, r12
mov rdi, qword [r12 + 0x78]
mov r15d, dword [r12 + 0x28]
mov dword [rsp + 0x2c], eax
or eax, 6
mov dword [r12 + 0x2c], eax
movabs rax, 0xfffffffeefffafff
and rax, rbx
mov qword [rsp + 0x20], rbx
movsxd rbx, r8d
lea r8, str.ATTACH__Q_AS_vacuum_db
or rax, 0x201
mov qword [rsp + 0x30], rdi
shl rbx, 5
mov rdi, qword [r12 + 0x80]
mov qword [r12 + 0x30], rax
mov rax, qword [r12 + 0x20]
mov qword [rsp + 0x38], rdi
movzx edi, byte [r12 + 0x6e]
add rax, rbx
mov byte [r12 + 0x6e], 0
mov r14, qword [rax + 8]
mov byte [rsp + 0x5e], dil
mov rdi, qword [rax]
mov dword [rsp + 0x50], r15d
mov rax, qword [r14 + 8]
mov qword [rsp + 0x48], rdi
mov rax, qword [rax]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x40], rax
call dbg.execSqlF
mov dword [r12 + 0x4c], esi
mov edi, eax
test eax, eax
jne 0x1402034e0
movsxd rsi, r15d
mov rax, qword [r12 + 0x20]
shl rsi, 5
add rsi, rax
mov r15, qword [rsi + 8]
test rbp, rbp
je 0x1402035a0
mov rdx, qword [r15 + 8]
mov rdx, qword [rdx]
mov rcx, qword [rdx + 0x48]
mov qword [rsp + 0x70], 0
mov r9, qword [rcx]
test r9, r9
je 0x140203150
lea r8, [rsp + 0x70]
mov rdx, r8
call qword [r9 + 0x30]
test eax, eax
jne 0x140203430
cmp qword [rsp + 0x70], 0
jg 0x140203430
mov rax, qword [r12 + 0x20]
mov edx, dword [r12 + 0x30]
or dword [r12 + 0x2c], 8
movzx edi, byte [rax + rbx + 0x10]
and edx, 0x38
or edi, edx
or edi, 0x20
cmp byte [r14 + 0x11], 0
je 0x140203540
mov eax, dword [r14 + 0x14]
cmp byte [r14 + 0x12], 0
lea edx, [rax + 1]
mov dword [r14 + 0x14], edx
jne 0x140203200
mov rcx, r14
call dbg.btreeLockCarefully
mov rax, qword [r14 + 8]
movzx ecx, byte [rax + 0x26]
mov r8d, dword [rax + 0x34]
sub r8d, dword [rax + 0x38]
cmp byte [r14 + 0x11], 0
mov dword [rsp + 0x58], ecx
mov dword [rsp + 0x54], r8d
je 0x140203225
mov eax, dword [r14 + 0x14]
sub eax, 1
jmp 0x140203219
lea r9, [0x14037be6e]
jmp 0x140203042
cmp byte [r9 + 0x16], 1
jne 0x14020300a
mov r9, qword [r9 + 8]
mov eax, esi
jmp 0x140203037
mov eax, esi
xor r9d, r9d
jmp 0x140203037
mov rdx, qword [r14 + 8]
movzx ecx, byte [rdx + 0x26]
mov r8d, dword [rdx + 0x34]
sub r8d, dword [rdx + 0x38]
mov dword [rsp + 0x58], ecx
mov dword [rsp + 0x54], r8d
mov dword [r14 + 0x14], eax
test eax, eax
je 0x140203560
mov rax, qword [r12 + 0x20]
mov rax, qword [rax + rbx + 0x18]
mov rcx, r15
mov edx, dword [rax + 0x74]
call sym.sqlite3BtreeSetCacheSize.isra.0
xor edx, edx
mov rcx, r14
call dbg.sqlite3BtreeSetSpillSize
mov rcx, r15
mov edx, eax
call dbg.sqlite3BtreeSetSpillSize
cmp byte [r15 + 0x11], 0
mov rbx, qword [r15 + 8]
je 0x14020326d
add dword [r15 + 0x14], 1
cmp byte [r15 + 0x12], 0
jne 0x14020326d
mov rcx, r15
call dbg.btreeLockCarefully
mov rcx, qword [rbx]
mov edx, edi
call sym.sqlite3PagerSetFlags
cmp byte [r15 + 0x11], 0
je 0x140203289
sub dword [r15 + 0x14], 1
je 0x1402035f0
lea r8, str.BEGIN
mov rdx, r13
mov rcx, r12
call dbg.execSql
mov edi, eax
test eax, eax
jne 0x14020345c
xor r8d, r8d
test rbp, rbp
je 0x1402035b0
xor edx, edx
mov rcx, r14
call sym.sqlite3BtreeBeginTrans
mov edi, eax
test eax, eax
jne 0x14020345c
mov byte [rsp + 0x5f], 0
mov rax, qword [r14 + 8]
mov edi, dword [rsp + 0x54]
mov ebx, dword [rsp + 0x58]
mov rcx, r15
mov edx, dword [rax + 0x34]
cmp edi, ebx
cmovge ebx, edi
xor r9d, r9d
mov r8d, ebx
call dbg.sqlite3BtreeSetPageSize
test eax, eax
jne 0x140203590
movabs rax, 0xff000000ff
test qword [rsp + 0x40], rax
je 0x140203570
cmp byte [r12 + 0x67], 0
jne 0x140203590
movsx edx, byte [r12 + 0x6a]
test dl, dl
js 0x1402035fd
mov rcx, r15
call dbg.sqlite3BtreeSetAutoVacuum
movzx eax, byte [rsp + 0x50]
mov rdx, r13
mov rcx, r12
mov rbx, qword [rsp + 0x48]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov byte [r12 + 0xc4], al
mov r9, rbx
call dbg.execSqlF
mov edi, eax
test eax, eax
jne 0x14020345c
mov r9, rbx
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r13
mov rcx, r12
call dbg.execSqlF
mov edi, eax
test eax, eax
jne 0x14020345c
mov r9, 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
mov rdx, r13
mov rcx, r12
mov byte [r12 + 0xc4], 0
call dbg.execSqlF
and dword [r12 + 0x2c], 0xfffffffb
mov edi, eax
test eax, eax
jne 0x14020345c
mov r9, rbx
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, r13
mov rcx, r12
call dbg.execSqlF
mov edi, eax
test eax, eax
jne 0x14020345c
lea rbx, [rsp + 0x6c]
mov qword [rsp + 0x40], rsi
mov edi, 1
lea rbp, [0x140386658]
mov rsi, rbx
lea r13, [rbp + 0xa]
mov rbx, r15
movzx r15d, dil
mov r8, rsi
mov rcx, r14
mov edx, r15d
call sym.sqlite3BtreeGetMeta
movzx r8d, byte [rbp + 1]
mov edx, r15d
mov rcx, rbx
add r8d, dword [rsp + 0x6c]
call dbg.sqlite3BtreeUpdateMeta
mov edi, eax
test eax, eax
jne 0x14020362a
add rbp, 2
cmp r13, rbp
je 0x14020360c
movzx edi, byte [rbp]
jmp 0x1402033e8
lea rdx, str.output_file_already_exists
mov rcx, r12
call sym.sqlite3DbStrDup
mov rdx, qword [r13]
mov rbx, rax
test rdx, rdx
je 0x140203453
mov rcx, r12
call sym.sqlite3DbFreeNN
mov qword [r13], rbx
mov edi, 1
mov eax, dword [rsp + 0x2c]
mov r9d, 1
xor r8d, r8d
mov rcx, r14
mov byte [r12 + 0xc4], 0
mov edx, 0xffffffff
mov dword [r12 + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [r12 + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [r12 + 0x78], rax
mov rax, qword [rsp + 0x38]
mov qword [r12 + 0x80], rax
movzx eax, byte [rsp + 0x5e]
mov byte [r12 + 0x6e], al
call dbg.sqlite3BtreeSetPageSize
mov byte [r12 + 0x65], 1
mov rcx, qword [rsi + 8]
call sym.sqlite3BtreeClose.isra.0
mov qword [rsi + 8], 0
mov qword [rsi + 0x18], 0
mov rcx, r12
call dbg.sqlite3ResetAllSchemasOfConnection
jmp 0x140202fdf
mov eax, dword [rsp + 0x2c]
mov r9d, 1
xor r8d, r8d
mov rcx, r14
mov byte [r12 + 0xc4], 0
mov edx, 0xffffffff
mov dword [r12 + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [r12 + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [r12 + 0x78], rax
mov rax, qword [rsp + 0x38]
mov qword [r12 + 0x80], rax
movzx eax, byte [rsp + 0x5e]
mov byte [r12 + 0x6e], al
call dbg.sqlite3BtreeSetPageSize
mov byte [r12 + 0x65], 1
jmp 0x1402034ce
mov rdx, qword [r14 + 8]
movzx ecx, byte [rdx + 0x26]
mov r8d, dword [rdx + 0x34]
sub r8d, dword [rdx + 0x38]
mov dword [rsp + 0x58], ecx
mov dword [rsp + 0x54], r8d
jmp 0x14020322a
mov rcx, r14
call dbg.unlockBtreeMutex
jmp 0x140203225
mov edx, dword [r12 + 0x74]
xor r9d, r9d
mov r8d, ebx
mov rcx, r15
call dbg.sqlite3BtreeSetPageSize
test eax, eax
je 0x140203309
nop dword [rax + rax]
mov edi, 7
jmp 0x14020345c
mov edi, 0x21
jmp 0x140203168
mov edx, 2
mov rcx, r14
call sym.sqlite3BtreeBeginTrans
mov edi, eax
test eax, eax
jne 0x14020345c
mov rax, qword [r14 + 8]
mov byte [rsp + 0x5f], 1
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
jne 0x1402032ce
mov dword [r12 + 0x74], 0
jmp 0x1402032ce
mov rcx, r15
call dbg.unlockBtreeMutex
jmp 0x140203289
mov rcx, r14
call dbg.sqlite3BtreeGetAutoVacuum
mov edx, eax
jmp 0x140203323
cmp byte [rsp + 0x5f], 0
mov rsi, qword [rsp + 0x40]
mov r15, rbx
jne 0x140203634
mov rcx, rbx
call dbg.sqlite3BtreeCommit
mov edi, eax
jmp 0x14020345c
mov rsi, qword [rsp + 0x40]
jmp 0x14020345c
cmp byte [r14 + 0x11], 0
je 0x14020364f
add dword [r14 + 0x14], 1
cmp byte [r14 + 0x12], 0
jne 0x14020364f
mov rcx, r14
call dbg.btreeLockCarefully
cmp byte [r15 + 0x11], 0
je 0x14020366a
add dword [r15 + 0x14], 1
cmp byte [r15 + 0x12], 0
jne 0x14020366a
mov rcx, r15
call dbg.btreeLockCarefully
mov rax, qword [r14 + 8]
lea r8, [rsp + 0x70]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov r9, qword [rcx]
test r9, r9
je 0x1402036b9
mov rdx, qword [r15 + 8]
lea r8, [rsp + 0x70]
mov qword [rsp + 0x40], r8
movsxd rax, dword [rdx + 0x34]
mov edx, dword [rdx + 0x40]
imul rax, rdx
mov edx, 0xb
mov qword [rsp + 0x70], rax
call qword [r9 + 0x50]
mov r8, qword [rsp + 0x40]
test eax, eax
mov edi, eax
je 0x1402036b9
cmp eax, 0xc
jne 0x14020371a
mov rdi, r8
xor eax, eax
mov ecx, 0x12
mov edx, 0x7fffffff
rep stosd dword [rdi], eax
mov rcx, r8
mov qword [rsp + 0x40], r8
mov rax, qword [r15]
mov qword [rsp + 0x98], r15
mov qword [rsp + 0x78], r14
mov qword [rsp + 0x90], rax
mov dword [rsp + 0x88], 1
call dbg.sqlite3_backup_step
mov r8, qword [rsp + 0x40]
mov rcx, r8
call dbg.sqlite3_backup_finish
mov edi, eax
test eax, eax
jne 0x140203791
mov rax, qword [r14 + 8]
and word [rax + 0x28], 0xfffd
cmp byte [r15 + 0x11], 0
je 0x14020372c
sub dword [r15 + 0x14], 1
je 0x1402037e2
cmp byte [r14 + 0x11], 0
je 0x14020373e
sub dword [r14 + 0x14], 1
je 0x1402037d5
test edi, edi
jne 0x14020345c
mov rcx, r15
call dbg.sqlite3BtreeCommit
mov edi, eax
test eax, eax
jne 0x14020345c
mov rcx, r15
call dbg.sqlite3BtreeGetAutoVacuum
mov rcx, r14
mov edx, eax
call dbg.sqlite3BtreeSetAutoVacuum
mov rcx, r15
call sym.sqlite3BtreeGetRequestedReserve
mov r9d, 1
mov rcx, r14
mov r8d, eax
mov rax, qword [r15 + 8]
mov edx, dword [rax + 0x34]
call dbg.sqlite3BtreeSetPageSize
mov edi, eax
jmp 0x14020345c
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 8]
mov rax, qword [rax]
cmp byte [rax + 0x10], 0
jne 0x14020371a
add dword [rax + 0x84], 1
mov rdx, qword [rax + 0x70]
jmp 0x1402037bf
mov dword [rdx + 0x18], 1
mov rdx, qword [rdx + 0x40]
test rdx, rdx
jne 0x1402037b4
mov rcx, qword [rax + 0x120]
call dbg.sqlite3PcacheTruncate
jmp 0x14020371a
mov rcx, r14
call dbg.unlockBtreeMutex
jmp 0x14020373e
mov rcx, r15
call dbg.unlockBtreeMutex
jmp 0x14020372c