Function at 0x1800679a0
Capabilities:
Reference sql statements

Disassembly:
push rdi
push r12
sub rsp, 0x58
xor r12d, r12d
mov rdi, rdx
cmp byte [rdx + 0x28], r12b
jne 0x1800679cd
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.180007950
lea eax, [r12 + 1]
add rsp, 0x58
pop r12
pop rdi
ret
mov eax, dword [rdx + 0x4c]
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x50], rbp
mov dword [rsp + 0x80], eax
mov eax, dword [rdx + 0x50]
mov qword [rsp + 0x48], rsi
mov dword [rsp + 0x88], eax
mov rax, qword [rdx + 0xb8]
mov qword [rdx + 0xb8], r12
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], r15
mov r15d, dword [rdx + 0x18]
mov eax, r15d
btr eax, 0x1a
or eax, 0x50000
mov dword [rdx + 0x18], eax
mov rax, qword [rdx + 0x10]
lea rdx, str.ATTACH__AS_vacuum_db_
mov rbp, qword [rax + 8]
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
movzx esi, byte [rcx + 0x11]
mov rcx, rdi
call fcn.1800675d0
mov ebx, eax
test eax, eax
jne 0x180067c9b
movsxd rcx, dword [rdi + 8]
mov rdx, qword [rdi + 0x10]
mov qword [rsp + 0x40], r13
lea eax, [rcx - 1]
mov qword [rsp + 0x38], r14
movsxd r12, eax
mov rax, rcx
shl rax, 5
shl r12, 5
mov r13, qword [rax + rdx - 0x18]
add r12, rdx
mov rcx, r13
call fcn.1800171f0
mov rcx, rbp
call fcn.180013580
mov rcx, qword [rbp + 8]
movzx eax, word [rcx + 0x26]
movzx r14d, word [rcx + 0x24]
sub r14d, eax
cmp byte [rbp + 0x11], bl
je 0x180067aaf
dec dword [rbp + 0x14]
jne 0x180067aaf
mov rcx, qword [rcx + 0x48]
test rcx, rcx
je 0x180067aab
call qword [0x1800ac478]
mov byte [rbp + 0x12], 0
mov rax, qword [rbp + 8]
xor r9d, r9d
mov r8d, r14d
movzx edx, word [rax + 0x24]
mov rcx, r13
call fcn.180015b60
test eax, eax
jne 0x180067c8c
test esi, esi
jne 0x180067aea
mov edx, dword [rdi + 0x30]
xor r9d, r9d
mov r8d, r14d
mov rcx, r13
call fcn.180015b60
test eax, eax
jne 0x180067c8c
cmp byte [rdi + 0x2a], 0
jne 0x180067c8c
lea rdx, str.PRAGMA_vacuum_db.synchronousOFF
mov rcx, rdi
call fcn.1800675d0
mov ebx, eax
test eax, eax
jne 0x180067c91
movzx eax, byte [rdi + 0x2d]
test al, al
js 0x180067b1a
movsx eax, al
jmp 0x180067b22
mov rcx, rbp
call fcn.180015ce0
mov edx, eax
mov rcx, r13
call fcn.180015c50
lea rdx, str.BEGIN_EXCLUSIVE_
mov rcx, rdi
call fcn.1800675d0
mov ebx, eax
test eax, eax
jne 0x180067c91
lea rdx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
mov rcx, rdi
call fcn.180067670
mov ebx, eax
test eax, eax
jne 0x180067c91
lea rdx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov rcx, rdi
call fcn.180067670
mov ebx, eax
test eax, eax
jne 0x180067c91
lea rdx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov rcx, rdi
call fcn.180067670
mov ebx, eax
test eax, eax
jne 0x180067c91
lea rdx, 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 rcx, rdi
call fcn.180067670
mov ebx, eax
test eax, eax
jne 0x180067c91
lea rdx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov rcx, rdi
call fcn.180067670
mov ebx, eax
test eax, eax
jne 0x180067c91
lea rdx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov rcx, rdi
call fcn.180067670
mov ebx, eax
test eax, eax
jne 0x180067c91
lea rdx, 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 rcx, rdi
call fcn.1800675d0
mov ebx, eax
test eax, eax
jne 0x180067c91
xor esi, esi
lea rbx, [0x180098e20]
nop dword [rax]
movzx edx, byte [rsi + rbx]
lea r8, [rsp + 0x78]
mov rcx, rbp
call fcn.18001ce90
movzx r8d, byte [rsi + rbx + 1]
movzx edx, byte [rsi + rbx]
add r8d, dword [rsp + 0x78]
mov rcx, r13
call fcn.18001cf30
mov ebx, eax
test eax, eax
jne 0x180067c91
add rsi, 2
lea rbx, [0x180098e20]
cmp rsi, 8
jl 0x180067c00
mov rdx, r13
mov rcx, rbp
call fcn.18001f880
mov ebx, eax
test eax, eax
jne 0x180067c91
mov rcx, r13
call fcn.1800171f0
mov ebx, eax
test eax, eax
jne 0x180067c91
mov rcx, r13
call fcn.180015ce0
mov rcx, rbp
mov edx, eax
call fcn.180015c50
mov r11, qword [r13 + 8]
lea r9d, [rbx + 1]
movzx edx, word [r11 + 0x24]
mov r8d, r14d
mov rcx, rbp
call fcn.180015b60
mov ebx, eax
jmp 0x180067c91
mov ebx, 7
mov r13, qword [rsp + 0x40]
mov r14, qword [rsp + 0x38]
mov eax, dword [rsp + 0x80]
mov rsi, qword [rsp + 0x48]
mov rbp, qword [rsp + 0x50]
mov dword [rdi + 0x4c], eax
mov eax, dword [rsp + 0x88]
mov dword [rdi + 0x18], r15d
mov r15, qword [rsp + 0x30]
mov dword [rdi + 0x50], eax
mov rax, qword [rsp + 0x20]
mov qword [rdi + 0xb8], rax
mov byte [rdi + 0x28], 1
test r12, r12
je 0x180067cf3
mov rcx, qword [r12 + 8]
call fcn.180015920
mov qword [r12 + 8], 0
mov qword [r12 + 0x18], 0
xor edx, edx
mov rcx, rdi
call fcn.18003d0b0
mov eax, ebx
mov rbx, qword [rsp + 0x70]
add rsp, 0x58
pop r12
pop rdi
ret