Function at 0x1402aa920
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 0x1402aa99b
lea edx, [r12 + 0x28]
mov rcx, rdi
call fcn.140280630
mov rbx, rax
test rax, rax
je 0x1402aa97e
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1403e3e28]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1403e3e38]
movsd qword [rax + 0x20], xmm0
mov rdx, qword [r14]
test rdx, rdx
je 0x1402aa98e
mov rcx, rdi
call fcn.1402804a0
mov qword [r14], rbx
mov eax, 1
jmp 0x1402aafe4
cmp dword [rdx + 0xd8], 1
jle 0x1402aaa0d
mov edx, 0x2b
mov rcx, rdi
call fcn.140280630
mov rbx, rax
test rax, rax
je 0x1402aa9f0
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1403e3e50]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1403e3e60]
movsd qword [rax + 0x20], xmm0
movzx ecx, word [0x1403e3e68]
mov word [rax + 0x28], cx
movzx ecx, byte [0x1403e3e6a]
mov byte [rax + 0x2a], cl
mov rdx, qword [r14]
test rdx, rdx
je 0x1402aa98e
mov rcx, rdi
call fcn.1402804a0
mov eax, 1
mov qword [r14], rbx
jmp 0x1402aafe4
mov qword [rsp + 0xa0], rbp
mov ebp, dword [rdx + 0x4c]
lea rdx, [0x140000000]
test r13, r13
je 0x1402aaadb
movzx ecx, word [r9 + 0x14]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x3d7e00], 3
je 0x1402aaa83
mov edx, reloc.WS2_32.dll_select
mov rcx, rdi
call fcn.140280630
mov rbx, rax
test rax, rax
je 0x1402aaa66
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [rax], xmm0
movzx ecx, word [0x1403e3e80]
mov word [rax + 0x10], cx
mov rdx, qword [r14]
test rdx, rdx
je 0x1402aaa76
mov rcx, rdi
call fcn.1402804a0
mov qword [r14], rbx
mov eax, 1
jmp 0x1402aafdc
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x1402aaaab
cmp byte [r9 + 0x16], 1
jne 0x1402aaaab
mov r9, qword [r9 + 8]
mov eax, ebp
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1402aaae2
test cl, 1
je 0x1402aaac0
mov eax, ebp
xor r9d, r9d
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1402aaae2
mov dl, 1
mov rcx, r13
call fcn.1402d93f0
mov r9, rax
mov eax, dword [rdi + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1402aaae2
lea r9, [0x1403fb94f]
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 0x1402aab74
mov dword [rsp + 0x28], r12d
cmp byte [rcx + 0x14], r12b
je 0x1402aab7c
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.140216090
mov dword [rdi + 0x4c], ebp
mov ebx, eax
test eax, eax
jne 0x1402aaf5f
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 0x1402aac4c
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 0x1402aac48
lea rdx, [rsp + 0x38]
call qword [rax + 0x30]
test eax, eax
jne 0x1402aabec
cmp qword [rsp + 0x38], r12
jle 0x1402aac48
mov ebx, 1
mov rcx, rdi
lea edx, [rbx + 0x1a]
call fcn.140280630
mov rbp, rax
test rax, rax
je 0x1402aac30
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [rax], xmm0
movsd xmm1, qword [0x1403e3eb0]
movsd qword [rax + 0x10], xmm1
movzx ecx, word [0x1403e3eb8]
mov word [rax + 0x18], cx
movzx ecx, byte [0x1403e3eba]
mov byte [rax + 0x1a], cl
mov rdx, qword [r14]
test rdx, rdx
je 0x1402aac40
mov rcx, rdi
call fcn.1402804a0
mov qword [r14], rbp
jmp 0x1402aaf5a
or dword [rdi + 0x2c], 8
mov rcx, rsi
call fcn.140277830
cmp dword [rdi + 0x74], 0
mov r12d, eax
je 0x1402aacc7
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.14026fc80
mov rax, qword [rbx + 8]
test rax, rax
je 0x1402aacb5
mov rax, qword [rax + 8]
mov rcx, qword [rax]
mov rdx, qword [rcx + 0x130]
test rdx, rdx
je 0x1402aacc7
cmp dword [rdx], 1
mov ecx, dword [rdx + 0x20]
je 0x1402aacac
mov rax, qword [rdx + 0x68]
cmp qword [rax + 0x20], 0
jne 0x1402aacbc
mov rax, qword [rdx + 0x68]
mov ecx, dword [rax + 4]
jmp 0x1402aacbc
mov ecx, dword [rsp + 0xa8]
test ecx, ecx
je 0x1402aacc7
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.140279830
xor edx, edx
mov rcx, rsi
call fcn.140279ad0
mov edx, eax
mov rcx, rbp
call fcn.140279ad0
mov edx, 0x21
mov rcx, rbp
call fcn.1402799d0
lea r8, str.BEGIN
mov rdx, r14
mov rcx, rdi
call fcn.140215e40
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
xor edx, edx
mov eax, 2
test r13, r13
mov rcx, rsi
cmove edx, eax
xor r8d, r8d
call fcn.1402761d0
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
mov rcx, qword [rsi + 8]
mov rax, qword [rcx]
cmp byte [rax + 9], 5
jne 0x1402aad59
test r13, r13
jne 0x1402aad59
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.1402798d0
test eax, eax
jne 0x1402aaf55
cmp dword [rsp + 0x28], eax
jne 0x1402aad91
mov edx, dword [rdi + 0x74]
xor r9d, r9d
mov r8d, r12d
mov rcx, rbp
call fcn.1402798d0
test eax, eax
jne 0x1402aaf55
cmp byte [rdi + 0x67], 0
jne 0x1402aaf55
movsx eax, byte [rdi + 0x6a]
test al, al
jns 0x1402aadab
mov rcx, rsi
call fcn.140277740
mov edx, eax
mov rcx, rbp
call fcn.1402797a0
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.140216090
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
mov r9, r15
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r14
mov rcx, rdi
call fcn.140216090
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
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.140216090
and dword [rdi + 0x2c], 0xfffffffb
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
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.140216090
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
xor r14d, r14d
lea r12, [0x140000000]
nop dword [rax]
nop dword [rax + rax]
movzx r8d, byte [rsi + 0x11]
movzx ebx, byte [r14 + r12 + 0x3d7ba0]
mov r15, qword [rsi + 8]
test r8b, r8b
je 0x1402aae8d
inc dword [rsi + 0x14]
cmp byte [rsi + 0x12], 0
jne 0x1402aae8d
mov rcx, rsi
call fcn.14020b640
movzx r8d, byte [rsi + 0x11]
cmp ebx, 0xf
jne 0x1402aaea0
mov rax, qword [r15]
mov ebx, dword [rax + 0x84]
add ebx, dword [rsi + 0x1c]
jmp 0x1402aaeb4
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 0x1402aaec7
sub dword [rsi + 0x14], 1
jne 0x1402aaec7
mov rcx, rsi
call fcn.1402d7070
movzx r8d, byte [r14 + r12 + 0x3d7ba1]
mov rcx, rbp
movzx edx, byte [r14 + r12 + 0x3d7ba0]
add r8d, ebx
call fcn.14027a530
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
add r14, 2
cmp r14, 0xa
jl 0x1402aae60
test r13, r13
jne 0x1402aaf0e
mov rdx, rbp
mov rcx, rsi
call fcn.140276d90
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
mov rcx, rbp
call fcn.140276b30
mov ebx, eax
test eax, eax
jne 0x1402aaf5a
test r13, r13
jne 0x1402aaf5a
mov rcx, rbp
call fcn.140277740
mov edx, eax
mov rcx, rsi
call fcn.1402797a0
mov rcx, rbp
call fcn.140277830
mov rcx, qword [rbp + 8]
lea r9d, [rbx + 1]
mov r8d, eax
mov edx, dword [rcx + 0x34]
mov rcx, rsi
call fcn.1402798d0
mov ebx, eax
jmp 0x1402aaf5a
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.1402798d0
mov rsi, qword [rsp + 0xb0]
mov byte [rdi + 0x65], 1
test r12, r12
je 0x1402aafd2
mov rcx, qword [r12 + 8]
call fcn.1402766d0
xor eax, eax
mov qword [r12 + 8], rax
mov qword [r12 + 0x18], rax
mov rcx, rdi
call fcn.1402a95c0
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