Function at 0x1800c6ce0
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push rbx
push rbp
push rdi
push r12
push r15
sub rsp, 0x90
mov rax, qword [0x180185680]
xor rax, rsp
mov qword [rsp + 0x60], rax
xor r15d, r15d
movsxd rbx, r8d
mov r12, r9
mov rdi, rdx
mov rbp, rcx
cmp byte [rdx + 0x5f], r15b
jne 0x1800c6d28
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.18004d610
lea eax, [r15 + 1]
jmp 0x1800c7245
cmp dword [rdx + 0xbc], 1
jle 0x1800c6d47
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.18004d610
mov eax, 1
jmp 0x1800c7245
mov qword [rsp + 0x78], r14
mov r14d, dword [rdx + 0x4c]
lea rdx, [0x180000000]
test r12, r12
je 0x1800c6dea
movzx ecx, word [r9 + 8]
mov eax, ecx
and eax, 0x1f
cmp byte [rax + rdx + 0x153890], 3
je 0x1800c6d90
lea r8, str.non_text_filename
mov rdx, rdi
mov rcx, rbp
call fcn.18004d610
mov eax, 1
jmp 0x1800c7240
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x1800c6db9
cmp byte [r9 + 0xa], 1
jne 0x1800c6db9
mov r9, qword [r9 + 0x10]
mov eax, r14d
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1800c6df1
test cl, 1
je 0x1800c6dcf
mov eax, r14d
xor r9d, r9d
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1800c6df1
mov dl, 1
mov rcx, r12
call fcn.180071130
mov r9, rax
mov eax, dword [rdi + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rdi + 0x4c], eax
jmp 0x1800c6df1
lea r9, [0x18015a424]
mov eax, dword [rdi + 0x2c]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rcx, qword [rdi + 0x30]
mov edx, dword [rdi + 0x74]
mov dword [rsp + 0x34], eax
or eax, 6
mov dword [rdi + 0x2c], eax
mov rax, rcx
mov dword [rsp + 0x38], edx
and rax, 0xffffffffefffaf7f
mov edx, dword [rdi + 0x78]
or rax, 0x201
mov qword [rdi + 0x30], rax
mov rax, qword [rdi + 0x20]
mov dword [rsp + 0x3c], edx
movzx edx, byte [rdi + 0x68]
mov byte [rdi + 0x68], r15b
mov byte [rsp + 0x21], dl
mov rdx, rbx
shl rdx, 5
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x88], rsi
mov rcx, qword [rax + rdx]
mov rbx, qword [rax + rdx + 8]
mov rdx, rbp
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x80], r13
movsxd r13, dword [rdi + 0x28]
mov rax, qword [rbx + 8]
mov dword [rsp + 0x30], r13d
mov rcx, qword [rax]
movzx eax, byte [rcx + 0x10]
mov rcx, rdi
mov byte [rsp + 0x20], al
call fcn.1800c6ad0
mov dword [rdi + 0x4c], r14d
mov esi, eax
test eax, eax
jne 0x1800c71c9
mov rax, r13
shl rax, 5
add rax, qword [rdi + 0x20]
mov qword [rsp + 0x28], rax
mov r13, qword [rax + 8]
test r12, r12
je 0x1800c6efe
mov rax, qword [r13 + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x58], r15
mov rax, qword [rcx]
test rax, rax
je 0x1800c6efa
lea rdx, [rsp + 0x58]
call qword [rax + 0x30]
test eax, eax
jne 0x1800c6ede
cmp qword [rsp + 0x58], r15
jle 0x1800c6efa
lea r8, str.output_file_already_exists
mov rdx, rdi
mov rcx, rbp
mov esi, 1
call fcn.18004d610
jmp 0x1800c71c4
or dword [rdi + 0x2c], 8
movzx ecx, byte [rbx + 0x11]
test cl, cl
je 0x1800c6f1b
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], r15b
jne 0x1800c6f1b
mov rcx, rbx
call fcn.1800614c0
movzx ecx, byte [rbx + 0x11]
mov rax, qword [rbx + 8]
mov r14d, dword [rax + 0x30]
sub r14d, dword [rax + 0x34]
mov dword [rsp + 0x58], r14d
test cl, cl
je 0x1800c6f3e
sub dword [rbx + 0x14], 1
jne 0x1800c6f3e
mov rcx, rbx
call fcn.180061490
mov rax, qword [rdi + 0x20]
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rax + rcx + 0x18]
mov edx, dword [rcx + 0x74]
mov rcx, r13
call fcn.180063d80
xor edx, edx
mov rcx, rbx
call fcn.180063e10
mov edx, eax
mov rcx, r13
call fcn.180063e10
mov edx, 0x21
mov rcx, r13
call fcn.180063f40
lea r8, str.BEGIN
mov rdx, rbp
mov rcx, rdi
call fcn.1800c69c0
mov esi, eax
test eax, eax
jne 0x1800c71c4
xor edx, edx
mov eax, 2
test r12, r12
mov rcx, rbx
cmove edx, eax
xor r8d, r8d
call fcn.180064800
mov esi, eax
test eax, eax
jne 0x1800c71c4
mov rcx, qword [rbx + 8]
mov rax, qword [rcx]
cmp byte [rax + 9], 5
jne 0x1800c6fcb
mov dword [rdi + 0x6c], r15d
mov rcx, qword [rbx + 8]
mov edx, dword [rcx + 0x30]
xor r9d, r9d
mov rcx, r13
mov r8d, r14d
call fcn.180064030
test eax, eax
jne 0x1800c71bf
cmp byte [rsp + 0x20], r15b
jne 0x1800c7004
mov edx, dword [rdi + 0x6c]
xor r9d, r9d
mov r8d, r14d
mov rcx, r13
call fcn.180064030
test eax, eax
jne 0x1800c71bf
cmp byte [rdi + 0x61], r15b
jne 0x1800c71bf
movzx eax, byte [rdi + 0x64]
test al, al
js 0x1800c701b
movsx eax, al
jmp 0x1800c7023
mov rcx, rbx
call fcn.180064290
mov edx, eax
mov rcx, r13
call fcn.180064200
mov eax, dword [rsp + 0x30]
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r14, qword [rsp + 0x48]
mov rdx, rbp
mov r9, r14
mov byte [rdi + 0xb4], al
mov rcx, rdi
call fcn.1800c6ad0
mov esi, eax
test eax, eax
jne 0x1800c71c4
mov r9, r14
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
mov rdx, rbp
mov rcx, rdi
call fcn.1800c6ad0
mov esi, eax
test eax, eax
jne 0x1800c71c4
mov r9, r14
mov byte [rdi + 0xb4], r15b
lea r8, str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
mov rdx, rbp
mov rcx, rdi
call fcn.1800c6ad0
and dword [rdi + 0x2c], 0xfffffffb
mov esi, eax
test eax, eax
jne 0x1800c71c4
mov r9, r14
lea r8, str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, rbp
mov rcx, rdi
call fcn.1800c6ad0
mov esi, eax
test eax, eax
jne 0x1800c71c4
xor r14d, r14d
lea rbp, [0x180000000]
nop dword [rax]
movzx r8d, byte [rbx + 0x11]
movzx esi, byte [r14 + rbp + 0x14e7d0]
mov r15, qword [rbx + 8]
test r8b, r8b
je 0x1800c70fd
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x1800c70fd
mov rcx, rbx
call fcn.1800614c0
movzx r8d, byte [rbx + 0x11]
cmp esi, 0xf
jne 0x1800c7110
mov rax, qword [r15]
mov esi, dword [rax + 0x84]
add esi, dword [rbx + 0x1c]
jmp 0x1800c7124
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 0x1800c7137
sub dword [rbx + 0x14], 1
jne 0x1800c7137
mov rcx, rbx
call fcn.180061490
movzx r8d, byte [r14 + rbp + 0x14e7d1]
mov rcx, r13
movzx edx, byte [r14 + rbp + 0x14e7d0]
add r8d, esi
call fcn.18006d600
mov esi, eax
test eax, eax
jne 0x1800c71c4
add r14, 2
cmp r14, 0xa
jl 0x1800c70d0
test r12, r12
jne 0x1800c717e
mov rdx, r13
mov rcx, rbx
call fcn.18006fc10
mov esi, eax
test eax, eax
jne 0x1800c71c4
mov rcx, r13
call fcn.180065cb0
mov esi, eax
test eax, eax
jne 0x1800c71c4
test r12, r12
jne 0x1800c71c4
mov rcx, r13
call fcn.180064290
mov edx, eax
mov rcx, rbx
call fcn.180064200
mov rax, qword [r13 + 8]
lea r9d, [rsi + 1]
mov r8d, dword [rsp + 0x58]
mov rcx, rbx
mov edx, dword [rax + 0x30]
call fcn.180064030
mov esi, eax
jmp 0x1800c71c4
mov esi, 7
mov r15, qword [rsp + 0x28]
mov eax, dword [rsp + 0x34]
mov edx, 0xffffffff
mov dword [rdi + 0x2c], eax
mov r8d, edx
mov rax, qword [rsp + 0x50]
mov rcx, rbx
mov qword [rdi + 0x30], rax
mov eax, dword [rsp + 0x38]
lea r9d, [rdx + 2]
mov dword [rdi + 0x74], eax
mov eax, dword [rsp + 0x3c]
mov dword [rdi + 0x78], eax
movzx eax, byte [rsp + 0x21]
mov byte [rdi + 0x68], al
mov byte [rdi + 0xb4], 0
call fcn.180064030
mov r13, qword [rsp + 0x80]
mov byte [rdi + 0x5f], 1
test r15, r15
je 0x1800c722e
mov rcx, qword [r15 + 8]
call fcn.180063bc0
xor eax, eax
mov qword [r15 + 8], rax
mov qword [r15 + 0x18], rax
mov rcx, rdi
call fcn.180098810
mov eax, esi
mov rsi, qword [rsp + 0x88]
mov r14, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.18010faf0
add rsp, 0x90
pop r15
pop r12
pop rdi
pop rbp
pop rbx
ret