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

Disassembly:
push rbp
push r13
push r14
sub rsp, 0x50
xor r14d, r14d
mov rbp, rdx
mov r13, rcx
cmp byte [rdx + 0x4f], r14b
jne 0x1800be923
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.1800392e0
lea eax, [r14 + 1]
add rsp, 0x50
pop r14
pop r13
pop rbp
ret
cmp dword [rdx + 0xa4], 1
jle 0x1800be947
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.1800392e0
mov eax, 1
add rsp, 0x50
pop r14
pop r13
pop rbp
ret
mov eax, dword [rdx + 0x2c]
mov ecx, dword [rdx + 0x60]
mov qword [rsp + 0x70], rbx
mov ebx, dword [rdx + 0x28]
mov dword [rsp + 0x88], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [rdx + 0x50], 2
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]
mov qword [rdx + 0xc0], r14
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], r12
mov r12, qword [rax + 8]
lea r8, str.ATTACH_:memory:_AS_vacuum_db_
mov rdx, r13
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
movzx eax, byte [rcx + 0x13]
mov rcx, rbp
mov dword [rsp + 0x80], eax
lea rax, str.ATTACH__AS_vacuum_db_
cmovne r8, rax
call fcn.1800be2d0
mov edi, eax
movsxd rax, dword [rbp + 0x28]
cmp eax, ebx
jle 0x1800be9e5
lea ecx, [rax - 1]
movsxd r14, ecx
shl r14, 5
add r14, qword [rbp + 0x20]
test edi, edi
jne 0x1800bef25
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov qword [rsp + 0x30], r15
shl rcx, 5
mov r15, qword [rcx + rax - 0x18]
mov rcx, r15
call fcn.1800a5c40
mov rcx, r12
call fcn.180029de0
mov dword [rsp + 0x78], eax
cmp dword [rbp + 0x58], edi
je 0x1800bea4c
mov rcx, qword [rbp + 0x20]
mov rdx, qword [rcx + 8]
mov rcx, qword [rdx + 8]
mov rdx, qword [rcx]
cmp qword [rdx + 0x108], 0
je 0x1800bea3e
cmp qword [rdx + 0x120], 0
jne 0x1800bea45
cmp dword [rsp + 0x78], 0
je 0x1800bea4c
mov dword [rbp + 0x58], 0
lea r8, str.PRAGMA_vacuum_db.synchronousOFF
mov rdx, r13
mov rcx, rbp
call fcn.1800be2d0
mov edi, eax
test eax, eax
jne 0x1800bef20
lea r8, str.BEGIN_
mov rdx, r13
mov rcx, rbp
call fcn.1800be2d0
mov edi, eax
test eax, eax
jne 0x1800bef20
mov rbx, qword [r12 + 8]
cmp byte [r12 + 0x11], al
je 0x1800beaa4
inc dword [r12 + 0x14]
cmp byte [r12 + 0x12], al
jne 0x1800beaa4
mov rcx, r12
call fcn.1800239f0
cmp byte [r12 + 0x10], 2
mov qword [rsp + 0x48], rsi
je 0x1800bed05
movzx edx, word [rbx + 0x26]
test dl, 1
je 0x1800beac8
mov edi, 8
jmp 0x1800bed19
cmp byte [rbx + 0x24], 2
je 0x1800beb07
test dl, 0x40
jne 0x1800beb07
mov rax, qword [rbx + 0x70]
test rax, rax
je 0x1800beaee
nop dword [rax]
cmp qword [rax], r12
jne 0x1800beaff
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x1800beae0
cmp byte [r12 + 0x11], 0
mov rax, qword [r12 + 8]
jne 0x1800beb1d
xor edi, edi
jmp 0x1800beb5c
mov rax, qword [rax]
mov rcx, qword [rax]
jmp 0x1800beb0e
mov rax, qword [rbx + 0x78]
mov rcx, qword [rax]
test rcx, rcx
je 0x1800beaee
mov edi, 0x106
jmp 0x1800bed19
cmp qword [rax + 0x78], r12
je 0x1800beb33
test byte [rax + 0x26], 0x20
je 0x1800beb33
mov edi, 0x106
jmp 0x1800bed19
mov rax, qword [rax + 0x70]
test rax, rax
je 0x1800beb5a
nop dword [rax]
cmp qword [rax], r12
je 0x1800beb51
cmp dword [rax + 8], 1
jne 0x1800beb51
cmp byte [rax + 0xc], 1
jne 0x1800beb8d
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x1800beb40
xor edi, edi
mov eax, 0xfff7
and dx, ax
cmp dword [rbx + 0x3c], 0
mov word [rbx + 0x26], dx
jne 0x1800beb76
or dx, 8
mov word [rbx + 0x26], dx
cmp qword [rbx + 0x18], 0
jne 0x1800beb97
mov rcx, rbx
call fcn.18008d410
mov edi, eax
test eax, eax
je 0x1800beb76
jmp 0x1800bebd8
mov edi, 0x106
jmp 0x1800bed19
test edi, edi
jne 0x1800bebd8
test byte [rbx + 0x26], 1
je 0x1800beba8
mov edi, 8
jmp 0x1800bebd8
mov rax, qword [r12]
mov rcx, qword [rbx]
xor r8d, r8d
cmp byte [rax + 0x50], 2
mov edx, 1
sete r8b
call fcn.18002a500
mov edi, eax
test eax, eax
jne 0x1800bebd8
mov rcx, rbx
call fcn.180085970
mov edi, eax
test eax, eax
je 0x1800bebfd
cmp byte [rbx + 0x24], 0
jne 0x1800bebfd
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x1800bebfd
mov qword [rbx + 0x18], 0
test rcx, rcx
je 0x1800bebfd
mov rcx, qword [rcx + 0x68]
call fcn.180024230
cmp dil, 5
jne 0x1800bec3e
cmp byte [rbx + 0x24], 0
jne 0x1800bec3e
mov rsi, qword [rbx + 8]
add rsi, 0x2a0
je 0x1800bec3e
mov rax, qword [rsi]
test rax, rax
je 0x1800bec3e
mov edx, dword [rsi + 0x10]
test edx, edx
js 0x1800bec3e
mov rcx, qword [rsi + 8]
call rax
test eax, eax
je 0x1800bec37
inc dword [rsi + 0x10]
jmp 0x1800beb76
mov dword [rsi + 0x10], 0xffffffff
test edi, edi
jne 0x1800bed19
cmp byte [r12 + 0x10], dil
jne 0x1800bec6f
inc dword [rbx + 0x38]
cmp byte [r12 + 0x11], dil
je 0x1800bec6f
mov byte [r12 + 0x3c], 1
mov rax, qword [rbx + 0x70]
mov qword [r12 + 0x40], rax
lea rax, [r12 + 0x30]
mov qword [rbx + 0x70], rax
mov byte [r12 + 0x10], 2
cmp byte [rbx + 0x24], 2
jae 0x1800bec7f
mov byte [rbx + 0x24], 2
or word [rbx + 0x26], 0x20
mov rsi, qword [rbx + 0x18]
mov qword [rbx + 0x78], r12
mov rcx, qword [rsi + 0x50]
movzx eax, byte [rcx + 0x1e]
movzx edx, byte [rcx + 0x1d]
shl edx, 8
or edx, eax
movzx eax, byte [rcx + 0x1f]
shl edx, 8
or edx, eax
movzx eax, byte [rcx + 0x1c]
shl eax, 0x18
or edx, eax
cmp dword [rbx + 0x3c], edx
je 0x1800bed05
mov rcx, qword [rsi + 0x68]
mov rdx, qword [rcx + 0x20]
mov eax, dword [rdx + 0xbc]
cmp dword [rdx + 0xb8], eax
jbe 0x1800becd3
call fcn.18004dce0
mov edi, eax
jmp 0x1800becda
call fcn.180046ce0
mov edi, eax
test edi, edi
jne 0x1800bed19
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 [r12]
mov rcx, qword [rbx]
mov edx, dword [rax + 0x304]
call fcn.180038060
mov edi, eax
cmp byte [r12 + 0x11], 0
je 0x1800bed31
add dword [r12 + 0x14], 0xffffffff
jne 0x1800bed31
mov rcx, r12
call fcn.18001c580
test edi, edi
jne 0x1800bef1b
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x1800bed4a
mov dword [rbp + 0x58], edi
mov rax, qword [r12 + 8]
mov esi, dword [rsp + 0x78]
xor r9d, r9d
mov edx, dword [rax + 0x30]
mov r8d, esi
mov rcx, r15
call fcn.18003b240
test eax, eax
jne 0x1800bef16
cmp dword [rsp + 0x80], eax
jne 0x1800bed8e
mov edx, dword [rbp + 0x58]
xor r9d, r9d
mov r8d, esi
mov rcx, r15
call fcn.18003b240
test eax, eax
jne 0x1800bef16
cmp byte [rbp + 0x51], 0
jne 0x1800bef16
movzx eax, byte [rbp + 0x53]
test al, al
js 0x1800beda5
movsx eax, al
jmp 0x1800bedad
mov rcx, r12
call fcn.180029bd0
mov edx, eax
mov rcx, r15
call fcn.180029c40
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, r13
mov rcx, rbp
call fcn.1800be670
mov edi, eax
test eax, eax
jne 0x1800bef1b
lea r8, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov rdx, r13
mov rcx, rbp
call fcn.1800be670
mov edi, eax
test eax, eax
jne 0x1800bef1b
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, rbp
call fcn.1800be670
mov edi, eax
test eax, eax
jne 0x1800bef1b
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, r13
mov rcx, rbp
call fcn.1800be670
mov edi, eax
test eax, eax
jne 0x1800bef1b
lea r8, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov rdx, r13
mov rcx, rbp
call fcn.1800be670
mov edi, eax
test eax, eax
jne 0x1800bef1b
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, rbp
call fcn.1800be670
mov edi, eax
test eax, eax
jne 0x1800bef1b
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, rbp
call fcn.1800be2d0
mov edi, eax
test eax, eax
jne 0x1800bef1b
xor ebx, ebx
lea r13, [0x1800e84e0]
nop word [rax + rax]
movzx edx, byte [rbx + r13]
lea r8, [rsp + 0x78]
mov rcx, r12
call fcn.180029b20
movzx r8d, byte [rbx + r13 + 1]
movzx edx, byte [rbx + r13]
add r8d, dword [rsp + 0x78]
mov rcx, r15
call fcn.18005b560
mov edi, eax
test eax, eax
jne 0x1800bef1b
add rbx, 2
cmp rbx, 0xa
jl 0x1800bee90
mov rdx, r15
mov rcx, r12
call fcn.1800ac9a0
mov edi, eax
test eax, eax
jne 0x1800bef1b
mov rcx, r15
call fcn.1800a5c40
mov edi, eax
test eax, eax
jne 0x1800bef1b
mov rcx, r15
call fcn.180029bd0
mov rcx, r12
mov edx, eax
call fcn.180029c40
mov r11, qword [r15 + 8]
lea r9d, [rdi + 1]
mov edx, dword [r11 + 0x30]
mov r8d, esi
mov rcx, r12
call fcn.18003b240
mov edi, eax
jmp 0x1800bef1b
mov edi, 7
mov rsi, qword [rsp + 0x48]
mov r15, qword [rsp + 0x30]
mov eax, dword [rsp + 0x88]
or r8d, 0xffffffff
mov r9d, 1
mov dword [rbp + 0x2c], eax
mov eax, dword [rsp + 0x20]
or edx, r8d
mov dword [rbp + 0x60], eax
mov eax, dword [rsp + 0x24]
mov rcx, r12
mov dword [rbp + 0x64], eax
mov rax, qword [rsp + 0x28]
mov qword [rbp + 0xc0], rax
call fcn.18003b240
mov r12, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x70]
mov byte [rbp + 0x4f], 1
test r14, r14
je 0x1800bef8a
mov rcx, qword [r14 + 8]
call fcn.18009e1f0
mov qword [r14 + 8], 0
mov qword [r14 + 0x18], 0
mov rcx, rbp
call fcn.1800530b0
mov eax, edi
mov rdi, qword [rsp + 0x40]
add rsp, 0x50
pop r14
pop r13
pop rbp
ret