Function at 0x1402ebc20
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x20], rbx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
xor r12d, r12d
movsxd r15, r8d
mov r13, r9
mov rdi, rdx
mov r14, rcx
cmp byte [rdx + 0x65], r12b
jne 0x1402ebc9b
lea edx, [r12 + 0x28]
mov rcx, rdi
call fcn.1402c1930
mov rbx, rax
test rax, rax
je 0x1402ebc7e
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x140534188]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x140534198]
movsd qword [rax + 0x20], xmm0
mov rdx, qword [r14]
test rdx, rdx
je 0x1402ebc8e
mov rcx, rdi
call fcn.1402c17a0
mov qword [r14], rbx
mov eax, 1
jmp 0x1402ec2e4
cmp dword [rdx + 0xd8], 1
jle 0x1402ebd0d
mov edx, 0x2b
mov rcx, rdi
call fcn.1402c1930
mov rbx, rax
test rax, rax
je 0x1402ebcf0
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1405341b0]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1405341c0]
movsd qword [rax + 0x20], xmm0
movzx ecx, word [0x1405341c8]
mov word [rax + 0x28], cx
movzx ecx, byte [0x1405341ca]
mov byte [rax + 0x2a], cl
mov rdx, qword [r14]
test rdx, rdx
je 0x1402ebc8e
mov rcx, rdi
call fcn.1402c17a0
mov eax, 1
mov qword [r14], rbx
jmp 0x1402ec2e4
mov qword [rsp + 0xa0], rbp
mov ebp, dword [rdx + 0x4c]
lea rdx, [0x140000000]
test r13, r13
je 0x1402ebddb
movzx ecx, word [r9 + 0x14]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x528020], 3
je 0x1402ebd83
mov edx, 0x12
mov rcx, rdi
call fcn.1402c1930
mov rbx, rax
test rax, rax
je 0x1402ebd66
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [rax], xmm0
movzx ecx, word [0x1405341e0]
mov word [rax + 0x10], cx
mov rdx, qword [r14]
test rdx, rdx
je 0x1402ebd76
mov rcx, rdi
call fcn.1402c17a0
mov qword [r14], rbx
mov eax, 1
jmp 0x1402ec2dc
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x1402ebdab
cmp byte [r9 + 0x16], 1
jne 0x1402ebdab
mov r9, qword [r9 + 8]
mov eax, ebp
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1402ebde2
test cl, 1
je 0x1402ebdc0
mov eax, ebp
xor r9d, r9d
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1402ebde2
mov dl, 1
mov rcx, r13
call fcn.14031a740
mov r9, rax
mov eax, dword [rdi + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1402ebde2
lea r9, [0x1405e4ea8]
mov eax, dword [rdi + 0x2c]
mov rcx, qword [rdi + 0x30]
mov rdx, qword [rdi + 0x78]
mov dword [rsp + 0x30], eax
or eax, 6
mov dword [rdi + 0x2c], eax
mov rax, rcx
mov qword [rsp + 0x50], rcx
movabs rcx, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x58], rdx
mov rdx, qword [rdi + 0x80]
or rax, 0x201
mov qword [rdi + 0x30], rax
mov rcx, r15
mov rax, qword [rdi + 0x20]
shl rcx, 5
mov qword [rsp + 0x60], rdx
movzx edx, byte [rdi + 0x6e]
mov byte [rdi + 0x6e], r12b
mov qword [rsp + 0xb0], rsi
mov rsi, qword [rcx + rax + 8]
mov byte [rsp + 0xa8], dl
mov rdx, qword [rcx + rax]
mov qword [rsp + 0x40], rcx
mov rax, qword [rsi + 8]
mov qword [rsp + 0x48], rdx
mov rcx, qword [rax]
cmp byte [rcx + 0x10], r12b
jne 0x1402ebe74
mov dword [rsp + 0x28], r12d
cmp byte [rcx + 0x14], r12b
je 0x1402ebe7c
mov dword [rsp + 0x28], 1
mov eax, dword [rdi + 0x28]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rdx, r14
mov dword [rsp + 0x2c], eax
mov rcx, rdi
call fcn.140257340
mov dword [rdi + 0x4c], ebp
mov ebx, eax
test eax, eax
jne 0x1402ec25f
movsxd rax, dword [rsp + 0x2c]
shl rax, 5
add rax, qword [rdi + 0x20]
mov qword [rsp + 0x20], rax
mov rbp, qword [rax + 8]
test r13, r13
je 0x1402ebf4c
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x38], r12
mov rax, qword [rcx]
test rax, rax
je 0x1402ebf48
lea rdx, [rsp + 0x38]
call qword [rax + 0x30]
test eax, eax
jne 0x1402ebeec
cmp qword [rsp + 0x38], r12
jle 0x1402ebf48
mov ebx, 1
mov rcx, rdi
lea edx, [rbx + 0x1a]
call fcn.1402c1930
mov rbp, rax
test rax, rax
je 0x1402ebf30
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [rax], xmm0
movsd xmm1, qword [0x140534210]
movsd qword [rax + 0x10], xmm1
movzx ecx, word [0x140534218]
mov word [rax + 0x18], cx
movzx ecx, byte [0x14053421a]
mov byte [rax + 0x1a], cl
mov rdx, qword [r14]
test rdx, rdx
je 0x1402ebf40
mov rcx, rdi
call fcn.1402c17a0
mov qword [r14], rbp
jmp 0x1402ec25a
or dword [rdi + 0x2c], 8
mov rcx, rsi
call fcn.1402b8b30
cmp dword [rdi + 0x74], 0
mov r12d, eax
je 0x1402ebfc7
mov rbx, qword [rsp + 0x40]
lea rdx, str.sqlcipherCodecGetKey:db_p__nDb_d
add rbx, qword [rdi + 0x20]
mov r9d, r15d
mov r8, rdi
mov ecx, 8
call fcn.1402b0f80
mov rax, qword [rbx + 8]
test rax, rax
je 0x1402ebfb5
mov rax, qword [rax + 8]
mov rcx, qword [rax]
mov rdx, qword [rcx + 0x130]
test rdx, rdx
je 0x1402ebfc7
cmp dword [rdx], 1
mov ecx, dword [rdx + 0x20]
je 0x1402ebfac
mov rax, qword [rdx + 0x68]
cmp qword [rax + 0x20], 0
jne 0x1402ebfbc
mov rax, qword [rdx + 0x68]
mov ecx, dword [rax + 4]
jmp 0x1402ebfbc
mov ecx, dword [rsp + 0xa8]
test ecx, ecx
je 0x1402ebfc7
mov dword [rdi + 0x74], 0
mov rax, qword [rdi + 0x20]
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rcx + rax + 0x18]
mov edx, dword [rcx + 0x74]
mov rcx, rbp
call fcn.1402bab30
xor edx, edx
mov rcx, rsi
call fcn.1402badd0
mov edx, eax
mov rcx, rbp
call fcn.1402badd0
mov edx, 0x21
mov rcx, rbp
call fcn.1402bacd0
lea r8, str.BEGIN
mov rdx, r14
mov rcx, rdi
call fcn.1402570f0
mov ebx, eax
test eax, eax
jne 0x1402ec25a
xor edx, edx
mov eax, 2
test r13, r13
mov rcx, rsi
cmove edx, eax
xor r8d, r8d
call fcn.1402b74d0
mov ebx, eax
test eax, eax
jne 0x1402ec25a
mov rcx, qword [rsi + 8]
mov rax, qword [rcx]
cmp byte [rax + 9], 5
jne 0x1402ec059
test r13, r13
jne 0x1402ec059
mov dword [rdi + 0x74], r13d
mov rcx, qword [rsi + 8]
mov edx, dword [rcx + 0x34]
xor r9d, r9d
mov rcx, rbp
mov r8d, r12d
call fcn.1402babd0
test eax, eax
jne 0x1402ec255
cmp dword [rsp + 0x28], eax
jne 0x1402ec091
mov edx, dword [rdi + 0x74]
xor r9d, r9d
mov r8d, r12d
mov rcx, rbp
call fcn.1402babd0
test eax, eax
jne 0x1402ec255
cmp byte [rdi + 0x67], 0
jne 0x1402ec255
movsx eax, byte [rdi + 0x6a]
test al, al
jns 0x1402ec0ab
mov rcx, rsi
call fcn.1402b8a40
mov edx, eax
mov rcx, rbp
call fcn.1402baaa0
mov eax, dword [rsp + 0x2c]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r15, qword [rsp + 0x48]
mov rdx, r14
mov r9, r15
mov byte [rdi + 0xc4], al
mov rcx, rdi
call fcn.140257340
mov ebx, eax
test eax, eax
jne 0x1402ec25a
mov r9, r15
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r14
mov rcx, rdi
call fcn.140257340
mov ebx, eax
test eax, eax
jne 0x1402ec25a
mov r9, r15
mov byte [rdi + 0xc4], al
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, r14
mov rcx, rdi
call fcn.140257340
and dword [rdi + 0x2c], 0xfffffffb
mov ebx, eax
test eax, eax
jne 0x1402ec25a
mov r9, r15
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, r14
mov rcx, rdi
call fcn.140257340
mov ebx, eax
test eax, eax
jne 0x1402ec25a
xor r14d, r14d
lea r12, [0x140000000]
nop dword [rax]
nop dword [rax + rax]
movzx r8d, byte [rsi + 0x11]
movzx ebx, byte [r14 + r12 + 0x527dc0]
mov r15, qword [rsi + 8]
test r8b, r8b
je 0x1402ec18d
inc dword [rsi + 0x14]
cmp byte [rsi + 0x12], 0
jne 0x1402ec18d
mov rcx, rsi
call fcn.14024c8f0
movzx r8d, byte [rsi + 0x11]
cmp ebx, 0xf
jne 0x1402ec1a0
mov rax, qword [r15]
mov ebx, dword [rax + 0x84]
add ebx, dword [rsi + 0x1c]
jmp 0x1402ec1b4
mov rax, qword [r15 + 0x18]
lea edx, [rbx*4 + 0x24]
mov rcx, qword [rax + 0x50]
mov ebx, dword [rdx + rcx]
bswap ebx
test r8b, r8b
je 0x1402ec1c7
sub dword [rsi + 0x14], 1
jne 0x1402ec1c7
mov rcx, rsi
call fcn.1403183c0
movzx r8d, byte [r14 + r12 + 0x527dc1]
mov rcx, rbp
movzx edx, byte [r14 + r12 + 0x527dc0]
add r8d, ebx
call fcn.1402bb830
mov ebx, eax
test eax, eax
jne 0x1402ec25a
add r14, 2
cmp r14, 0xa
jl 0x1402ec160
test r13, r13
jne 0x1402ec20e
mov rdx, rbp
mov rcx, rsi
call fcn.1402b8090
mov ebx, eax
test eax, eax
jne 0x1402ec25a
mov rcx, rbp
call fcn.1402b7e30
mov ebx, eax
test eax, eax
jne 0x1402ec25a
test r13, r13
jne 0x1402ec25a
mov rcx, rbp
call fcn.1402b8a40
mov edx, eax
mov rcx, rsi
call fcn.1402baaa0
mov rcx, rbp
call fcn.1402b8b30
mov rcx, qword [rbp + 8]
lea r9d, [rbx + 1]
mov r8d, eax
mov edx, dword [rcx + 0x34]
mov rcx, rsi
call fcn.1402babd0
mov ebx, eax
jmp 0x1402ec25a
mov ebx, 7
mov r12, qword [rsp + 0x20]
mov eax, dword [rsp + 0x30]
mov r9d, 1
mov dword [rdi + 0x2c], eax
xor r8d, r8d
mov rax, qword [rsp + 0x50]
mov rcx, rsi
mov qword [rdi + 0x30], rax
mov rax, qword [rsp + 0x58]
lea edx, [r9 - 2]
mov qword [rdi + 0x78], rax
mov rax, qword [rsp + 0x60]
mov qword [rdi + 0x80], rax
movzx eax, byte [rsp + 0xa8]
mov byte [rdi + 0x6e], al
mov byte [rdi + 0xc4], 0
call fcn.1402babd0
mov rsi, qword [rsp + 0xb0]
mov byte [rdi + 0x65], 1
test r12, r12
je 0x1402ec2d2
mov rcx, qword [r12 + 8]
call fcn.1402b79d0
xor eax, eax
mov qword [r12 + 8], rax
mov qword [r12 + 0x18], rax
mov rcx, rdi
call fcn.1402ea8c0
mov eax, ebx
mov rbp, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
ret