Function at 0x140204550
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 + 0x65], 0
movsxd rdi, r8d
mov qword [rsp + 0x100], rcx
mov rbx, rdx
mov r13, r9
lea r8, str.cannot_VACUUM_from_within_a_transaction
je 0x14020459c
cmp dword [rdx + 0xd8], 1
jle 0x1402045ac
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
mov rcx, qword [rsp + 0x100]
mov rdx, rbx
call fcn.140208850
mov r15d, 1
jmp 0x140204a9f
test r9, r9
mov esi, dword [rdx + 0x4c]
je 0x1402045de
lea r8, str.non_text_filename
mov rcx, r9
call fcn.140224780
cmp eax, 3
jne 0x140204591
call fcn.140224740
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x1402045e5
lea r9, [0x1403190b9]
mov rax, qword [rbx + 0x30]
shl rdi, 5
xor r12d, r12d
mov rdx, qword [rsp + 0x100]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov r14d, dword [rbx + 0x28]
mov qword [rsp + 0x30], rax
mov eax, dword [rbx + 0x2c]
mov dword [rsp + 0x3c], eax
mov rax, qword [rbx + 0x78]
mov qword [rsp + 0x40], rax
mov rax, qword [rbx + 0x80]
mov qword [rsp + 0x48], rax
mov al, byte [rbx + 0x6e]
mov byte [rbx + 0x6e], 0
mov byte [rsp + 0x57], al
mov eax, dword [rsp + 0x3c]
or eax, 6
mov dword [rbx + 0x2c], eax
movabs rax, 0xfffffffeefffafff
and rax, qword [rsp + 0x30]
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 + 0x28], rcx
mov rcx, rbx
mov rax, qword [rax]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x58], rax
call fcn.1401c6150
mov dword [rbx + 0x4c], esi
test eax, eax
mov r15d, eax
jne 0x140204a31
movsxd r12, r14d
shl r12, 5
add r12, qword [rbx + 0x20]
test r13, r13
mov rsi, qword [r12 + 8]
je 0x1402046f5
mov rax, qword [rsi + 8]
xor r8d, r8d
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov qword [rsp + 0x68], r8
cmp qword [rcx], 0
je 0x1402046f1
lea rdx, [rsp + 0x68]
call fcn.1401fae00
test eax, eax
jne 0x1402046cf
cmp qword [rsp + 0x68], 0
jle 0x1402046f1
lea r8, str.output_file_already_exists
mov rdx, rbx
mov rcx, qword [rsp + 0x100]
mov r15d, 1
call fcn.140208850
jmp 0x140204a31
or dword [rbx + 0x2c], 8
mov rcx, rbp
call fcn.1401e5bd0
mov rcx, rsi
mov dword [rsp + 0x50], eax
mov rax, qword [rbx + 0x20]
mov rax, qword [rax + rdi + 0x18]
mov edx, dword [rax + 0x74]
call fcn.1401e7bb0
xor edx, edx
mov rcx, rbp
call fcn.1401e7d70
mov rcx, rsi
mov edx, eax
call fcn.1401e7d70
mov edx, 0x21
mov rcx, rsi
call fcn.1401e7cc0
mov rdx, qword [rsp + 0x100]
lea r8, str.BEGIN
mov rcx, rbx
call fcn.1401c6060
test eax, eax
mov r15d, eax
jne 0x140204a31
test r13, r13
mov rcx, rbp
sete dl
sete dil
xor r8d, r8d
movzx edx, dl
add edx, edx
call fcn.1401e48a0
test eax, eax
mov r15d, eax
jne 0x140204a31
mov rax, qword [rbp + 8]
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
jne 0x140204794
test dil, dil
je 0x140204794
xor edx, edx
mov dword [rbx + 0x74], edx
mov edx, dword [rax + 0x34]
xor r9d, r9d
mov rcx, rsi
mov r8d, dword [rsp + 0x50]
call fcn.1401e7c00
test eax, eax
jne 0x1402047db
movabs rax, 0xff000000ff
test qword [rsp + 0x58], rax
je 0x1402047c4
cmp byte [rbx + 0x67], 0
je 0x1402047e6
jmp 0x1402047db
mov edx, dword [rbx + 0x74]
xor r9d, r9d
mov rcx, rsi
mov r8d, dword [rsp + 0x50]
call fcn.1401e7c00
test eax, eax
je 0x1402047bc
mov r15d, 7
jmp 0x140204a31
movsx edx, byte [rbx + 0x6a]
test dl, dl
jns 0x1402047f8
mov rcx, rbp
call fcn.1401e5b30
mov edx, eax
mov rcx, rsi
call fcn.1401e7b60
mov r9, qword [rsp + 0x28]
mov rcx, rbx
mov byte [rbx + 0xc4], r14b
mov rdx, qword [rsp + 0x100]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
call fcn.1401c6150
test eax, eax
mov r15d, eax
jne 0x140204a31
mov r9, qword [rsp + 0x28]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rcx, rbx
mov rdx, qword [rsp + 0x100]
call fcn.1401c6150
test eax, eax
mov r15d, eax
jne 0x140204a31
mov r9, qword [rsp + 0x28]
mov byte [rbx + 0xc4], 0
mov rcx, rbx
mov rdx, qword [rsp + 0x100]
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 fcn.1401c6150
and dword [rbx + 0x2c], 0xfffffffb
test eax, eax
mov r15d, eax
jne 0x140204a31
mov r9, qword [rsp + 0x28]
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rcx, rbx
mov rdx, qword [rsp + 0x100]
call fcn.1401c6150
test eax, eax
mov r15d, eax
jne 0x140204a31
lea r14, [0x140322bc0]
lea rax, [rsp + 0x64]
lea rdi, [r14 + 0xa]
mov qword [rsp + 0x28], rax
movzx r15d, byte [r14]
mov rcx, rbp
mov r8, qword [rsp + 0x28]
mov edx, r15d
call fcn.1401e5b70
movzx r8d, byte [r14 + 1]
mov edx, r15d
mov rcx, rsi
add r8d, dword [rsp + 0x64]
call fcn.1401e8460
test eax, eax
mov r15d, eax
jne 0x140204a31
add r14, 2
cmp rdi, r14
jne 0x1402048c3
test r13, r13
je 0x14020491d
mov rcx, rsi
call fcn.1401e5070
test eax, eax
mov r15d, eax
je 0x1402049f7
jmp 0x140204a31
lea r14, [rsp + 0x68]
mov rcx, rbp
call fcn.1401e5ac0
mov rcx, rsi
call fcn.1401e5ac0
mov rax, qword [rbp + 8]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
cmp qword [rcx], 0
je 0x140204970
mov rdx, qword [rsi + 8]
mov r8, r14
movsxd rax, dword [rdx + 0x34]
mov edx, dword [rdx + 0x40]
imul rax, rdx
mov edx, 0xb
mov qword [rsp + 0x68], rax
call fcn.1401fadd0
test eax, eax
mov r15d, eax
je 0x140204970
cmp eax, 0xc
jne 0x1402049dd
xor eax, eax
mov ecx, 0x12
mov rdi, r14
rep stosd dword [rdi], eax
mov edx, 0x7fffffff
mov rcx, r14
mov rax, qword [rsi]
mov qword [rsp + 0x90], rsi
mov qword [rsp + 0x70], rbp
mov dword [rsp + 0x80], 1
mov qword [rsp + 0x88], rax
call fcn.14021c940
mov rcx, r14
call fcn.14021c750
test eax, eax
mov r15d, eax
jne 0x1402049c6
mov rax, qword [rbp + 8]
and word [rax + 0x28], 0xfffd
jmp 0x1402049dd
mov rax, qword [rsp + 0x70]
mov rax, qword [rax + 8]
mov rcx, qword [rax]
cmp byte [rcx + 0x10], 0
jne 0x1402049dd
call fcn.1401d7270
mov rcx, rsi
call fcn.1401e6cd0
mov rcx, rbp
call fcn.1401e6cd0
test r15d, r15d
jne 0x140204a31
jmp 0x140204905
test r13, r13
jne 0x140204a31
mov rcx, rsi
call fcn.1401e5b30
mov rcx, rbp
mov edx, eax
call fcn.1401e7b60
mov rcx, rsi
call fcn.1401e5bd0
mov r9d, 1
mov rcx, rbp
mov r8d, eax
mov rax, qword [rsi + 8]
mov edx, dword [rax + 0x34]
call fcn.1401e7c00
mov r15d, eax
mov eax, dword [rsp + 0x3c]
xor r8d, r8d
or edx, 0xffffffff
mov r9d, 1
mov byte [rbx + 0xc4], 0
mov rcx, rbp
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x30]
mov qword [rbx + 0x30], rax
mov rax, qword [rsp + 0x40]
mov qword [rbx + 0x78], rax
mov rax, qword [rsp + 0x48]
mov qword [rbx + 0x80], rax
mov al, byte [rsp + 0x57]
mov byte [rbx + 0x6e], al
call fcn.1401e7c00
test r12, r12
mov byte [rbx + 0x65], 1
je 0x140204a97
mov rcx, qword [r12 + 8]
call fcn.1401e4f50
xor eax, eax
mov qword [r12 + 8], rax
mov qword [r12 + 0x18], rax
mov rcx, rbx
call fcn.140203a80
mov eax, r15d
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret