Function at 0x18008b2a0
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 + 0x53], r14b
jne 0x18008b2d3
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.1800128d0
lea eax, [r14 + 1]
add rsp, 0x50
pop r14
pop r13
pop rbp
ret
cmp dword [rdx + 0xa8], 1
jle 0x18008b2f7
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.1800128d0
mov eax, 1
add rsp, 0x50
pop r14
pop r13
pop rbp
ret
mov eax, dword [rdx + 0x2c]
mov ecx, dword [rdx + 0x64]
mov qword [rsp + 0x70], rbx
mov ebx, dword [rdx + 0x28]
mov dword [rsp + 0x88], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [rdx + 0x54], 2
mov dword [rsp + 0x20], ecx
mov ecx, dword [rdx + 0x68]
mov dword [rdx + 0x2c], eax
mov rax, qword [rdx + 0x20]
mov dword [rsp + 0x24], ecx
mov rcx, qword [rdx + 0xc8]
mov qword [rdx + 0xc8], 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 + 0x14]
mov rcx, rbp
mov dword [rsp + 0x80], eax
lea rax, str.ATTACH__AS_vacuum_db_
cmovne r8, rax
call fcn.18008b050
mov edi, eax
movsxd rax, dword [rbp + 0x28]
cmp eax, ebx
jle 0x18008b395
lea ecx, [rax - 1]
movsxd r14, ecx
shl r14, 5
add r14, qword [rbp + 0x20]
test edi, edi
jne 0x18008b885
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.18002a150
mov rcx, r12
call fcn.180028a00
mov dword [rsp + 0x78], eax
cmp dword [rbp + 0x5c], edi
je 0x18008b3ed
mov rcx, qword [rbp + 0x20]
mov rdx, qword [rcx + 8]
mov rcx, qword [rdx + 8]
mov rdx, qword [rcx]
mov rcx, qword [rdx + 0x120]
test rcx, rcx
je 0x18008b3ed
cmp dword [rcx], edi
je 0x18008b3ed
mov dword [rbp + 0x5c], edi
lea r8, str.PRAGMA_vacuum_db.synchronousOFF
mov rdx, r13
mov rcx, rbp
call fcn.18008b050
mov edi, eax
test eax, eax
jne 0x18008b880
lea r8, str.BEGIN_
mov rdx, r13
mov rcx, rbp
call fcn.18008b050
mov edi, eax
test eax, eax
jne 0x18008b880
mov rbx, qword [r12 + 8]
cmp byte [r12 + 0x11], al
je 0x18008b445
inc dword [r12 + 0x14]
cmp byte [r12 + 0x12], al
jne 0x18008b445
mov rcx, r12
call fcn.180025f40
cmp byte [r12 + 0x10], 2
mov qword [rsp + 0x48], rsi
je 0x18008b648
movzx edx, word [rbx + 0x28]
test dl, 1
je 0x18008b469
mov edi, 8
jmp 0x18008b66e
cmp byte [rbx + 0x24], 2
je 0x18008b4b9
test dl, 0x40
jne 0x18008b4b9
mov rax, qword [rbx + 0x78]
test rax, rax
je 0x18008b48e
nop dword [rax]
cmp qword [rax], r12
jne 0x18008b4b4
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x18008b480
cmp byte [r12 + 0x11], 0
mov rax, qword [r12 + 8]
je 0x18008b4fa
cmp qword [rax + 0x80], r12
je 0x18008b4d2
test byte [rax + 0x28], 0x20
je 0x18008b4d2
mov edi, 0x106
jmp 0x18008b66e
mov rax, qword [rax]
jmp 0x18008b4c0
mov rax, qword [rbx + 0x80]
mov rcx, qword [rax]
test rcx, rcx
je 0x18008b48e
mov edi, 0x106
jmp 0x18008b66e
mov rax, qword [rax + 0x78]
test rax, rax
je 0x18008b4fa
nop dword [rax + rax]
cmp qword [rax], r12
je 0x18008b4f1
cmp dword [rax + 8], 1
jne 0x18008b4f1
cmp byte [rax + 0xc], 1
jne 0x18008b4c8
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x18008b4e0
mov eax, 0xfff7
xor edi, edi
and dx, ax
mov word [rbx + 0x28], dx
cmp dword [rbx + 0x40], edi
jne 0x18008b515
or dx, 8
mov word [rbx + 0x28], dx
cmp qword [rbx + 0x18], 0
jne 0x18008b52c
mov rcx, rbx
call fcn.180028c40
mov edi, eax
test eax, eax
je 0x18008b515
jmp 0x18008b56d
test edi, edi
jne 0x18008b56d
test byte [rbx + 0x28], 1
je 0x18008b53d
mov edi, 8
jmp 0x18008b56d
mov rax, qword [r12]
mov rcx, qword [rbx]
xor r8d, r8d
cmp byte [rax + 0x54], 2
mov edx, 1
sete r8b
call fcn.1800218e0
mov edi, eax
test eax, eax
jne 0x18008b56d
mov rcx, rbx
call fcn.180028f10
mov edi, eax
test eax, eax
je 0x18008b58d
cmp byte [rbx + 0x24], 0
jne 0x18008b58d
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x18008b58d
mov qword [rbx + 0x18], 0
mov rcx, qword [rcx + 0x70]
call fcn.1800216f0
cmp dil, 5
jne 0x18008b5ce
cmp byte [rbx + 0x24], 0
jne 0x18008b5ce
mov rsi, qword [rbx + 8]
add rsi, 0x210
je 0x18008b5ce
mov rax, qword [rsi]
test rax, rax
je 0x18008b5ce
mov edx, dword [rsi + 0x10]
test edx, edx
js 0x18008b5ce
mov rcx, qword [rsi + 8]
call rax
test eax, eax
je 0x18008b5c7
inc dword [rsi + 0x10]
jmp 0x18008b515
mov dword [rsi + 0x10], 0xffffffff
test edi, edi
jne 0x18008b66e
cmp byte [r12 + 0x10], dil
jne 0x18008b5ff
inc dword [rbx + 0x3c]
cmp byte [r12 + 0x11], dil
je 0x18008b5ff
mov byte [r12 + 0x3c], 1
mov rax, qword [rbx + 0x78]
mov qword [r12 + 0x40], rax
lea rax, [r12 + 0x30]
mov qword [rbx + 0x78], rax
mov byte [r12 + 0x10], 2
cmp byte [rbx + 0x24], 2
jae 0x18008b60f
mov byte [rbx + 0x24], 2
or word [rbx + 0x28], 0x20
mov rsi, qword [rbx + 0x18]
mov qword [rbx + 0x80], r12
mov rax, qword [rsi + 0x50]
mov ecx, dword [rax + 0x1c]
bswap ecx
cmp dword [rbx + 0x40], ecx
je 0x18008b648
mov rcx, qword [rsi + 0x70]
call fcn.180021e90
mov edi, eax
test eax, eax
jne 0x18008b66e
mov ecx, dword [rbx + 0x40]
mov rax, qword [rsi + 0x50]
bswap ecx
mov dword [rax + 0x1c], ecx
mov rax, qword [r12]
mov rcx, qword [rbx]
mov edx, dword [rax + 0x274]
cmp edx, dword [rcx + 0x80]
jle 0x18008b66c
cmp byte [rcx + 0xa], 0
je 0x18008b66c
call fcn.180022360
mov edi, eax
jmp 0x18008b66e
xor edi, edi
cmp byte [r12 + 0x11], 0
je 0x18008b685
dec dword [r12 + 0x14]
jne 0x18008b685
mov rcx, r12
call fcn.180025f10
test edi, edi
jne 0x18008b87b
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x18008b69e
mov dword [rbp + 0x5c], edi
mov rax, qword [r12 + 8]
mov esi, dword [rsp + 0x78]
xor r9d, r9d
mov edx, dword [rax + 0x34]
mov r8d, esi
mov rcx, r15
call fcn.180028910
test eax, eax
jne 0x18008b876
cmp dword [rsp + 0x80], eax
jne 0x18008b6e2
mov edx, dword [rbp + 0x5c]
xor r9d, r9d
mov r8d, esi
mov rcx, r15
call fcn.180028910
test eax, eax
jne 0x18008b876
cmp byte [rbp + 0x55], 0
jne 0x18008b876
movzx eax, byte [rbp + 0x58]
test al, al
js 0x18008b6f9
movsx eax, al
jmp 0x18008b701
mov rcx, r12
call fcn.180028be0
mov edx, eax
mov rcx, r15
call fcn.180028b50
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.18008b100
mov edi, eax
test eax, eax
jne 0x18008b87b
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.18008b100
mov edi, eax
test eax, eax
jne 0x18008b87b
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.18008b100
mov edi, eax
test eax, eax
jne 0x18008b87b
or dword [rbp + 0x2c], 0x8000000
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.18008b100
and dword [rbp + 0x2c], 0xf7ffffff
mov edi, eax
test eax, eax
jne 0x18008b87b
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.18008b100
mov edi, eax
test eax, eax
jne 0x18008b87b
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.18008b100
mov edi, eax
test eax, eax
jne 0x18008b87b
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.18008b050
mov edi, eax
test eax, eax
jne 0x18008b87b
xor ebx, ebx
lea r13, [0x18020ed10]
nop word [rax + rax]
movzx edx, byte [rbx + r13]
lea r8, [rsp + 0x78]
mov rcx, r12
call fcn.180030b80
movzx r8d, byte [rbx + r13 + 1]
movzx edx, byte [rbx + r13]
add r8d, dword [rsp + 0x78]
mov rcx, r15
call fcn.180030c10
mov edi, eax
test eax, eax
jne 0x18008b87b
add rbx, 2
cmp rbx, 0xa
jl 0x18008b7f0
mov rdx, r15
mov rcx, r12
call fcn.180033a00
mov edi, eax
test eax, eax
jne 0x18008b87b
mov rcx, r15
call fcn.18002a150
mov edi, eax
test eax, eax
jne 0x18008b87b
mov rcx, r15
call fcn.180028be0
mov rcx, r12
mov edx, eax
call fcn.180028b50
mov r11, qword [r15 + 8]
lea r9d, [rdi + 1]
mov edx, dword [r11 + 0x34]
mov r8d, esi
mov rcx, r12
call fcn.180028910
mov edi, eax
jmp 0x18008b87b
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 + 0x64], eax
mov eax, dword [rsp + 0x24]
mov rcx, r12
mov dword [rbp + 0x68], eax
mov rax, qword [rsp + 0x28]
mov qword [rbp + 0xc8], rax
call fcn.180028910
mov r12, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x70]
mov byte [rbp + 0x53], 1
test r14, r14
je 0x18008b8ea
mov rcx, qword [r14 + 8]
call fcn.1800285b0
mov qword [r14 + 8], 0
mov qword [r14 + 0x18], 0
mov rcx, rbp
call fcn.180059010
mov eax, edi
mov rdi, qword [rsp + 0x40]
add rsp, 0x50
pop r14
pop r13
pop rbp
ret