Function at 0x140205380
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rdi
push r12
push r13
push r14
sub rsp, 0x60
xor r12d, r12d
movsxd rdi, r8d
mov r13, r9
mov rbx, rdx
mov r14, rcx
cmp byte [rdx + 0x65], r12b
jne 0x1402053fe
lea edx, [r12 + 0x28]
mov rcx, rbx
call fcn.1401e2500
mov rdi, rax
test rax, rax
je 0x1402053d9
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x140294c38]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x140294c48]
movsd qword [rax + 0x20], xmm0
mov rdx, qword [r14]
test rdx, rdx
je 0x1402053e9
mov rcx, rbx
call fcn.1401e2370
mov qword [r14], rdi
mov eax, 1
add rsp, 0x60
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret
cmp dword [rdx + 0xd8], 1
jle 0x140205478
mov edx, 0x2b
mov rcx, rbx
call fcn.1401e2500
mov rdi, rax
test rax, rax
je 0x140205453
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x140294c60]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x140294c70]
movsd qword [rax + 0x20], xmm0
movzx ecx, word [0x140294c78]
mov word [rax + 0x28], cx
movzx ecx, byte [0x140294c7a]
mov byte [rax + 0x2a], cl
mov rdx, qword [r14]
test rdx, rdx
je 0x1402053e9
mov rcx, rbx
call fcn.1401e2370
mov eax, 1
mov qword [r14], rdi
add rsp, 0x60
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret
mov qword [rsp + 0x90], rbp
mov ebp, dword [rdx + 0x4c]
lea rdx, [0x140000000]
test r13, r13
je 0x140205546
movzx ecx, word [r9 + 0x14]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x28ae50], 3
je 0x1402054ee
mov edx, 0x12
mov rcx, rbx
call fcn.1401e2500
mov rdi, rax
test rax, rax
je 0x1402054d1
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [rax], xmm0
movzx ecx, word [0x140294c90]
mov word [rax + 0x10], cx
mov rdx, qword [r14]
test rdx, rdx
je 0x1402054e1
mov rcx, rbx
call fcn.1401e2370
mov qword [r14], rdi
mov eax, 1
jmp 0x1402059e4
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x140205516
cmp byte [r9 + 0x16], 1
jne 0x140205516
mov r9, qword [r9 + 8]
mov eax, ebp
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x14020554d
test cl, 1
je 0x14020552b
mov eax, ebp
xor r9d, r9d
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x14020554d
mov dl, 1
mov rcx, r13
call fcn.140232c20
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x14020554d
lea r9, [0x1402968af]
mov eax, dword [rbx + 0x2c]
mov rcx, qword [rbx + 0x30]
mov rdx, qword [rbx + 0x78]
mov dword [rsp + 0x28], eax
or eax, 6
mov dword [rbx + 0x2c], eax
mov rax, rcx
mov qword [rsp + 0x50], rdx
mov rdx, qword [rbx + 0x80]
mov qword [rsp + 0x48], rcx
movabs rcx, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x58], rdx
movzx edx, byte [rbx + 0x6e]
or rax, 0x201
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
mov byte [rbx + 0x6e], r12b
mov byte [rsp + 0x98], dl
mov rdx, rdi
shl rdx, 5
mov qword [rsp + 0xa0], rsi
mov qword [rsp + 0xa8], r15
mov qword [rsp + 0x38], rdx
mov rcx, qword [rdx + rax]
mov rdi, qword [rdx + rax + 8]
mov qword [rsp + 0x40], rcx
mov rax, qword [rdi + 8]
mov rcx, qword [rax]
cmp byte [rcx + 0x10], r12b
jne 0x1402055e7
mov dword [rsp + 0x20], r12d
cmp byte [rcx + 0x14], r12b
je 0x1402055ef
mov dword [rsp + 0x20], 1
movsxd r15, dword [rbx + 0x28]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rdx, r14
mov dword [rsp + 0x24], r15d
mov rcx, rbx
call fcn.1401ac9b0
mov dword [rbx + 0x4c], ebp
mov esi, eax
test eax, eax
jne 0x140205959
mov r12, r15
shl r12, 5
add r12, qword [rbx + 0x20]
mov rbp, qword [r12 + 8]
test r13, r13
je 0x1402056c0
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x30], 0
mov rax, qword [rcx]
test rax, rax
je 0x1402056bc
lea rdx, [rsp + 0x30]
call qword [rax + 0x30]
test eax, eax
jne 0x140205660
cmp qword [rsp + 0x30], 0
jle 0x1402056bc
mov esi, 1
mov rcx, rbx
lea edx, [rsi + 0x1a]
call fcn.1401e2500
mov rbp, rax
test rax, rax
je 0x1402056a4
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [rax], xmm0
movsd xmm1, qword [0x140294cc0]
movsd qword [rax + 0x10], xmm1
movzx ecx, word [0x140294cc8]
mov word [rax + 0x18], cx
movzx ecx, byte [0x140294cca]
mov byte [rax + 0x1a], cl
mov rdx, qword [r14]
test rdx, rdx
je 0x1402056b4
mov rcx, rbx
call fcn.1401e2370
mov qword [r14], rbp
jmp 0x140205959
or dword [rbx + 0x2c], 8
mov rcx, rdi
call fcn.1401d9a20
mov rcx, qword [rbx + 0x20]
mov r15d, eax
mov rdx, qword [rsp + 0x38]
mov rdx, qword [rdx + rcx + 0x18]
mov rcx, rbp
mov edx, dword [rdx + 0x74]
call fcn.1401dba20
xor edx, edx
mov rcx, rdi
call fcn.1401dbcc0
mov edx, eax
mov rcx, rbp
call fcn.1401dbcc0
mov edx, 0x21
mov rcx, rbp
call fcn.1401dbbc0
lea r8, [0x14029ffe8]
mov rdx, r14
mov rcx, rbx
call fcn.1401ac780
mov esi, eax
test eax, eax
jne 0x140205959
xor edx, edx
mov eax, 2
test r13, r13
mov rcx, rdi
cmove edx, eax
xor r8d, r8d
call fcn.1401d8400
mov esi, eax
test eax, eax
jne 0x140205959
mov rcx, qword [rdi + 8]
mov rax, qword [rcx]
cmp byte [rax + 9], 5
jne 0x14020575d
test r13, r13
jne 0x14020575d
mov dword [rbx + 0x74], r13d
mov rcx, qword [rdi + 8]
mov edx, dword [rcx + 0x34]
xor r9d, r9d
mov rcx, rbp
mov r8d, r15d
call fcn.1401dbac0
test eax, eax
jne 0x140205954
cmp dword [rsp + 0x20], eax
jne 0x140205795
mov edx, dword [rbx + 0x74]
xor r9d, r9d
mov r8d, r15d
mov rcx, rbp
call fcn.1401dbac0
test eax, eax
jne 0x140205954
cmp byte [rbx + 0x67], 0
jne 0x140205954
movsx eax, byte [rbx + 0x6a]
test al, al
jns 0x1402057af
mov rcx, rdi
call fcn.1401d9930
mov edx, eax
mov rcx, rbp
call fcn.1401db990
mov eax, dword [rsp + 0x24]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r15, qword [rsp + 0x40]
mov rdx, r14
mov r9, r15
mov byte [rbx + 0xc4], al
mov rcx, rbx
call fcn.1401ac9b0
mov esi, eax
test eax, eax
jne 0x140205959
mov r9, r15
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r14
mov rcx, rbx
call fcn.1401ac9b0
mov esi, eax
test eax, eax
jne 0x140205959
mov r9, r15
mov byte [rbx + 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, rbx
call fcn.1401ac9b0
and dword [rbx + 0x2c], 0xfffffffb
mov esi, eax
test eax, eax
jne 0x140205959
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, rbx
call fcn.1401ac9b0
mov esi, eax
test eax, eax
jne 0x140205959
xor r14d, r14d
movzx r8d, byte [rdi + 0x11]
lea rax, [0x140000000]
movzx esi, byte [r14 + rax + 0x28af58]
mov r15, qword [rdi + 8]
test r8b, r8b
je 0x140205885
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], 0
jne 0x140205885
mov rcx, rdi
call fcn.1401a2a80
movzx r8d, byte [rdi + 0x11]
cmp esi, 0xf
jne 0x140205898
mov rax, qword [r15]
mov esi, dword [rax + 0x84]
add esi, dword [rdi + 0x1c]
jmp 0x1402058ac
mov rax, qword [r15 + 0x18]
lea edx, [rsi*4 + 0x24]
mov rcx, qword [rax + 0x50]
mov esi, dword [rdx + rcx]
bswap esi
test r8b, r8b
je 0x1402058bf
sub dword [rdi + 0x14], 1
jne 0x1402058bf
mov rcx, rdi
call fcn.140230a30
lea rax, [0x140000000]
mov rcx, rbp
movzx r8d, byte [r14 + rax + 0x28af59]
movzx edx, byte [r14 + rax + 0x28af58]
add r8d, esi
call fcn.1401dc720
mov esi, eax
test eax, eax
jne 0x140205959
add r14, 2
cmp r14, 0xa
jl 0x140205851
test r13, r13
jne 0x14020590d
mov rdx, rbp
mov rcx, rdi
call fcn.1401d8fc0
mov esi, eax
test eax, eax
jne 0x140205959
mov rcx, rbp
call fcn.1401d8d70
mov esi, eax
test eax, eax
jne 0x140205959
test r13, r13
jne 0x140205959
mov rcx, rbp
call fcn.1401d9930
mov edx, eax
mov rcx, rdi
call fcn.1401db990
mov rcx, rbp
call fcn.1401d9a20
mov rcx, qword [rbp + 8]
lea r9d, [rsi + 1]
mov r8d, eax
mov edx, dword [rcx + 0x34]
mov rcx, rdi
call fcn.1401dbac0
mov esi, eax
jmp 0x140205959
mov esi, 7
mov eax, dword [rsp + 0x28]
mov r9d, 1
mov dword [rbx + 0x2c], eax
xor r8d, r8d
mov rax, qword [rsp + 0x48]
mov rcx, rdi
mov qword [rbx + 0x30], rax
mov rax, qword [rsp + 0x50]
lea edx, [r9 - 2]
mov qword [rbx + 0x78], rax
mov rax, qword [rsp + 0x58]
mov qword [rbx + 0x80], rax
movzx eax, byte [rsp + 0x98]
mov byte [rbx + 0x6e], al
mov byte [rbx + 0xc4], 0
call fcn.1401dbac0
mov r15, qword [rsp + 0xa8]
mov byte [rbx + 0x65], 1
test r12, r12
je 0x1402059d2
mov rcx, qword [r12 + 8]
call fcn.1401d8910
mov qword [r12 + 8], 0
mov qword [r12 + 0x18], 0
mov rcx, rbx
call fcn.140204020
mov eax, esi
mov rsi, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x90]
add rsp, 0x60
pop r14
pop r13
pop r12
pop rdi
pop rbx
ret