Function at 0x14005f3d0
Capabilities:
Reference sql statements

Disassembly:
push rsi
push r14
push r15
sub rsp, 0x50
xor r15d, r15d
mov rsi, rdx
mov r14, rcx
cmp byte [rdx + 0x4e], r15b
jne 0x14005f403
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.140062e00
lea eax, [r15 + 1]
add rsp, 0x50
pop r15
pop r14
pop rsi
ret
cmp dword [rdx + 0xa4], 1
jle 0x14005f427
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.140062e00
mov eax, 1
add rsp, 0x50
pop r15
pop r14
pop rsi
ret
mov eax, dword [rdx + 0x2c]
mov ecx, dword [rdx + 0x60]
mov qword [rsp + 0x70], rbx
mov ebx, dword [rdx + 0x28]
mov dword [rsp + 0x80], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [rdx + 0x4f], 2
mov dword [rsp + 0x88], ecx
mov ecx, dword [rdx + 0x64]
mov dword [rdx + 0x2c], eax
mov rax, qword [rdx + 0x20]
mov dword [rsp + 0x20], ecx
mov rcx, qword [rdx + 0xc0]
mov qword [rdx + 0xc0], r15
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x48], rbp
mov rbp, qword [rax + 8]
mov rax, qword [rbp + 8]
lea r8, str.ATTACH_:memory:_AS_vacuum_db_
mov rdx, r14
mov rcx, qword [rax]
mov qword [rsp + 0x40], rdi
movzx eax, byte [rcx + 0x13]
mov rcx, rsi
mov dword [rsp + 0x78], eax
lea rax, str.ATTACH__AS_vacuum_db_
cmovne r8, rax
call fcn.140021300
mov edi, eax
movsxd rax, dword [rsi + 0x28]
cmp eax, ebx
jle 0x14005f4c4
lea ecx, [rax - 1]
movsxd r15, ecx
shl r15, 5
add r15, qword [rsi + 0x20]
test edi, edi
jne 0x14005f747
mov rcx, rax
mov rax, qword [rsi + 0x20]
mov qword [rsp + 0x38], r12
shl rcx, 5
mov qword [rsp + 0x30], r13
mov r13, qword [rcx + rax - 0x18]
mov rcx, r13
call fcn.14003e380
cmp byte [rbp + 0x11], dil
je 0x14005f505
inc dword [rbp + 0x14]
cmp byte [rbp + 0x12], dil
jne 0x14005f505
mov rcx, rbp
call fcn.140018460
mov rax, qword [rbp + 8]
mov r12d, dword [rax + 0x30]
sub r12d, dword [rax + 0x34]
cmp byte [rbp + 0x11], 0
je 0x14005f524
dec dword [rbp + 0x14]
jne 0x14005f524
mov rcx, rbp
call fcn.1400786e0
lea r8, str.PRAGMA_vacuum_db.synchronousOFF
mov rdx, r14
mov rcx, rsi
call fcn.140021300
mov edi, eax
test eax, eax
jne 0x14005f73d
lea r8, str.BEGIN_
mov rdx, r14
mov rcx, rsi
call fcn.140021300
mov edi, eax
test eax, eax
jne 0x14005f73d
lea edx, [rax + 2]
mov rcx, rbp
call fcn.14003dd40
mov edi, eax
test eax, eax
jne 0x14005f73d
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x14005f581
mov dword [rsi + 0x58], edi
mov rax, qword [rbp + 8]
xor r9d, r9d
mov r8d, r12d
mov edx, dword [rax + 0x30]
mov rcx, r13
call fcn.140040d20
test eax, eax
jne 0x14005f738
cmp dword [rsp + 0x78], eax
jne 0x14005f5bd
mov edx, dword [rsi + 0x58]
xor r9d, r9d
mov r8d, r12d
mov rcx, r13
call fcn.140040d20
test eax, eax
jne 0x14005f738
cmp byte [rsi + 0x50], 0
jne 0x14005f738
movzx eax, byte [rsi + 0x52]
test al, al
js 0x14005f5d4
movsx eax, al
jmp 0x14005f5dc
mov rcx, rbp
call fcn.14003ee00
mov edx, eax
mov rcx, r13
call fcn.140040b70
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, r14
mov rcx, rsi
call fcn.140021230
mov edi, eax
test eax, eax
jne 0x14005f73d
lea r8, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov rdx, r14
mov rcx, rsi
call fcn.140021230
mov edi, eax
test eax, eax
jne 0x14005f73d
lea r8, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov rdx, r14
mov rcx, rsi
call fcn.140021230
mov edi, eax
test eax, eax
jne 0x14005f73d
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, r14
mov rcx, rsi
call fcn.140021230
mov edi, eax
test eax, eax
jne 0x14005f73d
lea r8, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov rdx, r14
mov rcx, rsi
call fcn.140021230
mov edi, eax
test eax, eax
jne 0x14005f73d
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, r14
mov rcx, rsi
call fcn.140021230
mov edi, eax
test eax, eax
jne 0x14005f73d
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, r14
mov rcx, rsi
call fcn.140021300
mov edi, eax
test eax, eax
jne 0x14005f73d
xor ebx, ebx
lea r14, [0x1402d3e90]
movzx edx, byte [rbx + r14]
lea r8, [rsp + 0x78]
mov rcx, rbp
call fcn.14003ee60
movzx r8d, byte [rbx + r14 + 1]
movzx edx, byte [rbx + r14]
add r8d, dword [rsp + 0x78]
mov rcx, r13
call fcn.140041250
mov edi, eax
test eax, eax
jne 0x14005f73d
add rbx, 2
cmp rbx, 0xa
jl 0x14005f6b3
mov rdx, r13
mov rcx, rbp
call fcn.14003e5a0
mov edi, eax
test eax, eax
jne 0x14005f73d
mov rcx, r13
call fcn.14003e380
mov edi, eax
test eax, eax
jne 0x14005f73d
mov rcx, r13
call fcn.14003ee00
mov rcx, rbp
mov edx, eax
call fcn.140040b70
mov rax, qword [r13 + 8]
lea r9d, [rdi + 1]
mov edx, dword [rax + 0x30]
mov r8d, r12d
mov rcx, rbp
call fcn.140040d20
mov edi, eax
jmp 0x14005f73d
mov edi, 7
mov r12, qword [rsp + 0x38]
mov r13, qword [rsp + 0x30]
mov eax, dword [rsp + 0x80]
or r8d, 0xffffffff
mov r9d, 1
mov dword [rsi + 0x2c], eax
mov eax, dword [rsp + 0x88]
or edx, r8d
mov dword [rsi + 0x60], eax
mov eax, dword [rsp + 0x20]
mov rcx, rbp
mov dword [rsi + 0x64], eax
mov rax, qword [rsp + 0x28]
mov qword [rsi + 0xc0], rax
call fcn.140040d20
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x70]
mov byte [rsi + 0x4e], 1
test r15, r15
je 0x14005f7af
mov rcx, qword [r15 + 8]
call fcn.14003e110
mov qword [r15 + 8], 0
mov qword [r15 + 0x18], 0
mov rcx, rsi
call fcn.14005e060
mov eax, edi
mov rdi, qword [rsp + 0x40]
add rsp, 0x50
pop r15
pop r14
pop rsi
ret