Function at 0x18009f800
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x60
xor r13d, r13d
mov r14, r9
movsxd rdi, r8d
mov rbx, rdx
mov rsi, rcx
lea r15d, [r13 + 1]
cmp byte [rdx + 0x65], r13b
jne 0x18009f88a
lea edx, [r13 + 0x28]
mov rcx, rbx
call fcn.18000b790
mov rdi, rax
test rax, rax
je 0x18009f874
mov rax, qword [str.cannot_VACUUM_from_within_a_transaction]
mov qword [rdi], rax
mov rcx, qword [0x180153930]
mov qword [rdi + 8], rcx
mov rcx, qword [0x180153938]
mov qword [rdi + 0x10], rcx
mov rcx, qword [0x180153940]
mov qword [rdi + 0x18], rcx
mov rcx, qword [0x180153948]
mov qword [rdi + 0x20], rcx
mov rdx, qword [rsi]
mov rcx, rbx
call fcn.18000b400
mov qword [rsi], rdi
mov eax, r15d
jmp 0x18009fe33
cmp dword [rdx + 0xd8], r15d
jle 0x18009f8f8
mov edx, 0x2b
mov rcx, rbx
call fcn.18000b790
mov rdi, rax
test rax, rax
je 0x18009f874
mov rcx, qword [str.cannot_VACUUM___SQL_statements_in_progress]
mov qword [rax], rcx
mov rcx, qword [0x180153958]
mov qword [rax + 8], rcx
mov rcx, qword [0x180153960]
mov qword [rax + 0x10], rcx
mov rcx, qword [0x180153968]
mov qword [rax + 0x18], rcx
mov rcx, qword [0x180153970]
mov qword [rax + 0x20], rcx
movzx eax, word [0x180153978]
mov word [rdi + 0x28], ax
movzx eax, byte [0x18015397a]
mov byte [rdi + 0x2a], al
jmp 0x18009f874
mov qword [rsp + 0x90], rbp
mov ebp, dword [rdx + 0x4c]
lea rcx, [0x180000000]
test r9, r9
je 0x18009f981
movzx eax, word [r9 + 0x14]
and eax, 0x3f
cmp byte [rax + rcx + 0x144890], 3
je 0x18009f96c
mov edx, 0x12
mov rcx, rbx
call fcn.18000b790
mov rdi, rax
test rax, rax
je 0x18009f956
mov rcx, qword [str.non_text_filename]
mov qword [rax], rcx
mov rcx, qword [0x180153988]
mov qword [rax + 8], rcx
movzx ecx, word [0x180153990]
mov word [rax + 0x10], cx
mov rdx, qword [rsi]
mov rcx, rbx
call fcn.18000b400
mov qword [rsi], rdi
mov eax, r15d
jmp 0x18009fe2b
mov rcx, r9
call sym.sqlite.dll_sqlite3_value_text
and dword [rbx + 0x4c], 0xfffffffe
or dword [rbx + 0x4c], 6
mov r9, rax
jmp 0x18009f988
lea r9, [0x180143844]
mov eax, dword [rbx + 0x2c]
mov rcx, qword [rbx + 0x30]
mov rdx, qword [rbx + 0x78]
mov dword [rsp + 0x30], eax
or eax, 6
mov qword [rsp + 0x40], rcx
mov dword [rbx + 0x2c], eax
mov rax, rcx
mov qword [rsp + 0x48], rdx
mov rdx, qword [rbx + 0x80]
movabs rcx, 0xfffffffeefffafff
mov qword [rsp + 0xa0], r12
and rax, rcx
mov qword [rsp + 0x58], rdx
movzx edx, byte [rbx + 0x6e]
mov byte [rbx + 0x6e], r13b
or rax, 0x201
mov rcx, rdi
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
shl rcx, 5
mov r12, qword [rcx + rax + 8]
mov byte [rsp + 0x98], dl
mov rdx, qword [rcx + rax]
mov rax, qword [r12 + 8]
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x50], rdx
mov rcx, qword [rax]
cmp byte [rcx + 0x10], r13b
jne 0x18009fa1b
mov dword [rsp + 0x2c], r13d
cmp byte [rcx + 0x14], r13b
je 0x18009fa20
mov dword [rsp + 0x2c], r15d
mov eax, dword [rbx + 0x28]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rdx, rsi
mov rcx, rbx
mov dword [rsp + 0x28], eax
call fcn.18009f690
mov dword [rbx + 0x4c], ebp
mov edi, eax
test eax, eax
jne 0x18009fdac
movsxd r13, dword [rsp + 0x28]
shl r13, 5
add r13, qword [rbx + 0x20]
mov rbp, qword [r13 + 8]
test r14, r14
je 0x18009fb0e
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x20], 0
mov rax, qword [rcx]
test rax, rax
je 0x18009faf0
lea rdx, [rsp + 0x20]
call qword [rax + 0x30]
test eax, eax
jne 0x18009fa90
cmp qword [rsp + 0x20], 0
jle 0x18009faf0
mov edx, 0x1b
mov rcx, rbx
mov edi, r15d
call fcn.18000b790
mov rbp, rax
test rax, rax
je 0x18009fadd
mov rcx, qword [str.output_file_already_exists]
mov qword [rax], rcx
mov rcx, qword [0x1801539b8]
mov qword [rax + 8], rcx
mov rcx, qword [0x1801539c0]
mov qword [rax + 0x10], rcx
movzx ecx, word [0x1801539c8]
mov word [rax + 0x18], cx
movzx ecx, byte [0x1801539ca]
mov byte [rax + 0x1a], cl
mov rdx, qword [rsi]
mov rcx, rbx
call fcn.18000b400
mov qword [rsi], rbp
jmp 0x18009fdac
mov rax, qword [rbx + 0x20]
or dword [rbx + 0x2c], 8
mov rdi, qword [rsp + 0x38]
movzx r15d, byte [rdi + rax + 0x10]
mov eax, dword [rbx + 0x30]
and eax, 0x38
or r15d, eax
jmp 0x18009fb13
mov rdi, qword [rsp + 0x38]
mov rcx, r12
call fcn.180026300
mov rcx, qword [rbx + 0x20]
mov rdx, qword [rdi + rcx + 0x18]
mov rcx, rbp
mov dword [rsp + 0x20], eax
mov edx, dword [rdx + 0x74]
call fcn.180026050
xor edx, edx
mov rcx, r12
call fcn.1800260f0
mov rcx, rbp
mov edx, eax
call fcn.1800260f0
or r15d, 0x20
mov rcx, rbp
mov edx, r15d
call fcn.1800261b0
lea r8, str.BEGIN
mov rdx, rsi
mov rcx, rbx
call fcn.18009f550
mov edi, eax
test eax, eax
jne 0x18009fdac
xor edx, edx
test r14, r14
mov eax, 2
cmove edx, eax
cmp byte [r12 + 0x11], dil
jne 0x18009fb9c
movzx eax, byte [r12 + 0x10]
test al, al
je 0x18009fb9c
cmp al, 1
jne 0x18009fc20
test edx, edx
je 0x18009fbb1
xor r8d, r8d
mov rcx, r12
call fcn.180026930
mov edi, eax
test edi, edi
jne 0x18009fdac
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x18009fbc8
test r14, r14
jne 0x18009fbc8
mov dword [rbx + 0x74], r14d
mov rax, qword [r12 + 8]
mov edi, dword [rsp + 0x20]
xor r9d, r9d
mov edx, dword [rax + 0x34]
mov r8d, edi
mov rcx, rbp
call fcn.180026210
test eax, eax
jne 0x18009fda7
cmp dword [rsp + 0x2c], eax
jne 0x18009fc09
mov edx, dword [rbx + 0x74]
xor r9d, r9d
mov r8d, edi
mov rcx, rbp
call fcn.180026210
test eax, eax
jne 0x18009fda7
cmp byte [rbx + 0x67], 0
jne 0x18009fda7
movzx eax, byte [rbx + 0x6a]
test al, al
js 0x18009fc55
movsx eax, al
jmp 0x18009fc5d
test edx, edx
je 0x18009fbb1
mov rax, qword [r12]
mov edx, dword [rax + 0x308]
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
cmp edx, dword [rcx + 0x80]
jle 0x18009fc4e
cmp byte [rcx + 0xa], 0
je 0x18009fc4e
call fcn.18001ee10
jmp 0x18009fba7
xor edi, edi
jmp 0x18009fba9
mov rcx, r12
call fcn.1800264d0
mov edx, eax
mov rcx, rbp
call fcn.180026440
mov eax, dword [rsp + 0x28]
mov r15, qword [rsp + 0x50]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r9, r15
mov rdx, rsi
mov rcx, rbx
mov byte [rbx + 0xc4], al
call fcn.18009f690
mov edi, eax
test eax, eax
jne 0x18009fdac
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov r9, r15
mov rdx, rsi
mov rcx, rbx
call fcn.18009f690
mov edi, eax
test eax, eax
jne 0x18009fdac
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 r9, r15
mov rdx, rsi
mov rcx, rbx
mov byte [rbx + 0xc4], al
call fcn.18009f690
and dword [rbx + 0x2c], 0xfffffffb
mov edi, eax
test eax, eax
jne 0x18009fdac
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov r9, r15
mov rdx, rsi
mov rcx, rbx
call fcn.18009f690
mov edi, eax
test eax, eax
jne 0x18009fdac
xor esi, esi
nop
lea rdi, [0x180000000]
lea r8, [rsp + 0x20]
mov rcx, r12
movzx edx, byte [rsi + rdi + 0x146048]
call fcn.18002fc40
movzx r8d, byte [rsi + rdi + 0x146049]
movzx edx, byte [rsi + rdi + 0x146048]
add r8d, dword [rsp + 0x20]
mov rcx, rbp
call fcn.18002fcd0
mov edi, eax
test eax, eax
jne 0x18009fdac
add rsi, 2
cmp rsi, 0xa
jl 0x18009fd00
test r14, r14
jne 0x18009fd60
mov rdx, rbp
mov rcx, r12
call fcn.180032470
mov edi, eax
test eax, eax
jne 0x18009fdac
mov rcx, rbp
call fcn.180027b30
mov edi, eax
test eax, eax
jne 0x18009fdac
test r14, r14
jne 0x18009fdac
mov rcx, rbp
call fcn.1800264d0
mov rcx, r12
mov edx, eax
call fcn.180026440
mov rcx, rbp
call fcn.180026300
mov rcx, qword [rbp + 8]
lea r9d, [rdi + 1]
mov edx, dword [rcx + 0x34]
mov r8d, eax
mov rcx, r12
call fcn.180026210
mov edi, eax
jmp 0x18009fdac
mov edi, 7
mov eax, dword [rsp + 0x30]
mov r9d, 1
xor r8d, r8d
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x40]
or edx, 0xffffffff
mov qword [rbx + 0x30], rax
mov rax, qword [rsp + 0x48]
mov rcx, r12
mov qword [rbx + 0x78], rax
mov rax, qword [rsp + 0x58]
mov byte [rbx + 0xc4], 0
mov qword [rbx + 0x80], rax
movzx eax, byte [rsp + 0x98]
mov byte [rbx + 0x6e], al
call fcn.180026210
mov r12, qword [rsp + 0xa0]
mov byte [rbx + 0x65], 1
test r13, r13
je 0x18009fe21
mov rcx, qword [r13 + 8]
call fcn.180025f60
mov qword [r13 + 8], 0
mov qword [r13 + 0x18], 0
mov rcx, rbx
call fcn.180064b80
mov eax, edi
mov rbp, qword [rsp + 0x90]
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret