Function at 0x14009f390
Capabilities:
Reference sql statements

Disassembly:
push rbp
push rdi
push r14
sub rsp, 0x50
xor r14d, r14d
mov rdi, rdx
mov rbp, rcx
cmp byte [rdx + 0x4f], r14b
jne 0x14009f3c1
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.140036480
lea eax, [r14 + 1]
add rsp, 0x50
pop r14
pop rdi
pop rbp
ret
cmp dword [rdx + 0xa4], 1
jle 0x14009f3e4
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.140036480
mov eax, 1
add rsp, 0x50
pop r14
pop rdi
pop rbp
ret
mov eax, dword [rdx + 0x2c]
lea r8, str.ATTACH_:memory:_AS_vacuum_db_
mov ecx, dword [rdx + 0x60]
mov dword [rsp + 0x88], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [rsp + 0x20], ecx
mov ecx, dword [rdx + 0x64]
cmp byte [rdx + 0x50], 1
mov dword [rdx + 0x2c], eax
mov rax, qword [rdx + 0x20]
mov qword [rsp + 0x70], rbx
mov ebx, dword [rdx + 0x28]
mov dword [rsp + 0x24], ecx
mov rcx, qword [rdx + 0xc8]
mov qword [rdx + 0xc8], r14
mov rdx, rbp
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x30], r15
mov r15, qword [rax + 8]
mov rax, qword [r15 + 8]
mov rcx, qword [rax]
lea rax, str.ATTACH__AS_vacuum_db_
cmove r8, rax
movzx r12d, byte [rcx + 0x13]
mov rcx, rdi
call fcn.14009f210
mov esi, eax
mov eax, dword [rdi + 0x28]
cmp eax, ebx
jle 0x14009f47f
lea ecx, [rax - 1]
movsxd r14, ecx
shl r14, 5
add r14, qword [rdi + 0x20]
test esi, esi
jne 0x14009f712
dec eax
mov qword [rsp + 0x38], r13
movsxd rcx, eax
mov rax, qword [rdi + 0x20]
shl rcx, 5
mov r13, qword [rcx + rax + 8]
mov rcx, r13
call fcn.14004ba40
mov rcx, r15
call fcn.14004a420
mov ebx, eax
mov dword [rsp + 0x80], eax
cmp dword [rdi + 0x58], esi
je 0x14009f4de
mov rcx, qword [rdi + 0x20]
mov rdx, qword [rcx + 8]
mov rcx, qword [rdx + 8]
mov rdx, qword [rcx]
mov rcx, qword [rdx + 0x120]
test rcx, rcx
je 0x14009f4de
cmp dword [rcx], esi
je 0x14009f4de
mov dword [rdi + 0x58], esi
lea r8, str.PRAGMA_vacuum_db.synchronousOFF
mov rdx, rbp
mov rcx, rdi
call fcn.14009f210
mov esi, eax
test eax, eax
jne 0x14009f70d
lea r8, str.BEGIN_
mov rdx, rbp
mov rcx, rdi
call fcn.14009f210
mov esi, eax
test eax, eax
jne 0x14009f70d
lea edx, [rax + 2]
mov rcx, r15
call fcn.14004a9f0
mov esi, eax
test eax, eax
jne 0x14009f70d
mov rax, qword [r15 + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x14009f53b
mov dword [rdi + 0x58], esi
mov rax, qword [r15 + 8]
xor r9d, r9d
mov r8d, ebx
mov rcx, r13
mov edx, dword [rax + 0x34]
call fcn.14004a330
test eax, eax
jne 0x14009f708
test r12d, r12d
jne 0x14009f576
mov edx, dword [rdi + 0x58]
xor r9d, r9d
mov r8d, ebx
mov rcx, r13
call fcn.14004a330
test eax, eax
jne 0x14009f708
cmp byte [rdi + 0x51], 0
jne 0x14009f708
movzx eax, byte [rdi + 0x53]
test al, al
js 0x14009f58d
movsx eax, al
jmp 0x14009f595
mov rcx, r15
call fcn.14004a5a0
mov edx, eax
mov rcx, r13
call fcn.14004a510
lea r8, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov rdx, rbp
mov rcx, rdi
call fcn.14009f2c0
mov esi, eax
test eax, eax
jne 0x14009f70d
lea r8, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov rdx, rbp
mov rcx, rdi
call fcn.14009f2c0
mov esi, eax
test eax, eax
jne 0x14009f70d
lea r8, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov rdx, rbp
mov rcx, rdi
call fcn.14009f2c0
mov esi, eax
test eax, eax
jne 0x14009f70d
or dword [rdi + 0x2c], 0x8000000
lea r8, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name____FROM_main.sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov rdx, rbp
mov rcx, rdi
call fcn.14009f2c0
and dword [rdi + 0x2c], 0xf7ffffff
mov esi, eax
test eax, eax
jne 0x14009f70d
lea r8, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov rdx, rbp
mov rcx, rdi
call fcn.14009f2c0
mov esi, eax
test eax, eax
jne 0x14009f70d
lea r8, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov rdx, rbp
mov rcx, rdi
call fcn.14009f2c0
mov esi, eax
test eax, eax
jne 0x14009f70d
lea r8, str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_main.sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
mov rdx, rbp
mov rcx, rdi
call fcn.14009f210
mov esi, eax
test eax, eax
jne 0x14009f70d
xor ebx, ebx
lea rbp, [0x140290f90]
nop word [rax + rax]
movzx edx, byte [rbx + rbp]
lea r8, [rsp + 0x78]
mov rcx, r15
call fcn.140051c20
movzx r8d, byte [rbx + rbp + 1]
mov rcx, r13
add r8d, dword [rsp + 0x78]
movzx edx, byte [rbx + rbp]
call fcn.140051cb0
mov esi, eax
test eax, eax
jne 0x14009f70d
add rbx, 2
cmp rbx, 0xa
jl 0x14009f680
mov rdx, r13
mov rcx, r15
call fcn.140054420
mov esi, eax
test eax, eax
jne 0x14009f70d
mov rcx, r13
call fcn.14004ba40
mov esi, eax
test eax, eax
jne 0x14009f70d
mov rcx, r13
call fcn.14004a5a0
mov edx, eax
mov rcx, r15
call fcn.14004a510
mov rax, qword [r13 + 8]
lea r9d, [rsi + 1]
mov r8d, dword [rsp + 0x80]
mov rcx, r15
mov edx, dword [rax + 0x34]
call fcn.14004a330
mov esi, eax
jmp 0x14009f70d
mov esi, 7
mov r13, qword [rsp + 0x38]
mov eax, dword [rsp + 0x88]
or r8d, 0xffffffff
mov dword [rdi + 0x2c], eax
mov r9d, 1
mov eax, dword [rsp + 0x20]
or edx, r8d
mov dword [rdi + 0x60], eax
mov rcx, r15
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x64], eax
mov rax, qword [rsp + 0x28]
mov qword [rdi + 0xc8], rax
call fcn.14004a330
mov r15, qword [rsp + 0x30]
mov r12, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x70]
mov byte [rdi + 0x4f], 1
test r14, r14
je 0x14009f77c
mov rcx, qword [r14 + 8]
call fcn.14004a120
mov qword [r14 + 8], 0
mov qword [r14 + 0x18], 0
mov rcx, rdi
call fcn.140077380
mov eax, esi
mov rsi, qword [rsp + 0x48]
add rsp, 0x50
pop r14
pop rdi
pop rbp
ret