Function at 0x180073a90
Capabilities:
Reference sql statements

Disassembly:
push rbp
push rsi
push r15
sub rsp, 0x50
xor r15d, r15d
mov rsi, rdx
mov rbp, rcx
cmp byte [rdx + 0x28], r15b
jne 0x180073ac1
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.1800763c0
lea eax, [r15 + 1]
add rsp, 0x50
pop r15
pop rsi
pop rbp
ret
cmp dword [rdx + 0xb0], 1
jle 0x180073ae4
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.1800763c0
mov eax, 1
add rsp, 0x50
pop r15
pop rsi
pop rbp
ret
mov eax, dword [rdx + 0x18]
lea r8, str.ATTACH_:memory:_AS_vacuum_db_
mov ecx, dword [rdx + 0x4c]
mov dword [rsp + 0x88], eax
and eax, 0xfaffffff
or eax, 0x10050000
mov dword [rsp + 0x20], ecx
mov ecx, dword [rdx + 0x50]
cmp byte [rdx + 0x29], 2
mov dword [rdx + 0x18], eax
mov rax, qword [rdx + 0x10]
mov qword [rsp + 0x70], rbx
mov ebx, dword [rdx + 8]
mov dword [rsp + 0x24], ecx
mov rcx, qword [rdx + 0xc0]
mov qword [rdx + 0xc0], r15
mov rdx, rbp
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x30], r14
mov r14, qword [rax + 8]
mov rax, qword [r14 + 8]
mov rcx, qword [rax]
lea rax, str.ATTACH__AS_vacuum_db_
cmovne r8, rax
movzx r12d, byte [rcx + 0x12]
mov rcx, rsi
call fcn.18003b6e0
mov edi, eax
mov eax, dword [rsi + 8]
cmp eax, ebx
jle 0x180073b7f
lea ecx, [rax - 1]
movsxd r15, ecx
shl r15, 5
add r15, qword [rsi + 0x10]
test edi, edi
jne 0x180073df2
dec eax
mov qword [rsp + 0x38], r13
movsxd rcx, eax
mov rax, qword [rsi + 0x10]
shl rcx, 5
mov r13, qword [rcx + rax + 8]
mov rcx, r13
call fcn.180056b20
mov rcx, r14
call fcn.180057430
mov rcx, qword [r14 + 8]
mov ebx, dword [rcx + 0x34]
sub ebx, dword [rcx + 0x38]
mov dword [rsp + 0x80], ebx
cmp byte [r14 + 0x11], dil
je 0x180073be0
sub dword [r14 + 0x14], 1
jne 0x180073be0
mov rcx, qword [rcx + 0x58]
test rcx, rcx
je 0x180073bdb
call qword [0x1800fe200]
mov byte [r14 + 0x12], 0
mov rax, qword [r14 + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x180073bf4
mov dword [rsi + 0x30], 0
mov rax, qword [r14 + 8]
xor r9d, r9d
mov r8d, ebx
mov rcx, r13
mov edx, dword [rax + 0x34]
call fcn.180059720
test eax, eax
jne 0x180073de8
test r12d, r12d
jne 0x180073c2f
mov edx, dword [rsi + 0x30]
xor r9d, r9d
mov r8d, ebx
mov rcx, r13
call fcn.180059720
test eax, eax
jne 0x180073de8
cmp byte [rsi + 0x2a], 0
jne 0x180073de8
lea r8, str.PRAGMA_vacuum_db.synchronousOFF
mov rdx, rbp
mov rcx, rsi
call fcn.18003b6e0
mov edi, eax
test eax, eax
jne 0x180073ded
movzx eax, byte [rsi + 0x2c]
test al, al
js 0x180073c62
movsx eax, al
jmp 0x180073c6a
mov rcx, r14
call fcn.180057670
mov edx, eax
mov rcx, r13
call fcn.180059600
lea r8, str.BEGIN_EXCLUSIVE_
mov rdx, rbp
mov rcx, rsi
call fcn.18003b6e0
mov edi, eax
test eax, eax
jne 0x180073ded
lea r8, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
mov rdx, rbp
mov rcx, rsi
call fcn.18003b530
mov edi, eax
test eax, eax
jne 0x180073ded
lea r8, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov rdx, rbp
mov rcx, rsi
call fcn.18003b530
mov edi, eax
test eax, eax
jne 0x180073ded
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, rsi
call fcn.18003b530
mov edi, eax
test eax, eax
jne 0x180073ded
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_rootpage_0
mov rdx, rbp
mov rcx, rsi
call fcn.18003b530
mov edi, eax
test eax, eax
jne 0x180073ded
lea r8, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov rdx, rbp
mov rcx, rsi
call fcn.18003b530
mov edi, eax
test eax, eax
jne 0x180073ded
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, rsi
call fcn.18003b530
mov edi, eax
test eax, eax
jne 0x180073ded
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, rsi
call fcn.18003b6e0
mov edi, eax
test eax, eax
jne 0x180073ded
xor ebx, ebx
lea rbp, [0x1800ca958]
nop dword [rax]
movzx edx, byte [rbx + rbp]
lea r8, [rsp + 0x78]
mov rcx, r14
call fcn.1800576d0
movzx r8d, byte [rbx + rbp + 1]
mov rcx, r13
add r8d, dword [rsp + 0x78]
movzx edx, byte [rbx + rbp]
call fcn.180059cf0
mov edi, eax
test eax, eax
jne 0x180073ded
add rbx, 2
cmp rbx, 8
jl 0x180073d60
mov rdx, r13
mov rcx, r14
call fcn.180056cd0
mov edi, eax
test eax, eax
jne 0x180073ded
mov rcx, r13
call fcn.180056b20
mov edi, eax
test eax, eax
jne 0x180073ded
mov rcx, r13
call fcn.180057670
mov edx, eax
mov rcx, r14
call fcn.180059600
mov rax, qword [r13 + 8]
lea r9d, [rdi + 1]
mov r8d, dword [rsp + 0x80]
mov rcx, r14
mov edx, dword [rax + 0x34]
call fcn.180059720
mov edi, eax
jmp 0x180073ded
mov edi, 7
mov r13, qword [rsp + 0x38]
mov eax, dword [rsp + 0x88]
or r8d, 0xffffffff
mov dword [rsi + 0x18], eax
mov r9d, 1
mov eax, dword [rsp + 0x20]
or edx, r8d
mov dword [rsi + 0x4c], eax
mov rcx, r14
mov eax, dword [rsp + 0x24]
mov dword [rsi + 0x50], eax
mov rax, qword [rsp + 0x28]
mov qword [rsi + 0xc0], rax
call fcn.180059720
mov r14, qword [rsp + 0x30]
mov r12, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x70]
mov byte [rsi + 0x28], 1
test r15, r15
je 0x180073e5c
mov rcx, qword [r15 + 8]
call fcn.1800568c0
mov qword [r15 + 8], 0
mov qword [r15 + 0x18], 0
or edx, 0xffffffff
mov rcx, rsi
call fcn.180072d30
mov eax, edi
mov rdi, qword [rsp + 0x48]
add rsp, 0x50
pop r15
pop rsi
pop rbp
ret