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

Disassembly:
push r12
push r13
push r14
sub rsp, 0x50
xor r14d, r14d
mov r12, rdx
mov r13, rcx
cmp byte [rdx + 0x44], r14b
jne 0x14014cd44
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.1400e9750
lea eax, [r14 + 1]
add rsp, 0x50
pop r14
pop r13
pop r12
ret
cmp dword [rdx + 0x90], 1
jle 0x14014cd69
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.1400e9750
mov eax, 1
add rsp, 0x50
pop r14
pop r13
pop r12
ret
mov eax, dword [rdx + 0x2c]
mov ecx, dword [rdx + 0x54]
mov qword [rsp + 0x70], rbx
mov ebx, dword [rdx + 0x28]
mov dword [rsp + 0x88], eax
and eax, 0xfaffffff
or eax, 0x10050000
cmp byte [rdx + 0x45], 2
mov dword [rsp + 0x20], ecx
mov ecx, dword [rdx + 0x58]
mov dword [rdx + 0x2c], eax
mov rax, qword [rdx + 0x20]
mov dword [rsp + 0x24], ecx
mov rcx, qword [rdx + 0xa8]
mov qword [rdx + 0xa8], r14
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, r13
mov rcx, qword [rax]
mov qword [rsp + 0x38], rdi
movzx eax, byte [rcx + 0x12]
mov rcx, r12
mov dword [rsp + 0x80], eax
lea rax, str.ATTACH__AS_vacuum_db_
cmovne r8, rax
call fcn.14014ca10
mov edi, eax
movsxd rax, dword [r12 + 0x28]
cmp eax, ebx
jle 0x14014ce08
lea ecx, [rax - 1]
movsxd r14, ecx
shl r14, 5
add r14, qword [r12 + 0x20]
test edi, edi
jne 0x14014d307
mov rcx, rax
mov rax, qword [r12 + 0x20]
mov qword [rsp + 0x30], r15
shl rcx, 5
mov r15, qword [rcx + rax - 0x18]
mov rcx, r15
call fcn.1400ff600
mov rcx, rbp
call fcn.1400fad10
mov rcx, qword [rbp + 8]
mov eax, dword [rcx + 0x30]
sub eax, dword [rcx + 0x34]
mov dword [rsp + 0x78], eax
cmp byte [rbp + 0x11], dil
je 0x14014ce62
dec dword [rbp + 0x14]
jne 0x14014ce62
mov rcx, qword [rcx + 0x50]
test rcx, rcx
je 0x14014ce5e
call qword [0x1402a4920]
mov byte [rbp + 0x12], 0
lea r8, str.PRAGMA_vacuum_db.synchronousOFF
mov rdx, r13
mov rcx, r12
call fcn.14014ca10
mov edi, eax
test eax, eax
jne 0x14014d302
lea r8, str.BEGIN_
mov rdx, r13
mov rcx, r12
call fcn.14014ca10
mov edi, eax
test eax, eax
jne 0x14014d302
mov rbx, qword [rbp + 8]
mov rcx, rbp
mov qword [rsp + 0x40], rsi
call fcn.1400fad10
cmp byte [rbp + 0x10], 2
je 0x14014d0e3
movzx edx, word [rbx + 0x26]
test dl, 1
je 0x14014cec8
mov edi, 8
jmp 0x14014d0f7
cmp byte [rbx + 0x23], 2
je 0x14014cf13
test dl, 0x40
jne 0x14014cf13
mov rax, qword [rbx + 0x70]
test rax, rax
je 0x14014ceee
nop dword [rax]
cmp qword [rax], rbp
jne 0x14014cf0e
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x14014cee0
cmp byte [rbp + 0x11], 0
mov rax, qword [rbp + 8]
je 0x14014cf4c
cmp qword [rax + 0x78], rbp
je 0x14014cf29
test byte [rax + 0x26], 0x20
je 0x14014cf29
mov edi, 0x106
jmp 0x14014d0f7
mov rax, qword [rax]
jmp 0x14014cf17
mov rax, qword [rbx + 0x78]
mov rcx, qword [rax]
test rcx, rcx
je 0x14014ceee
mov edi, 0x106
jmp 0x14014d0f7
mov rax, qword [rax + 0x70]
test rax, rax
je 0x14014cf4c
cmp qword [rax], rbp
je 0x14014cf43
cmp dword [rax + 8], 1
jne 0x14014cf43
cmp byte [rax + 0xc], 1
jne 0x14014cf1f
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x14014cf32
mov eax, 0xfff7
xor edi, edi
and dx, ax
mov word [rbx + 0x26], dx
cmp dword [rbx + 0x3c], edi
jne 0x14014cf67
or dx, 8
mov word [rbx + 0x26], dx
cmp qword [rbx + 0x18], 0
jne 0x14014cf7e
mov rcx, rbx
call fcn.1400fdad0
mov edi, eax
test eax, eax
je 0x14014cf67
jmp 0x14014cfbf
test edi, edi
jne 0x14014cfbf
test byte [rbx + 0x26], 1
je 0x14014cf8f
mov edi, 8
jmp 0x14014cfbf
mov rax, qword [rbp]
mov rcx, qword [rbx]
xor r8d, r8d
cmp byte [rax + 0x45], 2
mov edx, 1
sete r8b
call fcn.1400f65e0
mov edi, eax
test eax, eax
jne 0x14014cfbf
mov rcx, rbx
call fcn.1400fdf20
mov edi, eax
test eax, eax
je 0x14014cffe
cmp byte [rbx + 0x23], 0
jne 0x14014cffe
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x14014cffe
mov rcx, qword [rcx + 0x68]
test rcx, rcx
je 0x14014cff6
mov rsi, qword [rcx + 0x20]
call fcn.1400f0bd0
mov r11, qword [rsi + 0xf0]
cmp dword [r11 + 0x18], 0
jne 0x14014cff6
mov rcx, rsi
call fcn.1400f39a0
mov qword [rbx + 0x18], 0
cmp dil, 5
jne 0x14014d03f
cmp byte [rbx + 0x23], 0
jne 0x14014d03f
mov rsi, qword [rbx + 8]
add rsi, 0x298
je 0x14014d03f
mov rax, qword [rsi]
test rax, rax
je 0x14014d03f
mov edx, dword [rsi + 0x10]
test edx, edx
js 0x14014d03f
mov rcx, qword [rsi + 8]
call rax
test eax, eax
je 0x14014d038
inc dword [rsi + 0x10]
jmp 0x14014cf67
mov dword [rsi + 0x10], 0xffffffff
test edi, edi
jne 0x14014d0f7
cmp byte [rbp + 0x10], dil
jne 0x14014d06a
inc dword [rbx + 0x38]
cmp byte [rbp + 0x11], dil
je 0x14014d06a
mov byte [rbp + 0x3c], 1
mov rax, qword [rbx + 0x70]
mov qword [rbp + 0x40], rax
lea rax, [rbp + 0x30]
mov qword [rbx + 0x70], rax
mov byte [rbp + 0x10], 2
cmp byte [rbx + 0x23], 2
jae 0x14014d078
mov byte [rbx + 0x23], 2
or word [rbx + 0x26], 0x20
mov rsi, qword [rbx + 0x18]
mov qword [rbx + 0x78], rbp
mov rcx, qword [rsi + 0x50]
movzx eax, byte [rcx + 0x1d]
movzx edx, byte [rcx + 0x1c]
shl edx, 8
or edx, eax
movzx eax, byte [rcx + 0x1e]
shl edx, 8
or edx, eax
movzx eax, byte [rcx + 0x1f]
shl edx, 8
or edx, eax
cmp dword [rbx + 0x3c], edx
je 0x14014d0e3
mov rcx, qword [rsi + 0x68]
call fcn.1400f68b0
mov edi, eax
test eax, eax
jne 0x14014d0f7
mov r8d, dword [rbx + 0x3c]
mov rdx, qword [rsi + 0x50]
mov eax, r8d
mov byte [rdx + 0x1f], r8b
shr eax, 0x18
mov byte [rdx + 0x1c], al
mov eax, r8d
shr eax, 0x10
mov byte [rdx + 0x1d], al
mov eax, r8d
shr eax, 8
mov byte [rdx + 0x1e], al
mov rax, qword [rbp]
mov rcx, qword [rbx]
mov edx, dword [rax + 0x2fc]
call fcn.1400f7450
mov edi, eax
cmp byte [rbp + 0x11], 0
je 0x14014d119
dec dword [rbp + 0x14]
jne 0x14014d119
mov rax, qword [rbp + 8]
mov rcx, qword [rax + 0x50]
test rcx, rcx
je 0x14014d115
call qword [0x1402a4920]
mov byte [rbp + 0x12], 0
test edi, edi
jne 0x14014d2fd
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x14014d133
mov dword [r12 + 0x4c], edi
mov rax, qword [rbp + 8]
mov esi, dword [rsp + 0x78]
xor r9d, r9d
mov edx, dword [rax + 0x30]
mov r8d, esi
mov rcx, r15
call fcn.1400fd810
test eax, eax
jne 0x14014d2f8
cmp dword [rsp + 0x80], eax
jne 0x14014d178
mov edx, dword [r12 + 0x4c]
xor r9d, r9d
mov r8d, esi
mov rcx, r15
call fcn.1400fd810
test eax, eax
jne 0x14014d2f8
cmp byte [r12 + 0x46], 0
jne 0x14014d2f8
movzx eax, byte [r12 + 0x48]
test al, al
js 0x14014d193
movsx eax, al
jmp 0x14014d19b
mov rcx, rbp
call fcn.1400fda80
mov edx, eax
mov rcx, r15
call fcn.1400fd9f0
lea r8, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
mov rdx, r13
mov rcx, r12
call fcn.14014cae0
mov edi, eax
test eax, eax
jne 0x14014d2fd
lea r8, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov rdx, r13
mov rcx, r12
call fcn.14014cae0
mov edi, eax
test eax, eax
jne 0x14014d2fd
lea r8, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov rdx, r13
mov rcx, r12
call fcn.14014cae0
mov edi, eax
test eax, eax
jne 0x14014d2fd
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_rootpage_0
mov rdx, r13
mov rcx, r12
call fcn.14014cae0
mov edi, eax
test eax, eax
jne 0x14014d2fd
lea r8, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov rdx, r13
mov rcx, r12
call fcn.14014cae0
mov edi, eax
test eax, eax
jne 0x14014d2fd
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, r13
mov rcx, r12
call fcn.14014cae0
mov edi, eax
test eax, eax
jne 0x14014d2fd
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, r13
mov rcx, r12
call fcn.14014ca10
mov edi, eax
test eax, eax
jne 0x14014d2fd
xor ebx, ebx
lea r13, [0x1401f3938]
movzx edx, byte [rbx + r13]
lea r8, [rsp + 0x78]
mov rcx, rbp
call fcn.140105e80
movzx r8d, byte [rbx + r13 + 1]
movzx edx, byte [rbx + r13]
add r8d, dword [rsp + 0x78]
mov rcx, r15
call fcn.140105f20
mov edi, eax
test eax, eax
jne 0x14014d2fd
add rbx, 2
cmp rbx, 8
jl 0x14014d272
mov rdx, r15
mov rcx, rbp
call fcn.140108fd0
mov edi, eax
test eax, eax
jne 0x14014d2fd
mov rcx, r15
call fcn.1400ff600
mov edi, eax
test eax, eax
jne 0x14014d2fd
mov rcx, r15
call fcn.1400fda80
mov rcx, rbp
mov edx, eax
call fcn.1400fd9f0
mov r11, qword [r15 + 8]
lea r9d, [rdi + 1]
mov edx, dword [r11 + 0x30]
mov r8d, esi
mov rcx, rbp
call fcn.1400fd810
mov edi, eax
jmp 0x14014d2fd
mov edi, 7
mov rsi, qword [rsp + 0x40]
mov r15, qword [rsp + 0x30]
mov eax, dword [rsp + 0x88]
or r8d, 0xffffffff
mov r9d, 1
mov dword [r12 + 0x2c], eax
mov eax, dword [rsp + 0x20]
or edx, r8d
mov dword [r12 + 0x54], eax
mov eax, dword [rsp + 0x24]
mov rcx, rbp
mov dword [r12 + 0x58], eax
mov rax, qword [rsp + 0x28]
mov qword [r12 + 0xa8], rax
call fcn.1400fd810
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x70]
mov byte [r12 + 0x44], 1
test r14, r14
je 0x14014d375
mov rcx, qword [r14 + 8]
call fcn.1400fd580
mov qword [r14 + 8], 0
mov qword [r14 + 0x18], 0
mov rcx, r12
call fcn.140126c60
mov eax, edi
mov rdi, qword [rsp + 0x38]
add rsp, 0x50
pop r14
pop r13
pop r12
ret