Function at 0x693e64
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
xor r12d, r12d
mov rdi, rdx
cmp byte [rdx + 0x28], r12b
jne 0x693e9a
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.0065fb00
lea eax, [r12 + 1]
jmp 0x694133
mov eax, dword [rdx + 0x54]
mov r15d, dword [rdx + 0x18]
xor esi, esi
mov dword [rsp + 0x70], eax
mov eax, dword [rdx + 0x58]
mov dword [rsp + 0x78], eax
mov eax, r15d
or eax, 0x2800
mov dword [rdx + 0x18], eax
mov rax, qword [rdx + 0x10]
lea rdx, str.ATTACH__AS_vacuum_db_
mov r13, qword [rax + 8]
mov rax, qword [r13 + 8]
mov rcx, qword [rax]
mov rax, qword [rcx + 0x40]
mov rcx, rdi
cmp qword [rax], rsi
sete sil
call fcn.00693d54
mov ebx, eax
test eax, eax
jne 0x6940f6
movsxd rdx, dword [rdi + 8]
mov r8, qword [rdi + 0x10]
lea eax, [rdx - 1]
movsxd rcx, eax
mov rax, qword [r13 + 8]
lea r12, [rcx + rcx*2]
lea rcx, [rdx + rdx*2]
movzx edx, word [rax + 0x22]
add rcx, rcx
mov r14d, edx
shl r12, 4
mov rbp, qword [r8 + rcx*8 - 0x28]
movzx ecx, word [rax + 0x24]
add r12, r8
sub r14d, ecx
mov rcx, rbp
mov r8d, r14d
call fcn.006676f0
test eax, eax
jne 0x6940f1
test esi, esi
jne 0x693f50
mov edx, dword [rdi + 0x30]
mov r8d, r14d
mov rcx, rbp
call fcn.006676f0
test eax, eax
jne 0x6940f1
cmp byte [rdi + 0x2a], 0
jne 0x6940f1
lea rdx, str.PRAGMA_vacuum_db.synchronousOFF
mov rcx, rdi
call fcn.00693d54
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rdx, str.BEGIN_EXCLUSIVE_
mov rcx, rdi
call fcn.00693d54
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rdx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
mov rcx, rdi
call fcn.00693dc8
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rdx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov rcx, rdi
call fcn.00693dc8
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rdx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov rcx, rdi
call fcn.00693dc8
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rdx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name____FROM_sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_rootpage_0
mov rcx, rdi
call fcn.00693dc8
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rdx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov rcx, rdi
call fcn.00693dc8
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rdx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov rcx, rdi
call fcn.00693dc8
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rdx, str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
mov rcx, rdi
call fcn.00693d54
mov ebx, eax
test eax, eax
jne 0x6940f6
xor esi, esi
mov r8, qword [r13 + 8]
lea rax, [0x0078ece8]
lea rdx, [rsp + 0x68]
movzx ecx, byte [rsi + rax]
mov rax, qword [r13]
mov qword [r8 + 8], rax
call fcn.0066bce8
mov ebx, eax
test eax, eax
jne 0x6940f6
lea rax, [0x0078ece8]
mov rcx, rbp
movzx r8d, byte [rsi + rax + 1]
movzx edx, byte [rsi + rax]
add r8d, dword [rsp + 0x68]
call fcn.0066bd98
mov ebx, eax
test eax, eax
jne 0x6940f6
add rsi, 2
cmp rsi, 8
jl 0x69403d
mov rdx, rbp
mov rcx, r13
call fcn.0066d2b0
mov ebx, eax
test eax, eax
jne 0x6940f6
cmp byte [rbp + 0x10], 2
jne 0x6940c8
mov rcx, qword [rbp + 8]
mov rax, qword [rbp]
xor r8d, r8d
mov qword [rcx + 8], rax
mov rcx, qword [rcx]
xor edx, edx
call fcn.00666410
mov ebx, eax
test ebx, ebx
jne 0x6940f6
mov rcx, rbp
call fcn.00667c48
mov ebx, eax
test eax, eax
jne 0x6940f6
mov rax, qword [rbp + 8]
mov r8d, r14d
mov rcx, r13
movzx edx, word [rax + 0x22]
call fcn.006676f0
mov ebx, eax
jmp 0x6940f6
mov ebx, 7
mov eax, dword [rsp + 0x70]
mov dword [rdi + 0x18], r15d
mov byte [rdi + 0x28], 1
mov dword [rdi + 0x54], eax
mov eax, dword [rsp + 0x78]
mov dword [rdi + 0x58], eax
test r12, r12
je 0x694127
mov rcx, qword [r12 + 8]
call fcn.00667658
and qword [r12 + 8], 0
and qword [r12 + 0x28], 0
xor edx, edx
mov rcx, rdi
call fcn.0067eba0
mov eax, ebx
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret