Function at 0x18031e000
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rsi
push rdi
push r13
push r15
sub rsp, 0x60
xor r13d, r13d
movsxd rdi, r8d
mov r15, r9
mov rbx, rdx
mov rsi, rcx
cmp byte [rdx + 0x5f], r13b
jne 0x18031e03d
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.18029e7b0
lea eax, [r13 + 1]
add rsp, 0x60
pop r15
pop r13
pop rdi
pop rsi
pop rbx
ret
cmp dword [rdx + 0xc8], 1
jle 0x18031e063
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.18029e7b0
mov eax, 1
add rsp, 0x60
pop r15
pop r13
pop rdi
pop rsi
pop rbx
ret
mov qword [rsp + 0xa8], r14
mov r14d, dword [rdx + 0x4c]
lea rdx, [0x180000000]
test r15, r15
je 0x18031e109
movzx ecx, word [r9 + 8]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x3c5fe0], 3
je 0x18031e0af
lea r8, str.non_text_filename
mov rdx, rbx
mov rcx, rsi
call fcn.18029e7b0
mov eax, 1
jmp 0x18031e517
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x18031e0d8
cmp byte [r9 + 0xa], 1
jne 0x18031e0d8
mov r9, qword [r9 + 0x10]
mov eax, r14d
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x18031e110
test cl, 1
je 0x18031e0ee
mov eax, r14d
xor r9d, r9d
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x18031e110
mov dl, 1
mov rcx, r15
call fcn.1802c2840
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x18031e110
lea r9, [0x1803d8b38]
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 + 0x34], eax
or eax, 6
mov dword [rbx + 0x2c], eax
mov rax, rcx
mov dword [rsp + 0x38], edx
mov edx, dword [rbx + 0x78]
mov qword [rsp + 0x50], rcx
movabs rcx, 0xfffffffeefffafff
and rax, rcx
mov dword [rsp + 0x3c], edx
movzx edx, byte [rbx + 0x68]
or rax, 0x201
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
mov byte [rbx + 0x68], r13b
mov byte [rsp + 0x20], dl
mov rdx, rdi
shl rdx, 5
mov qword [rsp + 0x90], rbp
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0xa0], r12
mov rcx, qword [rdx + rax]
mov rbp, qword [rdx + rax + 8]
mov rdx, rsi
movsxd r12, dword [rbx + 0x28]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x30], r12d
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
movzx eax, byte [rcx + 0x10]
mov rcx, rbx
mov byte [rsp + 0x98], al
call fcn.18031de90
mov dword [rbx + 0x4c], r14d
mov edi, eax
test eax, eax
jne 0x18031e49a
mov r13, r12
shl r13, 5
add r13, qword [rbx + 0x20]
mov r14, qword [r13 + 8]
test r15, r15
je 0x18031e227
mov rax, qword [r14 + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x40], 0
mov rax, qword [rcx]
test rax, rax
je 0x18031e223
lea rdx, [rsp + 0x40]
call qword [rax + 0x30]
test eax, eax
jne 0x18031e207
cmp qword [rsp + 0x40], 0
jle 0x18031e223
lea r8, str.output_file_already_exists
mov rdx, rbx
mov rcx, rsi
mov edi, 1
call fcn.18029e7b0
jmp 0x18031e49a
or dword [rbx + 0x2c], 8
movzx ecx, byte [rbp + 0x11]
test cl, cl
je 0x18031e244
inc dword [rbp + 0x14]
cmp byte [rbp + 0x12], 0
jne 0x18031e244
mov rcx, rbp
call fcn.1802b2770
movzx ecx, byte [rbp + 0x11]
mov rax, qword [rbp + 8]
mov r12d, dword [rax + 0x30]
sub r12d, dword [rax + 0x34]
test cl, cl
je 0x18031e262
sub dword [rbp + 0x14], 1
jne 0x18031e262
mov rcx, rbp
call fcn.1802b2740
mov rax, qword [rbx + 0x20]
mov rcx, qword [rsp + 0x48]
mov rcx, qword [rcx + rax + 0x18]
mov edx, dword [rcx + 0x74]
mov rcx, r14
call fcn.1802b5110
xor edx, edx
mov rcx, rbp
call fcn.1802b51a0
mov edx, eax
mov rcx, r14
call fcn.1802b51a0
mov edx, 0x21
mov rcx, r14
call fcn.1802b52d0
lea r8, str.BEGIN
mov rdx, rsi
mov rcx, rbx
call fcn.18031dd80
mov edi, eax
test eax, eax
jne 0x18031e49a
xor edx, edx
mov eax, 2
test r15, r15
mov rcx, rbp
cmove edx, eax
xor r8d, r8d
call fcn.1802b5b70
mov edi, eax
test eax, eax
jne 0x18031e49a
mov rcx, qword [rbp + 8]
mov rax, qword [rcx]
cmp byte [rax + 9], 5
jne 0x18031e2ee
mov dword [rbx + 0x6c], edi
mov rcx, qword [rbp + 8]
mov edx, dword [rcx + 0x30]
xor r9d, r9d
mov rcx, r14
mov r8d, r12d
call fcn.1802b53c0
test eax, eax
jne 0x18031e495
cmp byte [rsp + 0x98], al
jne 0x18031e329
mov edx, dword [rbx + 0x6c]
xor r9d, r9d
mov r8d, r12d
mov rcx, r14
call fcn.1802b53c0
test eax, eax
jne 0x18031e495
cmp byte [rbx + 0x61], 0
jne 0x18031e495
movzx eax, byte [rbx + 0x64]
test al, al
js 0x18031e340
movsx eax, al
jmp 0x18031e348
mov rcx, rbp
call fcn.1802b5620
mov edx, eax
mov rcx, r14
call fcn.1802b5590
mov eax, dword [rsp + 0x30]
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r9, qword [rsp + 0x28]
mov rdx, rsi
mov rcx, rbx
mov byte [rbx + 0xb4], al
call fcn.18031de90
mov edi, eax
test eax, eax
jne 0x18031e49a
mov r9, qword [rsp + 0x28]
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
mov rdx, rsi
mov rcx, rbx
call fcn.18031de90
mov edi, eax
test eax, eax
jne 0x18031e49a
mov r9, qword [rsp + 0x28]
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, rsi
mov byte [rbx + 0xb4], al
mov rcx, rbx
call fcn.18031de90
and dword [rbx + 0x2c], 0xfffffffb
mov edi, eax
test eax, eax
jne 0x18031e49a
mov r9, qword [rsp + 0x28]
lea r8, str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, rsi
mov rcx, rbx
call fcn.18031de90
mov edi, eax
test eax, eax
jne 0x18031e49a
xor esi, esi
nop dword [rax]
lea rdi, [0x180000000]
mov rcx, rbp
movzx edx, byte [rsi + rdi + 0x3c32b8]
lea r8, [rsp + 0x98]
call fcn.1802beea0
movzx r8d, byte [rsi + rdi + 0x3c32b9]
mov rcx, r14
add r8d, dword [rsp + 0x98]
movzx edx, byte [rsi + rdi + 0x3c32b8]
call fcn.1802bef30
mov edi, eax
test eax, eax
jne 0x18031e49a
add rsi, 2
cmp rsi, 0xa
jl 0x18031e3f0
test r15, r15
jne 0x18031e456
mov rdx, r14
mov rcx, rbp
call fcn.1802c13c0
mov edi, eax
test eax, eax
jne 0x18031e49a
mov rcx, r14
call fcn.1802b6fd0
mov edi, eax
test eax, eax
jne 0x18031e49a
test r15, r15
jne 0x18031e49a
mov rcx, r14
call fcn.1802b5620
mov edx, eax
mov rcx, rbp
call fcn.1802b5590
mov rax, qword [r14 + 8]
lea r9d, [rdi + 1]
mov r8d, r12d
mov rcx, rbp
mov edx, dword [rax + 0x30]
call fcn.1802b53c0
mov edi, eax
jmp 0x18031e49a
mov edi, 7
mov eax, dword [rsp + 0x34]
mov edx, 0xffffffff
mov dword [rbx + 0x2c], eax
mov r8d, edx
mov rax, qword [rsp + 0x50]
mov rcx, rbp
mov qword [rbx + 0x30], rax
mov eax, dword [rsp + 0x38]
lea r9d, [rdx + 2]
mov dword [rbx + 0x74], eax
mov eax, dword [rsp + 0x3c]
mov dword [rbx + 0x78], eax
movzx eax, byte [rsp + 0x20]
mov byte [rbx + 0x68], al
mov byte [rbx + 0xb4], 0
call fcn.1802b53c0
mov r12, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x90]
mov byte [rbx + 0x5f], 1
test r13, r13
je 0x18031e50d
mov rcx, qword [r13 + 8]
call fcn.1802b4f50
mov qword [r13 + 8], 0
mov qword [r13 + 0x18], 0
mov rcx, rbx
call fcn.1802eb580
mov eax, edi
mov r14, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r13
pop rdi
pop rsi
pop rbx
ret