Function at 0x1403c4420
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
cmp byte [rdx + 0x61], 0
mov r13, rcx
mov r12, rdx
mov rdi, r9
je 0x1403c4690
cmp dword [rdx + 0xd0], 1
jg 0x1403c4660
mov esi, dword [rdx + 0x4c]
test r9, r9
je 0x1403c46c0
movzx eax, word [r9 + 8]
lea rcx, [0x140762280]
mov rdx, rax
and edx, 0x3f
cmp byte [rcx + rdx], 3
je 0x1403c44c0
mov rdx, qword [r13]
test rdx, rdx
je 0x1403c4488
mov rcx, r12
call sym.sqlite3DbFreeNN
lea rdx, str.non_text_filename
mov rcx, r12
mov r14d, 1
call sym.sqlite3DbStrDup
mov qword [r13], rax
mov eax, r14d
add rsp, 0xb8
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 0x1403c46d0
test al, 1
jne 0x1403c46f0
mov edx, 1
mov rcx, rdi
mov dword [rsp + 0x110], r8d
call dbg.valueToText
mov r8d, dword [rsp + 0x110]
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 ecx, dword [r12 + 0x78]
mov ebp, 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 dword [rsp + 0x30], ecx
shl rbx, 5
mov ecx, dword [r12 + 0x7c]
mov qword [r12 + 0x30], rax
mov rax, qword [r12 + 0x20]
mov dword [rsp + 0x34], ecx
movzx ecx, byte [r12 + 0x6a]
add rax, rbx
mov byte [r12 + 0x6a], 0
mov r15, qword [rax + 8]
mov byte [rsp + 0x42], cl
mov rcx, qword [rax]
mov dword [rsp + 0x44], ebp
mov rax, qword [r15 + 8]
mov qword [rsp + 0x38], rcx
mov rcx, r12
mov rax, qword [rax]
movzx eax, byte [rax + 0x10]
mov byte [rsp + 0x43], al
call dbg.execSqlF
mov dword [r12 + 0x4c], esi
mov r14d, eax
test eax, eax
jne 0x1403c49f8
movsxd rsi, ebp
shl rsi, 5
add rsi, qword [r12 + 0x20]
mov rbp, qword [rsi + 8]
test rdi, rdi
je 0x1403c460a
mov rax, qword [rbp + 8]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov qword [rsp + 0x60], 0
mov rax, qword [rcx]
test rax, rax
je 0x1403c4604
lea r8, [rsp + 0x60]
mov rdx, r8
call qword [rax + 0x30]
test eax, eax
jne 0x1403c4950
cmp qword [rsp + 0x60], 0
jg 0x1403c4950
or dword [r12 + 0x2c], 8
cmp byte [r15 + 0x11], 0
je 0x1403c4700
mov eax, dword [r15 + 0x14]
cmp byte [r15 + 0x12], 0
lea edx, [rax + 1]
mov dword [r15 + 0x14], edx
jne 0x1403c4a90
mov rcx, r15
call dbg.btreeLockCarefully
mov rax, qword [r15 + 8]
movzx ecx, byte [rax + 0x26]
mov edx, dword [rax + 0x34]
sub edx, dword [rax + 0x38]
cmp byte [r15 + 0x11], 0
mov dword [rsp + 0x4c], ecx
mov dword [rsp + 0x48], edx
je 0x1403c4716
mov eax, dword [r15 + 0x14]
sub eax, 1
jmp 0x1403c4aa6
mov rdx, qword [rcx]
test rdx, rdx
je 0x1403c4670
mov rcx, r12
call sym.sqlite3DbFreeNN
lea rdx, str.cannot_VACUUM___SQL_statements_in_progress
mov rcx, r12
mov r14d, 1
call sym.sqlite3DbStrDup
mov qword [r13], rax
jmp 0x1403c44a1
mov rdx, qword [rcx]
test rdx, rdx
je 0x1403c46a0
mov rcx, r12
call sym.sqlite3DbFreeNN
lea rdx, str.cannot_VACUUM_from_within_a_transaction
mov rcx, r12
mov r14d, 1
call sym.sqlite3DbStrDup
mov qword [r13], rax
jmp 0x1403c44a1
lea r9, [0x1407576ce]
jmp 0x1403c450a
cmp byte [r9 + 0xa], 1
jne 0x1403c44d2
mov r9, qword [r9 + 0x10]
mov eax, esi
jmp 0x1403c44ff
mov eax, esi
xor r9d, r9d
jmp 0x1403c44ff
mov rax, qword [r15 + 8]
movzx ecx, byte [rax + 0x26]
mov edx, dword [rax + 0x34]
sub edx, dword [rax + 0x38]
mov dword [rsp + 0x4c], ecx
mov dword [rsp + 0x48], edx
mov rax, qword [r12 + 0x20]
mov rcx, rbp
mov rax, qword [rax + rbx + 0x18]
mov edx, dword [rax + 0x74]
call sym.sqlite3BtreeSetCacheSize.isra.0
xor edx, edx
mov rcx, r15
call dbg.sqlite3BtreeSetSpillSize
mov rcx, rbp
mov edx, eax
call dbg.sqlite3BtreeSetSpillSize
cmp byte [rbp + 0x11], 0
mov rbx, qword [rbp + 8]
je 0x1403c4a50
add dword [rbp + 0x14], 1
cmp byte [rbp + 0x12], 0
jne 0x1403c4a70
mov rcx, rbp
call dbg.btreeLockCarefully
movzx edx, byte [rbp + 0x11]
mov rax, qword [rbx]
and byte [rax + 0x18], 0xfe
mov byte [rax + 0xb], 1
mov dword [rax + 0xc], 0
test dl, dl
je 0x1403c4787
sub dword [rbp + 0x14], 1
je 0x1403c4ac0
lea r8, str.BEGIN
mov rdx, r13
mov rcx, r12
call dbg.execSql
mov r14d, eax
test eax, eax
jne 0x1403c497a
test rdi, rdi
mov eax, 2
mov rcx, r15
cmove r14d, eax
xor r8d, r8d
mov edx, r14d
call dbg.sqlite3BtreeBeginTrans
mov r14d, eax
test eax, eax
jne 0x1403c497a
mov rax, qword [r15 + 8]
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
je 0x1403c4b00
mov ecx, dword [rsp + 0x48]
mov ebx, dword [rsp + 0x4c]
mov edx, dword [rax + 0x34]
cmp ecx, ebx
cmovge ebx, ecx
xor r9d, r9d
mov rcx, rbp
mov r8d, ebx
call dbg.sqlite3BtreeSetPageSize
test eax, eax
jne 0x1403c4af0
cmp byte [rsp + 0x43], 0
je 0x1403c4ad0
cmp byte [r12 + 0x63], 0
jne 0x1403c4af0
movsx edx, byte [r12 + 0x66]
test dl, dl
js 0x1403c4b0e
mov rcx, rbp
call dbg.sqlite3BtreeSetAutoVacuum
movzx eax, byte [rsp + 0x44]
mov rdx, r13
mov rcx, r12
mov r9, qword [rsp + 0x38]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov byte [r12 + 0xbc], al
call dbg.execSqlF
mov r14d, eax
test eax, eax
jne 0x1403c497a
mov r9, qword [rsp + 0x38]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r13
mov rcx, r12
call dbg.execSqlF
mov r14d, eax
test eax, eax
jne 0x1403c497a
mov byte [r12 + 0xbc], 0
mov r9, qword [rsp + 0x38]
mov rdx, r13
mov rcx, r12
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 [r12 + 0x2c], 0xfffffffb
mov r14d, eax
test eax, eax
jne 0x1403c497a
mov r9, qword [rsp + 0x38]
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 r14d, eax
test eax, eax
jne 0x1403c497a
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x118], rdi
mov rdi, r15
mov r15, qword [rsp + 0x118]
mov dword [rsp + 0x38], ebx
lea r13, [0x140760cb8]
mov r14d, 1
mov rbx, rax
mov edx, r14d
mov r8, rbx
mov rcx, rdi
call sym.sqlite3BtreeGetMeta
movzx r8d, byte [r13 + 1]
mov edx, r14d
mov rcx, rbp
add r8d, dword [rsp + 0x5c]
call dbg.sqlite3BtreeUpdateMeta
mov r14d, eax
test eax, eax
jne 0x1403c4b49
add r13, 2
lea rax, [0x140760cc2]
cmp rax, r13
je 0x1403c4b1d
movzx r14d, byte [r13]
jmp 0x1403c48fd
mov rdx, qword [r13]
test rdx, rdx
je 0x1403c4961
mov rcx, r12
call sym.sqlite3DbFreeNN
lea rdx, str.output_file_already_exists
mov rcx, r12
mov r14d, 1
call sym.sqlite3DbStrDup
mov qword [r13], rax
mov eax, dword [rsp + 0x2c]
mov r9d, 1
xor r8d, r8d
mov rcx, r15
mov byte [r12 + 0xbc], 0
mov edx, 0xffffffff
mov dword [r12 + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [r12 + 0x30], rax
mov eax, dword [rsp + 0x30]
mov dword [r12 + 0x78], eax
mov eax, dword [rsp + 0x34]
mov dword [r12 + 0x7c], eax
movzx eax, byte [rsp + 0x42]
mov byte [r12 + 0x6a], al
call dbg.sqlite3BtreeSetPageSize
mov byte [r12 + 0x61], 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 0x1403c44a1
mov eax, dword [rsp + 0x2c]
mov r9d, 1
xor r8d, r8d
mov rcx, r15
mov byte [r12 + 0xbc], 0
mov edx, 0xffffffff
mov dword [r12 + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [r12 + 0x30], rax
mov eax, dword [rsp + 0x30]
mov dword [r12 + 0x78], eax
mov eax, dword [rsp + 0x34]
mov dword [r12 + 0x7c], eax
movzx eax, byte [rsp + 0x42]
mov byte [r12 + 0x6a], al
call dbg.sqlite3BtreeSetPageSize
mov byte [r12 + 0x61], 1
jmp 0x1403c49e7
mov rax, qword [rbx]
and byte [rax + 0x18], 0xfe
mov byte [rax + 0xb], 1
mov dword [rax + 0xc], 0
jmp 0x1403c4787
mov rax, qword [rbx]
and byte [rax + 0x18], 0xfe
mov byte [rax + 0xb], 1
mov dword [rax + 0xc], 0
jmp 0x1403c477d
mov rdx, qword [r15 + 8]
movzx ecx, byte [rdx + 0x26]
mov dword [rsp + 0x4c], ecx
mov ecx, dword [rdx + 0x34]
sub ecx, dword [rdx + 0x38]
mov dword [rsp + 0x48], ecx
mov dword [r15 + 0x14], eax
test eax, eax
jne 0x1403c4716
mov rcx, r15
call dbg.unlockBtreeMutex
jmp 0x1403c4716
mov rcx, rbp
call dbg.unlockBtreeMutex
jmp 0x1403c4787
mov edx, dword [r12 + 0x70]
xor r9d, r9d
mov r8d, ebx
mov rcx, rbp
call dbg.sqlite3BtreeSetPageSize
test eax, eax
je 0x1403c480b
nop dword [rax + rax]
mov r14d, 7
jmp 0x1403c497a
mov dword [r12 + 0x70], 0
jmp 0x1403c47da
mov rcx, r15
call dbg.sqlite3BtreeGetAutoVacuum
mov edx, eax
jmp 0x1403c4825
mov qword [rsp + 0x118], r15
mov r15, rdi
mov ebx, dword [rsp + 0x38]
mov rdi, qword [rsp + 0x118]
test rdi, rdi
je 0x1403c4b51
mov rcx, rbp
call dbg.sqlite3BtreeCommit
mov r14d, eax
jmp 0x1403c497a
mov r15, rdi
jmp 0x1403c497a
cmp byte [r15 + 0x11], 0
je 0x1403c4b6c
add dword [r15 + 0x14], 1
cmp byte [r15 + 0x12], 0
jne 0x1403c4b6c
mov rcx, r15
call dbg.btreeLockCarefully
cmp byte [rbp + 0x11], 0
je 0x1403c4b84
add dword [rbp + 0x14], 1
cmp byte [rbp + 0x12], 0
jne 0x1403c4b84
mov rcx, rbp
call dbg.btreeLockCarefully
mov rax, qword [r15 + 8]
lea r8, [rsp + 0x60]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov r9, qword [rcx]
test r9, r9
je 0x1403c4bd4
mov rdx, qword [rbp + 8]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x38], r8
movsxd rax, dword [rdx + 0x34]
mov edx, dword [rdx + 0x40]
imul rax, rdx
mov edx, 0xb
mov qword [rsp + 0x60], rax
call qword [r9 + 0x50]
mov r8, qword [rsp + 0x38]
cmp eax, 0xc
mov r14d, eax
je 0x1403c4bd4
test eax, eax
jne 0x1403c4c30
mov rdi, r8
xor eax, eax
mov ecx, 0x12
mov edx, 0x7fffffff
rep stosd dword [rdi], eax
mov rcx, r8
mov qword [rsp + 0x38], r8
mov rax, qword [rbp]
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x78], 1
call dbg.sqlite3_backup_step
mov r8, qword [rsp + 0x38]
mov rcx, r8
call dbg.sqlite3_backup_finish
mov r14d, eax
test eax, eax
jne 0x1403c4ca0
mov rax, qword [r15 + 8]
and word [rax + 0x28], 0xfffd
cmp byte [rbp + 0x11], 0
je 0x1403c4c40
sub dword [rbp + 0x14], 1
je 0x1403c4cf1
cmp byte [r15 + 0x11], 0
je 0x1403c4c52
sub dword [r15 + 0x14], 1
je 0x1403c4ce4
test r14d, r14d
jne 0x1403c497a
mov rcx, rbp
call dbg.sqlite3BtreeCommit
mov r14d, eax
test eax, eax
jne 0x1403c497a
mov rcx, rbp
call dbg.sqlite3BtreeGetAutoVacuum
mov rcx, r15
mov edx, eax
call dbg.sqlite3BtreeSetAutoVacuum
mov rax, qword [rbp + 8]
mov r8d, ebx
mov rcx, r15
mov r9d, 1
mov edx, dword [rax + 0x34]
call dbg.sqlite3BtreeSetPageSize
mov r14d, eax
jmp 0x1403c497a
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 8]
mov rax, qword [rax]
cmp byte [rax + 0x10], 0
jne 0x1403c4c30
add dword [rax + 0x84], 1
mov rdx, qword [rax + 0x70]
jmp 0x1403c4cce
mov dword [rdx + 0x18], 1
mov rdx, qword [rdx + 0x40]
test rdx, rdx
jne 0x1403c4cc3
mov rcx, qword [rax + 0x118]
call dbg.sqlite3PcacheTruncate
jmp 0x1403c4c30
mov rcx, r15
call dbg.unlockBtreeMutex
jmp 0x1403c4c52
mov rcx, rbp
call dbg.unlockBtreeMutex
jmp 0x1403c4c40