Function at 0x18006ca9c
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x60
xor r14d, r14d
movsxd rdi, r8d
mov r12, r9
mov rbx, rdx
mov rbp, rcx
cmp byte [rdx + 0x5f], r14b
jne 0x18006cae2
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.1800168fc
lea eax, [r14 + 1]
jmp 0x18006cf22
mov esi, 1
cmp dword [rdx + 0xc8], esi
jle 0x18006cb02
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.1800168fc
mov eax, esi
jmp 0x18006cf22
mov r15d, dword [rdx + 0x4c]
lea rcx, [0x180000000]
test r9, r9
je 0x18006cb48
movzx eax, word [r9 + 8]
and eax, 0x3f
cmp byte [rax + rcx + 0xf1c50], 3
je 0x18006cb30
lea r8, str.non_text_filename
mov rcx, rbp
jmp 0x18006caf6
mov dl, sil
mov rcx, r9
call fcn.180030d44
and dword [rbx + 0x4c], 0xfffffffe
mov r9, rax
or dword [rbx + 0x4c], 6
jmp 0x18006cb4f
lea r9, [0x18010794c]
mov eax, dword [rbx + 0x2c]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rcx, qword [rbx + 0x30]
mov edx, dword [rbx + 0x74]
mov dword [rsp + 0x38], eax
or eax, 6
mov dword [rbx + 0x2c], eax
mov rax, rcx
mov dword [rsp + 0x3c], edx
and rax, 0xffffffffefffaf7f
mov edx, dword [rbx + 0x78]
or rax, 0x201
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
mov dword [rsp + 0x40], edx
mov dl, byte [rbx + 0x68]
mov byte [rbx + 0x68], r14b
mov byte [rsp + 0x98], dl
mov rdx, rdi
shl rdx, 5
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x48], rdx
mov rcx, qword [rax + rdx]
mov r13, qword [rax + rdx + 8]
mov rdx, rbp
mov qword [rsp + 0x30], rcx
mov rax, qword [r13 + 8]
mov rcx, qword [rax]
movzx eax, byte [rcx + 0x10]
mov rcx, rbx
mov dword [rsp + 0x20], eax
mov eax, dword [rbx + 0x28]
mov dword [rsp + 0x24], eax
call fcn.18006c954
mov dword [rbx + 0x4c], r15d
mov edi, eax
test eax, eax
jne 0x18006cebc
movsxd r14, dword [rsp + 0x24]
shl r14, 5
add r14, qword [rbx + 0x20]
mov r15, qword [r14 + 8]
test r12, r12
je 0x18006cc48
mov rax, qword [r15 + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
and qword [rsp + 0x28], 0
mov rax, qword [rcx]
test rax, rax
je 0x18006cc44
lea rdx, [rsp + 0x28]
call qword [rax + 0x30]
test eax, eax
jne 0x18006cc2b
cmp qword [rsp + 0x28], 0
jle 0x18006cc44
lea r8, str.output_file_already_exists
mov rdx, rbx
mov rcx, rbp
mov edi, esi
call fcn.1800168fc
jmp 0x18006cebc
or dword [rbx + 0x2c], 8
mov rax, qword [r13 + 8]
mov ecx, dword [rax + 0x30]
sub ecx, dword [rax + 0x34]
mov rax, qword [rbx + 0x20]
mov dword [rsp + 0x28], ecx
mov rcx, qword [rsp + 0x48]
mov rcx, qword [rax + rcx + 0x18]
mov edx, dword [rcx + 0x74]
mov rcx, r15
call fcn.180027390
xor edx, edx
mov rcx, r13
call fcn.1800273dc
mov edx, eax
mov rcx, r15
call fcn.1800273dc
mov rcx, qword [r15 + 8]
mov edx, Ordinal_36
mov rcx, qword [rcx]
call fcn.180020314
lea r8, str.BEGIN
mov rdx, rbp
mov rcx, rbx
call fcn.18006c85c
mov edi, eax
test eax, eax
jne 0x18006cebc
mov rax, r12
mov rcx, r13
neg rax
sbb edx, edx
xor r8d, r8d
not edx
and edx, 2
call fcn.180027a14
mov edi, eax
test eax, eax
jne 0x18006cebc
mov rax, qword [r13 + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x18006cce2
and dword [rbx + 0x6c], edi
mov rax, qword [r13 + 8]
xor r9d, r9d
mov edi, dword [rsp + 0x28]
mov rcx, r15
mov r8d, edi
mov edx, dword [rax + 0x30]
call fcn.180027448
test eax, eax
jne 0x18006ceb7
cmp dword [rsp + 0x20], eax
jne 0x18006cd22
mov edx, dword [rbx + 0x6c]
xor r9d, r9d
mov r8d, edi
mov rcx, r15
call fcn.180027448
test eax, eax
jne 0x18006ceb7
cmp byte [rbx + 0x61], 0
jne 0x18006ceb7
mov al, byte [rbx + 0x64]
test al, al
js 0x18006cd38
movsx edx, al
jmp 0x18006cd51
mov rax, qword [r13 + 8]
cmp byte [rax + 0x21], 0
jne 0x18006cd46
xor edx, edx
jmp 0x18006cd51
mov al, byte [rax + 0x22]
neg al
sbb edx, edx
neg edx
add edx, esi
mov rcx, r15
call fcn.180027520
mov eax, dword [rsp + 0x24]
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r9, qword [rsp + 0x30]
mov rcx, rbx
mov rdx, rbp
mov byte [rbx + 0xb4], al
call fcn.18006c954
mov edi, eax
test eax, eax
jne 0x18006cebc
mov r9, qword [rsp + 0x30]
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
mov rdx, rbp
mov rcx, rbx
call fcn.18006c954
mov edi, eax
test eax, eax
jne 0x18006cebc
mov r9, qword [rsp + 0x30]
lea r8, str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
mov rdx, rbp
mov byte [rbx + 0xb4], al
mov rcx, rbx
call fcn.18006c954
and dword [rbx + 0x2c], 0xfffffffb
mov edi, eax
test eax, eax
jne 0x18006cebc
mov r9, qword [rsp + 0x30]
lea r8, str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, rbp
mov rcx, rbx
call fcn.18006c954
mov edi, eax
test eax, eax
jne 0x18006cebc
xor ebp, ebp
lea r11, [0x180000000]
mov rcx, r13
movzx r10d, byte [r11 + rbp + 0xeccd0]
lea r8, [rsp + 0x20]
mov edx, r10d
call fcn.18002e2f4
movzx r8d, byte [r11 + rbp + 0xeccd1]
mov edx, r10d
add r8d, dword [rsp + 0x20]
mov rcx, r15
call fcn.18002e344
mov edi, eax
test eax, eax
jne 0x18006cebc
add rbp, 2
cmp rbp, 0xa
jl 0x18006cdf3
test r12, r12
jne 0x18006ce56
mov rdx, r15
mov rcx, r13
call fcn.18002fd3c
mov edi, eax
test eax, eax
jne 0x18006cebc
xor edx, edx
mov rcx, r15
call fcn.180028638
mov edi, eax
test eax, eax
jne 0x18006ce72
xor edx, edx
mov rcx, r15
call fcn.18002869c
mov edi, eax
test edi, edi
jne 0x18006cebc
test r12, r12
jne 0x18006cebc
mov rax, qword [r15 + 8]
cmp byte [rax + 0x21], r12b
jne 0x18006ce89
xor edx, edx
jmp 0x18006ce94
mov al, byte [rax + 0x22]
neg al
sbb edx, edx
neg edx
add edx, esi
mov rcx, r13
call fcn.180027520
mov rdx, qword [r15 + 8]
mov r9d, esi
mov r8d, dword [rsp + 0x28]
mov rcx, r13
mov edx, dword [rdx + 0x30]
call fcn.180027448
mov edi, eax
jmp 0x18006cebc
mov edi, 7
mov eax, dword [rsp + 0x38]
or edx, 0xffffffff
mov dword [rbx + 0x2c], eax
mov r9d, esi
mov rax, qword [rsp + 0x50]
mov r8d, edx
mov qword [rbx + 0x30], rax
mov rcx, r13
mov eax, dword [rsp + 0x3c]
mov dword [rbx + 0x74], eax
mov eax, dword [rsp + 0x40]
mov dword [rbx + 0x78], eax
mov al, byte [rsp + 0x98]
mov byte [rbx + 0x68], al
mov byte [rbx + 0xb4], 0
call fcn.180027448
mov byte [rbx + 0x5f], sil
test r14, r14
je 0x18006cf18
mov rcx, qword [r14 + 8]
call fcn.1800272e4
and qword [r14 + 8], 0
and qword [r14 + 0x18], 0
mov rcx, rbx
call fcn.18004ce8c
mov eax, edi
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret