Function at 0x18009f590
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 0x18009f61a
lea edx, [r13 + 0x28]
mov rcx, rbx
call fcn.18000b5f0
mov rdi, rax
test rax, rax
je 0x18009f604
mov rax, qword [str.cannot_VACUUM_from_within_a_transaction]
mov qword [rdi], rax
mov rcx, qword [0x1801538e0]
mov qword [rdi + 8], rcx
mov rcx, qword [0x1801538e8]
mov qword [rdi + 0x10], rcx
mov rcx, qword [0x1801538f0]
mov qword [rdi + 0x18], rcx
mov rcx, qword [0x1801538f8]
mov qword [rdi + 0x20], rcx
mov rdx, qword [rsi]
mov rcx, rbx
call fcn.18000b260
mov qword [rsi], rdi
mov eax, r15d
jmp 0x18009fbc3
cmp dword [rdx + 0xd8], r15d
jle 0x18009f688
mov edx, 0x2b
mov rcx, rbx
call fcn.18000b5f0
mov rdi, rax
test rax, rax
je 0x18009f604
mov rcx, qword [str.cannot_VACUUM___SQL_statements_in_progress]
mov qword [rax], rcx
mov rcx, qword [0x180153908]
mov qword [rax + 8], rcx
mov rcx, qword [0x180153910]
mov qword [rax + 0x10], rcx
mov rcx, qword [0x180153918]
mov qword [rax + 0x18], rcx
mov rcx, qword [0x180153920]
mov qword [rax + 0x20], rcx
movzx eax, word [0x180153928]
mov word [rdi + 0x28], ax
movzx eax, byte [0x18015392a]
mov byte [rdi + 0x2a], al
jmp 0x18009f604
mov qword [rsp + 0x90], rbp
mov ebp, dword [rdx + 0x4c]
lea rcx, [0x180000000]
test r9, r9
je 0x18009f711
movzx eax, word [r9 + 0x14]
and eax, 0x3f
cmp byte [rax + rcx + 0x144840], 3
je 0x18009f6fc
mov edx, 0x12
mov rcx, rbx
call fcn.18000b5f0
mov rdi, rax
test rax, rax
je 0x18009f6e6
mov rcx, qword [str.non_text_filename]
mov qword [rax], rcx
mov rcx, qword [0x180153938]
mov qword [rax + 8], rcx
movzx ecx, word [0x180153940]
mov word [rax + 0x10], cx
mov rdx, qword [rsi]
mov rcx, rbx
call fcn.18000b260
mov qword [rsi], rdi
mov eax, r15d
jmp 0x18009fbbb
mov rcx, r9
call sym.sqlite.dll_sqlite3_value_text
and dword [rbx + 0x4c], 0xfffffffe
or dword [rbx + 0x4c], 6
mov r9, rax
jmp 0x18009f718
lea r9, [0x1801437f4]
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 0x18009f7ab
mov dword [rsp + 0x2c], r13d
cmp byte [rcx + 0x14], r13b
je 0x18009f7b0
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.18009f420
mov dword [rbx + 0x4c], ebp
mov edi, eax
test eax, eax
jne 0x18009fb3c
movsxd r13, dword [rsp + 0x28]
shl r13, 5
add r13, qword [rbx + 0x20]
mov rbp, qword [r13 + 8]
test r14, r14
je 0x18009f89e
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 0x18009f880
lea rdx, [rsp + 0x20]
call qword [rax + 0x30]
test eax, eax
jne 0x18009f820
cmp qword [rsp + 0x20], 0
jle 0x18009f880
mov edx, 0x1b
mov rcx, rbx
mov edi, r15d
call fcn.18000b5f0
mov rbp, rax
test rax, rax
je 0x18009f86d
mov rcx, qword [str.output_file_already_exists]
mov qword [rax], rcx
mov rcx, qword [0x180153968]
mov qword [rax + 8], rcx
mov rcx, qword [0x180153970]
mov qword [rax + 0x10], rcx
movzx ecx, word [0x180153978]
mov word [rax + 0x18], cx
movzx ecx, byte [0x18015397a]
mov byte [rax + 0x1a], cl
mov rdx, qword [rsi]
mov rcx, rbx
call fcn.18000b260
mov qword [rsi], rbp
jmp 0x18009fb3c
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 0x18009f8a3
mov rdi, qword [rsp + 0x38]
mov rcx, r12
call fcn.180026080
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.180025dd0
xor edx, edx
mov rcx, r12
call fcn.180025e70
mov rcx, rbp
mov edx, eax
call fcn.180025e70
or r15d, 0x20
mov rcx, rbp
mov edx, r15d
call fcn.180025f30
lea r8, str.BEGIN
mov rdx, rsi
mov rcx, rbx
call fcn.18009f2e0
mov edi, eax
test eax, eax
jne 0x18009fb3c
xor edx, edx
test r14, r14
mov eax, 2
cmove edx, eax
cmp byte [r12 + 0x11], dil
jne 0x18009f92c
movzx eax, byte [r12 + 0x10]
test al, al
je 0x18009f92c
cmp al, 1
jne 0x18009f9b0
test edx, edx
je 0x18009f941
xor r8d, r8d
mov rcx, r12
call fcn.1800266b0
mov edi, eax
test edi, edi
jne 0x18009fb3c
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x18009f958
test r14, r14
jne 0x18009f958
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.180025f90
test eax, eax
jne 0x18009fb37
cmp dword [rsp + 0x2c], eax
jne 0x18009f999
mov edx, dword [rbx + 0x74]
xor r9d, r9d
mov r8d, edi
mov rcx, rbp
call fcn.180025f90
test eax, eax
jne 0x18009fb37
cmp byte [rbx + 0x67], 0
jne 0x18009fb37
movzx eax, byte [rbx + 0x6a]
test al, al
js 0x18009f9e5
movsx eax, al
jmp 0x18009f9ed
test edx, edx
je 0x18009f941
mov rax, qword [r12]
mov edx, dword [rax + 0x308]
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
cmp edx, dword [rcx + 0x80]
jle 0x18009f9de
cmp byte [rcx + 0xa], 0
je 0x18009f9de
call fcn.18001eb90
jmp 0x18009f937
xor edi, edi
jmp 0x18009f939
mov rcx, r12
call fcn.180026250
mov edx, eax
mov rcx, rbp
call fcn.1800261c0
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.18009f420
mov edi, eax
test eax, eax
jne 0x18009fb3c
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov r9, r15
mov rdx, rsi
mov rcx, rbx
call fcn.18009f420
mov edi, eax
test eax, eax
jne 0x18009fb3c
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.18009f420
and dword [rbx + 0x2c], 0xfffffffb
mov edi, eax
test eax, eax
jne 0x18009fb3c
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.18009f420
mov edi, eax
test eax, eax
jne 0x18009fb3c
xor esi, esi
nop
lea rdi, [0x180000000]
lea r8, [rsp + 0x20]
mov rcx, r12
movzx edx, byte [rsi + rdi + 0x145ff8]
call fcn.18002f9c0
movzx r8d, byte [rsi + rdi + 0x145ff9]
movzx edx, byte [rsi + rdi + 0x145ff8]
add r8d, dword [rsp + 0x20]
mov rcx, rbp
call fcn.18002fa50
mov edi, eax
test eax, eax
jne 0x18009fb3c
add rsi, 2
cmp rsi, 0xa
jl 0x18009fa90
test r14, r14
jne 0x18009faf0
mov rdx, rbp
mov rcx, r12
call fcn.1800321f0
mov edi, eax
test eax, eax
jne 0x18009fb3c
mov rcx, rbp
call fcn.1800278b0
mov edi, eax
test eax, eax
jne 0x18009fb3c
test r14, r14
jne 0x18009fb3c
mov rcx, rbp
call fcn.180026250
mov rcx, r12
mov edx, eax
call fcn.1800261c0
mov rcx, rbp
call fcn.180026080
mov rcx, qword [rbp + 8]
lea r9d, [rdi + 1]
mov edx, dword [rcx + 0x34]
mov r8d, eax
mov rcx, r12
call fcn.180025f90
mov edi, eax
jmp 0x18009fb3c
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.180025f90
mov r12, qword [rsp + 0xa0]
mov byte [rbx + 0x65], 1
test r13, r13
je 0x18009fbb1
mov rcx, qword [r13 + 8]
call fcn.180025ce0
mov qword [r13 + 8], 0
mov qword [r13 + 0x18], 0
mov rcx, rbx
call fcn.180064900
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