Function at 0x14004c70c
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
xor r14d, r14d
mov rdi, rdx
mov rbp, rcx
cmp byte [rdx + 0x4e], r14b
jne 0x14004c740
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.14004e698
mov eax, 1
jmp 0x14004ca9c
cmp dword [rdx + 0xa4], 1
jle 0x14004c752
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x14004c731
mov eax, dword [rdx + 0x2c]
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]
mov dword [rdx + 0x2c], eax
mov rax, qword [rdx + 0x20]
mov dword [rsp + 0x24], ecx
mov rcx, qword [rdx + 0xc0]
and qword [rdx + 0xc0], r14
mov r12, qword [rax + 8]
mov qword [rsp + 0x28], rcx
mov rcx, r12
call fcn.140036fa8
mov rcx, rax
call fcn.1400460f8
mov ebx, dword [rdx + 0x28]
mov rcx, rdi
mov dword [rsp + 0x78], eax
call fcn.14004f870
test eax, eax
lea rcx, str.ATTACH__AS_vacuum_db_
lea r8, str.ATTACH_:memory:_AS_vacuum_db_
mov rdx, rbp
cmove r8, rcx
mov rcx, rdi
call fcn.140021dec
mov esi, eax
movsxd rax, dword [rdi + 0x28]
cmp eax, ebx
jle 0x14004c7e8
lea ecx, [rax - 1]
movsxd r14, ecx
shl r14, 5
add r14, qword [rdi + 0x20]
test esi, esi
jne 0x14004ca3e
mov rcx, rax
mov rax, qword [rdi + 0x20]
shl rcx, 5
mov r13, qword [rcx + rax - 0x18]
mov rcx, r13
call fcn.140035488
mov rcx, r12
call fcn.140035dd0
lea r8, str.PRAGMA_vacuum_db.synchronousOFF
mov dword [rsp + 0x80], eax
mov rdx, rbp
mov rcx, rdi
mov ebx, eax
call fcn.140021dec
mov esi, eax
test eax, eax
jne 0x14004ca3e
lea r8, str.BEGIN_
mov rdx, rbp
mov rcx, rdi
call fcn.140021dec
mov esi, eax
test eax, eax
jne 0x14004ca3e
lea edx, [rax + 2]
mov rcx, r12
call fcn.140034f98
mov esi, eax
test eax, eax
jne 0x14004ca3e
mov rcx, r12
call fcn.140036fa8
mov rcx, rax
call fcn.1400460f0
cmp eax, 5
jne 0x14004c87e
and dword [rdi + 0x58], esi
mov rcx, r12
call fcn.140035dc8
mov edx, eax
xor r9d, r9d
mov r8d, ebx
mov rcx, r13
call fcn.140037404
test eax, eax
jne 0x14004ca39
cmp dword [rsp + 0x78], eax
jne 0x14004c8bd
mov edx, dword [rdi + 0x58]
xor r9d, r9d
mov r8d, ebx
mov rcx, r13
call fcn.140037404
test eax, eax
jne 0x14004ca39
cmp byte [rdi + 0x50], 0
jne 0x14004ca39
movsx eax, byte [rdi + 0x52]
test al, al
jns 0x14004c8d7
mov rcx, r12
call fcn.140035d08
mov edx, eax
mov rcx, r13
call fcn.140037308
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.140021d54
mov esi, eax
test eax, eax
jne 0x14004ca3e
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.140021d54
mov esi, eax
test eax, eax
jne 0x14004ca3e
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.140021d54
mov esi, eax
test eax, eax
jne 0x14004ca3e
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.140021d54
mov esi, eax
test eax, eax
jne 0x14004ca3e
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.140021d54
mov esi, eax
test eax, eax
jne 0x14004ca3e
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.140021d54
mov esi, eax
test eax, eax
jne 0x14004ca3e
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.140021dec
mov esi, eax
test eax, eax
jne 0x14004ca3e
xor ebx, ebx
lea rsi, [0x14009a850]
mov rcx, r12
movzx edx, byte [rbx + rsi]
lea r8, [rsp + 0x78]
call fcn.140035d68
movzx r8d, byte [rbx + rsi + 1]
mov rcx, r13
add r8d, dword [rsp + 0x78]
movzx edx, byte [rbx + rsi]
call fcn.1400376c8
mov esi, eax
test eax, eax
jne 0x14004ca3e
add rbx, 2
cmp rbx, 0xa
jl 0x14004c9a7
mov rdx, r13
mov rcx, r12
call fcn.1400355e0
mov esi, eax
test eax, eax
jne 0x14004ca3e
mov rcx, r13
call fcn.140035488
mov esi, eax
test eax, eax
jne 0x14004ca3e
mov rcx, r13
call fcn.140035d08
mov edx, eax
mov rcx, r12
call fcn.140037308
mov rcx, r13
call fcn.140035dc8
mov r8d, dword [rsp + 0x80]
lea r9d, [rsi + 1]
mov edx, eax
mov rcx, r12
call fcn.140037404
mov esi, eax
jmp 0x14004ca3e
mov esi, 7
mov eax, dword [rsp + 0x88]
or edx, 0xffffffff
mov dword [rdi + 0x2c], eax
mov r9d, 1
mov eax, dword [rsp + 0x20]
mov r8d, edx
mov dword [rdi + 0x60], eax
mov rcx, r12
mov eax, dword [rsp + 0x24]
mov dword [rdi + 0x64], eax
mov rax, qword [rsp + 0x28]
mov qword [rdi + 0xc0], rax
call fcn.140037404
mov byte [rdi + 0x4e], 1
test r14, r14
je 0x14004ca92
mov rcx, qword [r14 + 8]
call fcn.1400352f4
and qword [r14 + 8], 0
and qword [r14 + 0x18], 0
mov rcx, rdi
call fcn.14004ba24
mov eax, esi
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret