Function at 0x14046d450
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
cmp byte [rdx + 0x65], 0
movsxd rdi, r8d
mov rbx, rdx
lea r8, str.cannot_VACUUM_from_within_a_transaction
mov r13, r9
mov qword [rsp + 0xf0], rcx
je 0x14046d49c
cmp dword [rdx + 0xd8], 1
jle 0x14046d4ac
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
mov rcx, qword [rsp + 0xf0]
mov rdx, rbx
call fcn.140471670
mov r15d, 1
jmp 0x14046d9c1
mov esi, dword [rdx + 0x4c]
test r9, r9
je 0x14046d4de
mov rcx, r9
lea r8, str.non_text_filename
call fcn.14048ec90
cmp eax, 3
jne 0x14046d491
call fcn.14048ec50
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x14046d4e5
lea r9, [0x140616ccc]
mov eax, dword [rbx + 0x2c]
mov r14, qword [rbx + 0x30]
shl rdi, 5
xor r12d, r12d
mov rdx, qword [rsp + 0xf0]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov dword [rsp + 0x28], eax
mov rax, qword [rbx + 0x78]
mov qword [rsp + 0x30], rax
mov rax, qword [rbx + 0x80]
mov qword [rsp + 0x38], rax
mov al, byte [rbx + 0x6e]
mov byte [rbx + 0x6e], 0
mov byte [rsp + 0x47], al
mov eax, dword [rsp + 0x28]
or eax, 6
mov dword [rbx + 0x2c], eax
movabs rax, 0xfffffffeefffafff
and rax, r14
or rax, 0x201
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
add rax, rdi
mov rbp, qword [rax + 8]
mov rcx, qword [rax]
mov rax, qword [rbp + 8]
mov qword [rsp + 0x20], rcx
mov rcx, rbx
mov rax, qword [rax]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x48], rax
mov eax, dword [rbx + 0x28]
mov dword [rsp + 0x2c], eax
call fcn.1403d7200
mov dword [rbx + 0x4c], esi
mov r15d, eax
test eax, eax
jne 0x14046d958
movsxd r12, dword [rsp + 0x2c]
shl r12, 5
add r12, qword [rbx + 0x20]
mov rsi, qword [r12 + 8]
test r13, r13
je 0x14046d60b
mov rax, qword [rsi + 8]
xor r8d, r8d
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov qword [rsp + 0x58], r8
cmp qword [rcx], 0
je 0x14046d5ef
lea rdx, [rsp + 0x58]
call fcn.140463260
test eax, eax
jne 0x14046d5cd
cmp qword [rsp + 0x58], 0
jle 0x14046d5ef
lea r8, str.output_file_already_exists
mov rdx, rbx
mov rcx, qword [rsp + 0xf0]
mov r15d, 1
call fcn.140471670
jmp 0x14046d958
mov rax, qword [rbx + 0x20]
or dword [rbx + 0x2c], 8
movzx r8d, byte [rax + rdi + 0x10]
mov eax, dword [rbx + 0x30]
and eax, 0x38
or r8d, eax
mov r15d, r8d
jmp 0x14046d611
mov r15d, 1
mov rcx, rbp
call fcn.140445990
mov rcx, rsi
mov dword [rsp + 0x40], eax
mov rax, qword [rbx + 0x20]
mov rax, qword [rax + rdi + 0x18]
mov edx, dword [rax + 0x74]
call fcn.140447a00
xor edx, edx
mov rcx, rbp
call fcn.140447bc0
mov rcx, rsi
mov edx, eax
call fcn.140447bc0
mov edx, r15d
mov rcx, rsi
or edx, 0x20
call fcn.140447b10
mov rdx, qword [rsp + 0xf0]
lea r8, str.BEGIN
mov rcx, rbx
call fcn.1403d7110
mov r15d, eax
test eax, eax
jne 0x14046d958
test r13, r13
mov rcx, rbp
sete dl
sete dil
xor r8d, r8d
movzx edx, dl
add edx, edx
call fcn.140444610
mov r15d, eax
test eax, eax
jne 0x14046d958
mov rax, qword [rbp + 8]
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
jne 0x14046d6b1
test dil, dil
je 0x14046d6b1
xor edx, edx
mov dword [rbx + 0x74], edx
mov edx, dword [rax + 0x34]
mov r8d, dword [rsp + 0x40]
xor r9d, r9d
mov rcx, rsi
call fcn.140447a50
test eax, eax
jne 0x14046d6f8
movabs rax, 0xff000000ff
test qword [rsp + 0x48], rax
je 0x14046d6e1
cmp byte [rbx + 0x67], 0
je 0x14046d703
jmp 0x14046d6f8
mov edx, dword [rbx + 0x74]
mov r8d, dword [rsp + 0x40]
xor r9d, r9d
mov rcx, rsi
call fcn.140447a50
test eax, eax
je 0x14046d6d9
mov r15d, 7
jmp 0x14046d958
movsx edx, byte [rbx + 0x6a]
test dl, dl
jns 0x14046d715
mov rcx, rbp
call fcn.1404458c0
mov edx, eax
mov rcx, rsi
call fcn.1404479b0
mov al, byte [rsp + 0x2c]
mov rcx, rbx
mov r9, qword [rsp + 0x20]
mov rdx, qword [rsp + 0xf0]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov byte [rbx + 0xc4], al
call fcn.1403d7200
mov r15d, eax
test eax, eax
jne 0x14046d958
mov r9, qword [rsp + 0x20]
mov rdx, qword [rsp + 0xf0]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rcx, rbx
call fcn.1403d7200
mov r15d, eax
test eax, eax
jne 0x14046d958
mov byte [rbx + 0xc4], 0
mov r9, qword [rsp + 0x20]
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
mov rdx, qword [rsp + 0xf0]
call fcn.1403d7200
and dword [rbx + 0x2c], 0xfffffffb
mov r15d, eax
test eax, eax
jne 0x14046d958
mov r9, qword [rsp + 0x20]
mov rdx, qword [rsp + 0xf0]
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rcx, rbx
call fcn.1403d7200
mov r15d, eax
test eax, eax
jne 0x14046d958
lea rax, [rsp + 0x54]
lea rdi, [0x14062b9b0]
mov qword [rsp + 0x20], rax
movzx r15d, byte [rdi]
mov r8, qword [rsp + 0x20]
mov rcx, rbp
mov edx, r15d
call fcn.140445930
movzx r8d, byte [rdi + 1]
mov edx, r15d
mov rcx, rsi
add r8d, dword [rsp + 0x54]
call fcn.1404482f0
mov r15d, eax
test eax, eax
jne 0x14046d958
add rdi, 2
lea rax, [0x14062b9ba]
cmp rax, rdi
jne 0x14046d7df
test r13, r13
jne 0x14046d94d
mov rcx, rbp
lea r13, [rsp + 0x58]
call fcn.140445850
mov rcx, rsi
call fcn.140445850
mov rax, qword [rbp + 8]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
cmp qword [rcx], 0
je 0x14046d883
mov rdx, qword [rsi + 8]
mov r8, r13
movsxd rax, dword [rdx + 0x34]
mov edx, dword [rdx + 0x40]
imul rax, rdx
mov edx, 0xb
mov qword [rsp + 0x58], rax
call fcn.140463230
mov r15d, eax
test eax, eax
je 0x14046d883
cmp eax, 0xc
jne 0x14046d93b
xor eax, eax
mov ecx, 0x12
mov rdi, r13
mov edx, 0x7fffffff
rep stosd dword [rdi], eax
mov rcx, r13
mov rax, qword [rsi]
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x78], rax
mov dword [rsp + 0x70], 1
call fcn.140485ff0
mov rcx, r13
call fcn.140485db0
mov r15d, eax
test eax, eax
jne 0x14046d924
mov rax, qword [rbp + 8]
mov rcx, rsi
and word [rax + 0x28], 0xfffd
call fcn.140446aa0
mov rcx, rbp
call fcn.140446aa0
mov rcx, rsi
call fcn.140444e00
mov r15d, eax
test eax, eax
jne 0x14046d958
mov rcx, rsi
call fcn.1404458c0
mov rcx, rbp
mov edx, eax
call fcn.1404479b0
mov rcx, rsi
call fcn.140445990
mov r9d, 1
mov rcx, rbp
mov r8d, eax
mov rax, qword [rsi + 8]
mov edx, dword [rax + 0x34]
call fcn.140447a50
jmp 0x14046d955
mov rax, qword [rsp + 0x60]
mov rax, qword [rax + 8]
mov rcx, qword [rax]
cmp byte [rcx + 0x10], 0
jne 0x14046d93b
call fcn.140421300
mov rcx, rsi
call fcn.140446aa0
mov rcx, rbp
call fcn.140446aa0
jmp 0x14046d958
mov rcx, rsi
call fcn.140444e00
mov r15d, eax
mov eax, dword [rsp + 0x28]
mov qword [rbx + 0x30], r14
xor r8d, r8d
or edx, 0xffffffff
mov byte [rbx + 0xc4], 0
mov r9d, 1
mov rcx, rbp
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x30]
mov qword [rbx + 0x78], rax
mov rax, qword [rsp + 0x38]
mov qword [rbx + 0x80], rax
mov al, byte [rsp + 0x47]
mov byte [rbx + 0x6e], al
call fcn.140447a50
mov byte [rbx + 0x65], 1
test r12, r12
je 0x14046d9b9
mov rcx, qword [r12 + 8]
call fcn.140444cf0
xor eax, eax
mov qword [r12 + 8], rax
mov qword [r12 + 0x18], rax
mov rcx, rbx
call fcn.14046c860
mov eax, r15d
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret