Function at 0x1800f8040
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rdi
push r13
push r14
push r15
sub rsp, 0x90
mov rax, qword [0x180167010]
xor rax, rsp
mov qword [rsp + 0x60], rax
cmp byte [rdx + 0x65], 0
mov r13, r9
movsxd rbx, r8d
mov rdi, rdx
mov r14, rcx
mov qword [rsp + 0x30], 0
mov r15d, 1
jne 0x1800f8094
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.18005b710
mov eax, r15d
jmp 0x1800f86f6
cmp dword [rdx + 0xd8], r15d
jle 0x1800f80b1
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.18005b710
mov eax, r15d
jmp 0x1800f86f6
mov qword [rsp + 0x88], rbp
mov ebp, dword [rdx + 0x4c]
lea rdx, [0x180000000]
test r13, r13
je 0x1800f8153
movzx ecx, word [r9 + 0x14]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x144f90], 3
je 0x1800f80fa
lea r8, str.non_text_filename
mov rdx, rdi
mov rcx, r14
call fcn.18005b710
mov eax, r15d
jmp 0x1800f86ee
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x1800f8121
cmp byte [r9 + 0x16], r15b
jne 0x1800f8121
mov r9, qword [r9 + 8]
mov eax, ebp
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1800f815a
test r15b, cl
je 0x1800f8136
mov eax, ebp
xor r9d, r9d
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1800f815a
movzx edx, r15b
mov rcx, r13
call fcn.180084cc0
mov r9, rax
mov eax, dword [rdi + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1800f815a
lea r9, [0x18013df0b]
mov eax, dword [rdi + 0x2c]
mov rcx, qword [rdi + 0x30]
mov rdx, qword [rdi + 0x78]
mov dword [rsp + 0x2c], eax
or eax, 6
mov dword [rdi + 0x2c], eax
mov rax, rcx
mov qword [rsp + 0x40], rcx
movabs rcx, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x48], rdx
mov rdx, qword [rdi + 0x80]
or rax, 0x201
mov qword [rdi + 0x30], rax
mov rax, qword [rdi + 0x20]
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x78], r12
mov r12, rbx
shl r12, 5
mov qword [rsp + 0x50], rdx
movzx edx, byte [rdi + 0x6e]
mov byte [rdi + 0x6e], 0
mov rcx, qword [r12 + rax]
mov rbx, qword [r12 + rax + 8]
mov qword [rsp + 0x38], rcx
mov byte [rsp + 0x20], dl
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp byte [rcx + 0x10], 0
jne 0x1800f81ec
cmp byte [rcx + 0x14], 0
mov dword [rsp + 0x24], 0
je 0x1800f81f1
mov dword [rsp + 0x24], r15d
mov eax, dword [rdi + 0x28]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rdx, r14
mov dword [rsp + 0x28], eax
mov rcx, rdi
call fcn.1800f7d10
mov dword [rdi + 0x4c], ebp
mov esi, eax
test eax, eax
jne 0x1800f8667
movsxd rax, dword [rsp + 0x28]
shl rax, 5
add rax, qword [rdi + 0x20]
mov qword [rsp + 0x30], rax
mov rbp, qword [rax + 8]
test r13, r13
je 0x1800f8293
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x58], 0
mov rax, qword [rcx]
test rax, rax
je 0x1800f827c
lea rdx, [rsp + 0x58]
call qword [rax + 0x30]
test eax, eax
jne 0x1800f8262
cmp qword [rsp + 0x58], 0
jle 0x1800f827c
lea r8, str.output_file_already_exists
mov rdx, rdi
mov rcx, r14
mov esi, r15d
call fcn.18005b710
jmp 0x1800f8667
mov rax, qword [rdi + 0x20]
or dword [rdi + 0x2c], 8
movzx r15d, byte [r12 + rax + 0x10]
mov eax, dword [rdi + 0x30]
and eax, 0x38
or r15d, eax
mov rcx, rbx
call fcn.180075c80
mov rcx, qword [rdi + 0x20]
mov dword [rsp + 0x58], eax
mov rdx, qword [r12 + rcx + 0x18]
mov rcx, rbp
mov edx, dword [rdx + 0x74]
call fcn.180075a00
movzx r8d, byte [rbx + 0x11]
mov rsi, qword [rbx + 8]
test r8b, r8b
je 0x1800f82d7
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x1800f82d7
mov rcx, rbx
call fcn.180072f90
movzx r8d, byte [rbx + 0x11]
mov rax, qword [rsi]
mov r9, qword [rax + 0x120]
movsxd rdx, dword [r9 + 0x20]
test edx, edx
jns 0x1800f8312
mov eax, dword [r9 + 0x2c]
add eax, dword [r9 + 0x28]
movsxd rcx, eax
mov rax, rdx
neg rax
shl rax, 0xa
cqo
idiv rcx
mov rdx, rax
mov eax, 0x3b9aca00
cmp rdx, rax
cmovg rdx, rax
mov esi, dword [r9 + 0x24]
cmp edx, esi
cmovge esi, edx
test r8b, r8b
je 0x1800f832e
sub dword [rbx + 0x14], 1
jne 0x1800f832e
mov rcx, rbx
call fcn.180072f60
mov edx, esi
mov rcx, rbp
call fcn.180075aa0
cmp byte [rbp + 0x11], 0
mov rsi, qword [rbp + 8]
je 0x1800f8353
inc dword [rbp + 0x14]
cmp byte [rbp + 0x12], 0
jne 0x1800f8353
mov rcx, rbp
call fcn.180072f90
mov rcx, qword [rsi]
or r15d, 0x20
mov edx, r15d
call fcn.18006ba40
cmp byte [rbp + 0x11], 0
je 0x1800f8376
sub dword [rbp + 0x14], 1
jne 0x1800f8376
mov rcx, rbp
call fcn.180072f60
lea r8, str.BEGIN
mov rdx, r14
mov rcx, rdi
call fcn.1800f7c00
mov esi, eax
test eax, eax
jne 0x1800f8667
xor edx, edx
mov eax, 2
test r13, r13
cmove edx, eax
cmp byte [rbx + 0x11], sil
jne 0x1800f83ba
movzx eax, byte [rbx + 0x10]
test al, al
je 0x1800f83ba
cmp al, 1
jne 0x1800f8530
test r13, r13
jne 0x1800f83cf
xor r8d, r8d
mov rcx, rbx
call fcn.180076310
mov esi, eax
test esi, esi
jne 0x1800f8667
mov rcx, qword [rbx + 8]
mov rax, qword [rcx]
cmp byte [rax + 9], 5
jne 0x1800f83e9
test r13, r13
jne 0x1800f83e9
mov dword [rdi + 0x74], r13d
mov rcx, qword [rbx + 8]
mov edx, dword [rcx + 0x34]
xor r9d, r9d
mov esi, dword [rsp + 0x58]
mov rcx, rbp
mov r8d, esi
call fcn.180075b60
test eax, eax
jne 0x1800f8662
cmp dword [rsp + 0x24], eax
jne 0x1800f8425
mov edx, dword [rdi + 0x74]
xor r9d, r9d
mov r8d, esi
mov rcx, rbp
call fcn.180075b60
test eax, eax
jne 0x1800f8662
cmp byte [rdi + 0x67], 0
jne 0x1800f8662
movsx eax, byte [rdi + 0x6a]
test al, al
jns 0x1800f843f
mov rcx, rbx
call fcn.180075de0
mov edx, eax
mov rcx, rbp
call fcn.180075d50
mov eax, dword [rsp + 0x28]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r15, qword [rsp + 0x38]
mov rdx, r14
mov r9, r15
mov byte [rdi + 0xc4], al
mov rcx, rdi
call fcn.1800f7d10
mov esi, eax
test eax, eax
jne 0x1800f8667
mov r9, r15
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r14
mov rcx, rdi
call fcn.1800f7d10
mov esi, eax
test eax, eax
jne 0x1800f8667
mov r9, r15
mov byte [rdi + 0xc4], al
lea r8, str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
mov rdx, r14
mov rcx, rdi
call fcn.1800f7d10
and dword [rdi + 0x2c], 0xfffffffb
mov esi, eax
test eax, eax
jne 0x1800f8667
mov r9, r15
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, r14
mov rcx, rdi
call fcn.1800f7d10
mov esi, eax
test eax, eax
jne 0x1800f8667
xor r14d, r14d
lea r12, [0x180000000]
nop dword [rax + rax]
movzx r8d, byte [rbx + 0x11]
movzx esi, byte [r14 + r12 + 0x13f658]
mov r15, qword [rbx + 8]
test r8b, r8b
je 0x1800f851d
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x1800f851d
mov rcx, rbx
call fcn.180072f90
movzx r8d, byte [rbx + 0x11]
cmp esi, 0xf
jne 0x1800f8568
mov rax, qword [r15]
mov esi, dword [rax + 0x84]
add esi, dword [rbx + 0x1c]
jmp 0x1800f857c
test r13, r13
jne 0x1800f83cf
mov rax, qword [rbx]
mov edx, dword [rax + 0x2f0]
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp edx, dword [rcx + 0x80]
jle 0x1800f8561
cmp byte [rcx + 0xa], r13b
je 0x1800f8561
call fcn.18006e710
jmp 0x1800f83c5
xor esi, esi
jmp 0x1800f83c7
mov rax, qword [r15 + 0x18]
lea edx, [rsi*4 + 0x24]
mov rcx, qword [rax + 0x50]
mov esi, dword [rdx + rcx]
bswap esi
test r8b, r8b
je 0x1800f858f
sub dword [rbx + 0x14], 1
jne 0x1800f858f
mov rcx, rbx
call fcn.180072f60
movzx r8d, byte [r14 + r12 + 0x13f659]
mov rcx, rbp
movzx edx, byte [r14 + r12 + 0x13f658]
add r8d, esi
call fcn.180080a30
mov esi, eax
test eax, eax
jne 0x1800f8667
add r14, 2
cmp r14, 0xa
jl 0x1800f84f0
test r13, r13
jne 0x1800f85de
mov rdx, rbp
mov rcx, rbx
call fcn.180083200
mov esi, eax
test eax, eax
jne 0x1800f8667
cmp byte [rbp + 0x11], 0
je 0x1800f85f5
inc dword [rbp + 0x14]
cmp byte [rbp + 0x12], 0
jne 0x1800f85f5
mov rcx, rbp
call fcn.180072f90
xor edx, edx
mov rcx, rbp
call fcn.1800776c0
mov esi, eax
test eax, eax
jne 0x1800f8611
xor edx, edx
mov rcx, rbp
call fcn.180077910
mov esi, eax
cmp byte [rbp + 0x11], 0
je 0x1800f8625
sub dword [rbp + 0x14], 1
jne 0x1800f8625
mov rcx, rbp
call fcn.180072f60
test esi, esi
jne 0x1800f8667
test r13, r13
jne 0x1800f8667
mov rcx, rbp
call fcn.180075de0
mov edx, eax
mov rcx, rbx
call fcn.180075d50
mov rcx, rbp
call fcn.180075c80
mov rcx, qword [rbp + 8]
lea r9d, [rsi + 1]
mov r8d, eax
mov edx, dword [rcx + 0x34]
mov rcx, rbx
call fcn.180075b60
mov esi, eax
jmp 0x1800f8667
mov esi, 7
mov eax, dword [rsp + 0x2c]
mov r9d, 1
mov dword [rdi + 0x2c], eax
xor r8d, r8d
mov rax, qword [rsp + 0x40]
mov rcx, rbx
mov qword [rdi + 0x30], rax
mov rax, qword [rsp + 0x48]
lea edx, [r9 - 2]
mov qword [rdi + 0x78], rax
mov rax, qword [rsp + 0x50]
mov qword [rdi + 0x80], rax
movzx eax, byte [rsp + 0x20]
mov byte [rdi + 0x6e], al
mov byte [rdi + 0xc4], 0
call fcn.180075b60
mov rbx, qword [rsp + 0x30]
mov r12, qword [rsp + 0x78]
mov byte [rdi + 0x65], 1
test rbx, rbx
je 0x1800f86dc
mov rcx, qword [rbx + 8]
call fcn.180075860
mov qword [rbx + 8], 0
mov qword [rbx + 0x18], 0
mov rcx, rdi
call fcn.1800b5a40
mov eax, esi
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.18012be40
add rsp, 0x90
pop r15
pop r14
pop r13
pop rdi
pop rbx
ret