Function at 0x1800b8590
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rsi
push r13
push r14
push r15
sub rsp, 0x90
mov rax, qword [0x18014f0c0]
xor rax, rsp
mov qword [rsp + 0x68], rax
cmp byte [rdx + 0x65], 0
mov r13, r9
mov dword [rsp + 0x24], r8d
mov rsi, rdx
mov r14, rcx
mov qword [rsp + 0x38], 0
mov r15d, 1
jne 0x1800b8623
lea edx, [r15 + 0x27]
mov rcx, rsi
call fcn.180013380
mov rbx, rax
test rax, rax
je 0x1800b8608
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1801389d8]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1801389e8]
movsd qword [rax + 0x20], xmm0
mov rdx, qword [r14]
test rdx, rdx
je 0x1800b8618
mov rcx, rsi
call fcn.180012ea0
mov qword [r14], rbx
mov eax, r15d
jmp 0x1800b8e22
cmp dword [rdx + 0xd8], r15d
jle 0x1800b8693
mov edx, 0x2b
mov rcx, rsi
call fcn.180013380
mov rbx, rax
test rax, rax
je 0x1800b8678
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x180138a00]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x180138a10]
movsd qword [rax + 0x20], xmm0
movzx eax, word [0x180138a18]
mov word [rbx + 0x28], ax
movzx eax, byte [0x180138a1a]
mov byte [rbx + 0x2a], al
mov rdx, qword [r14]
test rdx, rdx
je 0x1800b8618
mov rcx, rsi
call fcn.180012ea0
mov eax, r15d
mov qword [r14], rbx
jmp 0x1800b8e22
mov qword [rsp + 0x80], rdi
mov edi, dword [rdx + 0x4c]
lea rdx, [0x180000000]
test r13, r13
je 0x1800b875b
movzx ecx, word [r9 + 0x14]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x130c10], 3
je 0x1800b8707
mov edx, 0x12
mov rcx, rsi
call fcn.180013380
mov rbx, rax
test rax, rax
je 0x1800b86ec
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [rax], xmm0
movzx ecx, word [0x180138a30]
mov word [rax + 0x10], cx
mov rdx, qword [r14]
test rdx, rdx
je 0x1800b86fc
mov rcx, rsi
call fcn.180012ea0
mov qword [r14], rbx
mov eax, r15d
jmp 0x1800b8e1a
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x1800b872b
cmp byte [r9 + 0x16], r15b
jne 0x1800b872b
mov r9, qword [r9 + 8]
and dword [rsi + 0x4c], 0xfffffffe
or dword [rsi + 0x4c], 6
jmp 0x1800b8762
test r15b, cl
je 0x1800b873d
and dword [rsi + 0x4c], 0xfffffffe
xor r9d, r9d
or dword [rsi + 0x4c], 6
jmp 0x1800b8762
movzx edx, r15b
mov rcx, r13
call fcn.180040f10
and dword [rsi + 0x4c], 0xfffffffe
mov r9, rax
or dword [rsi + 0x4c], 6
mov r8d, dword [rsp + 0x24]
jmp 0x1800b8762
lea r9, [0x18012b0c9]
mov eax, dword [rsi + 0x2c]
mov rcx, qword [rsi + 0x30]
mov rdx, qword [rsi + 0x78]
mov dword [rsp + 0x30], eax
or eax, 6
mov dword [rsi + 0x2c], eax
mov rax, rcx
mov qword [rsp + 0x48], rcx
movabs rcx, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x50], rdx
mov rdx, qword [rsi + 0x80]
or rax, 0x201
mov qword [rsi + 0x30], rax
mov rax, qword [rsi + 0x20]
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x78], r12
movsxd r12, r8d
shl r12, 5
mov qword [rsp + 0x58], rdx
movzx edx, byte [rsi + 0x6e]
mov byte [rsi + 0x6e], 0
mov rcx, qword [rax + r12]
mov rbx, qword [rax + r12 + 8]
mov qword [rsp + 0x40], rcx
mov byte [rsp + 0x20], dl
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp byte [rcx + 0x10], 0
jne 0x1800b87f4
cmp byte [rcx + 0x14], 0
mov dword [rsp + 0x28], 0
je 0x1800b87f9
mov dword [rsp + 0x28], r15d
mov eax, dword [rsi + 0x28]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rdx, r14
mov dword [rsp + 0x2c], eax
mov rcx, rsi
call fcn.1800b8290
mov dword [rsi + 0x4c], edi
mov ebp, eax
test eax, eax
jne 0x1800b8d93
movsxd rax, dword [rsp + 0x2c]
shl rax, 5
add rax, qword [rsi + 0x20]
mov qword [rsp + 0x38], rax
mov rdi, qword [rax + 8]
test r13, r13
je 0x1800b88e1
mov rax, qword [rdi + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x60], 0
mov rax, qword [rcx]
test rax, rax
je 0x1800b88ca
lea rdx, [rsp + 0x60]
call qword [rax + 0x30]
test eax, eax
jne 0x1800b886e
cmp qword [rsp + 0x60], 0
jle 0x1800b88ca
mov edx, 0x1b
mov rcx, rsi
mov ebp, r15d
call fcn.180013380
mov rdi, rax
test rax, rax
je 0x1800b88b2
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x180138a60]
movsd qword [rax + 0x10], xmm0
movzx ecx, word [0x180138a68]
mov word [rax + 0x18], cx
movzx eax, byte [0x180138a6a]
mov byte [rdi + 0x1a], al
mov rdx, qword [r14]
test rdx, rdx
je 0x1800b88c2
mov rcx, rsi
call fcn.180012ea0
mov qword [r14], rdi
jmp 0x1800b8d93
mov rax, qword [rsi + 0x20]
or dword [rsi + 0x2c], 8
movzx r15d, byte [r12 + rax + 0x10]
mov eax, dword [rsi + 0x30]
and eax, 0x38
or r15d, eax
cmp byte [rbx + 0x11], 0
je 0x1800b88f8
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x1800b88f8
mov rcx, rbx
call fcn.18002e920
mov rax, qword [rbx + 8]
mov r12d, dword [rax + 0x34]
sub r12d, dword [rax + 0x38]
cmp byte [rbx + 0x11], 0
movzx ebp, byte [rax + 0x26]
je 0x1800b891c
sub dword [rbx + 0x14], 1
jne 0x1800b891c
mov rcx, rbx
call fcn.18002e8f0
mov rax, qword [rsi + 0x20]
cmp ebp, r12d
movsxd rdx, dword [rsp + 0x24]
mov rcx, rdi
cmovg r12d, ebp
shl rdx, 5
mov rdx, qword [rdx + rax + 0x18]
mov edx, dword [rdx + 0x74]
call fcn.180031ca0
cmp byte [rbx + 0x11], 0
mov rbp, qword [rbx + 8]
je 0x1800b895b
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x1800b895b
mov rcx, rbx
call fcn.18002e920
mov rax, qword [rbp]
mov rbp, qword [rax + 0x120]
movsxd rdx, dword [rbp + 0x20]
test edx, edx
jns 0x1800b8995
mov eax, dword [rbp + 0x2c]
add eax, dword [rbp + 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 ebp, dword [rbp + 0x24]
cmp edx, ebp
cmovge ebp, edx
cmp byte [rbx + 0x11], 0
je 0x1800b89b1
sub dword [rbx + 0x14], 1
jne 0x1800b89b1
mov rcx, rbx
call fcn.18002e8f0
mov edx, ebp
mov rcx, rdi
call fcn.180031d40
cmp byte [rdi + 0x11], 0
mov rbp, qword [rdi + 8]
je 0x1800b89d6
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], 0
jne 0x1800b89d6
mov rcx, rdi
call fcn.18002e920
mov rcx, qword [rbp]
or r15d, 0x20
mov edx, r15d
call fcn.180026ac0
cmp byte [rdi + 0x11], 0
je 0x1800b89fa
sub dword [rdi + 0x14], 1
jne 0x1800b89fa
mov rcx, rdi
call fcn.18002e8f0
lea r8, str.BEGIN
mov rdx, r14
mov rcx, rsi
call fcn.1800b8060
mov ebp, eax
test eax, eax
jne 0x1800b8d93
xor edx, edx
mov eax, 2
test r13, r13
cmove edx, eax
cmp byte [rbx + 0x11], bpl
jne 0x1800b8a3e
movzx eax, byte [rbx + 0x10]
test al, al
je 0x1800b8a3e
cmp al, 1
jne 0x1800b8abb
test r13, r13
jne 0x1800b8a53
xor r8d, r8d
mov rcx, rbx
call fcn.1800324e0
mov ebp, eax
test ebp, ebp
jne 0x1800b8d93
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x1800b8a69
test r13, r13
jne 0x1800b8a69
mov dword [rsi + 0x74], r13d
mov rax, qword [rbx + 8]
xor r9d, r9d
mov r8d, r12d
mov rcx, rdi
mov edx, dword [rax + 0x34]
call fcn.180031e10
test eax, eax
jne 0x1800b8d8e
cmp dword [rsp + 0x28], eax
jne 0x1800b8aa5
mov edx, dword [rsi + 0x74]
xor r9d, r9d
mov r8d, r12d
mov rcx, rdi
call fcn.180031e10
test eax, eax
jne 0x1800b8d8e
cmp byte [rsi + 0x67], 0
jne 0x1800b8d8e
movsx eax, byte [rsi + 0x6a]
test al, al
js 0x1800b8aef
mov ebp, eax
jmp 0x1800b8b30
test r13, r13
jne 0x1800b8a53
mov rax, qword [rbx]
mov edx, dword [rax + 0x2f0]
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp edx, dword [rcx + 0x80]
jle 0x1800b8ae8
cmp byte [rcx + 0xa], r13b
je 0x1800b8ae8
call fcn.180029a60
jmp 0x1800b8a49
xor ebp, ebp
jmp 0x1800b8a4b
cmp byte [rbx + 0x11], 0
je 0x1800b8b06
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x1800b8b06
mov rcx, rbx
call fcn.18002e920
mov rax, qword [rbx + 8]
xor ebp, ebp
cmp byte [rax + 0x21], bpl
je 0x1800b8b1c
cmp byte [rax + 0x22], bpl
setne bpl
inc ebp
cmp byte [rbx + 0x11], 0
je 0x1800b8b30
sub dword [rbx + 0x14], 1
jne 0x1800b8b30
mov rcx, rbx
call fcn.18002e8f0
mov edx, ebp
mov rcx, rdi
call fcn.180031fa0
mov eax, dword [rsp + 0x2c]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r15, qword [rsp + 0x40]
mov rdx, r14
mov r9, r15
mov byte [rsi + 0xc4], al
mov rcx, rsi
call fcn.1800b8290
mov ebp, eax
test eax, eax
jne 0x1800b8d93
mov r9, r15
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r14
mov rcx, rsi
call fcn.1800b8290
mov ebp, eax
test eax, eax
jne 0x1800b8d93
mov r9, r15
mov byte [rsi + 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, rsi
call fcn.1800b8290
and dword [rsi + 0x2c], 0xfffffffb
mov ebp, eax
test eax, eax
jne 0x1800b8d93
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, rsi
call fcn.1800b8290
mov ebp, eax
test eax, eax
jne 0x1800b8d93
xor r14d, r14d
lea r12, [0x180000000]
nop dword [rax]
cmp byte [rbx + 0x11], 0
movzx ebp, byte [r14 + r12 + 0x12b200]
mov r15, qword [rbx + 8]
je 0x1800b8c04
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x1800b8c04
mov rcx, rbx
call fcn.18002e920
cmp ebp, 0xf
jne 0x1800b8c17
mov rax, qword [r15]
mov ebp, dword [rax + 0x84]
add ebp, dword [rbx + 0x1c]
jmp 0x1800b8c2b
mov rax, qword [r15 + 0x18]
lea edx, [rbp*4 + 0x24]
mov rcx, qword [rax + 0x50]
mov ebp, dword [rdx + rcx]
bswap ebp
cmp byte [rbx + 0x11], 0
je 0x1800b8c3f
sub dword [rbx + 0x14], 1
jne 0x1800b8c3f
mov rcx, rbx
call fcn.18002e8f0
movzx r8d, byte [r14 + r12 + 0x12b201]
mov rcx, rdi
movzx edx, byte [r14 + r12 + 0x12b200]
add r8d, ebp
call fcn.18003ce30
mov ebp, eax
test eax, eax
jne 0x1800b8d93
add r14, 2
cmp r14, 0xa
jl 0x1800b8be0
test r13, r13
jne 0x1800b8c8e
mov rdx, rdi
mov rcx, rbx
call fcn.18003f680
mov ebp, eax
test eax, eax
jne 0x1800b8d93
cmp byte [rdi + 0x11], 0
je 0x1800b8ca5
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], 0
jne 0x1800b8ca5
mov rcx, rdi
call fcn.18002e920
xor edx, edx
mov rcx, rdi
call fcn.180033800
mov ebp, eax
test eax, eax
jne 0x1800b8cc1
xor edx, edx
mov rcx, rdi
call fcn.180033a50
mov ebp, eax
cmp byte [rdi + 0x11], 0
je 0x1800b8cd5
sub dword [rdi + 0x14], 1
jne 0x1800b8cd5
mov rcx, rdi
call fcn.18002e8f0
test ebp, ebp
jne 0x1800b8d93
test r13, r13
jne 0x1800b8d93
cmp byte [rdi + 0x11], r13b
je 0x1800b8cfd
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], r13b
jne 0x1800b8cfd
mov rcx, rdi
call fcn.18002e920
mov rax, qword [rdi + 8]
xor ebp, ebp
cmp byte [rax + 0x21], bpl
je 0x1800b8d13
cmp byte [rax + 0x22], bpl
setne bpl
inc ebp
cmp byte [rdi + 0x11], 0
je 0x1800b8d27
sub dword [rdi + 0x14], 1
jne 0x1800b8d27
mov rcx, rdi
call fcn.18002e8f0
mov edx, ebp
mov rcx, rbx
call fcn.180031fa0
cmp byte [rdi + 0x11], 0
je 0x1800b8d48
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], 0
jne 0x1800b8d48
mov rcx, rdi
call fcn.18002e920
mov rax, qword [rdi + 8]
mov ebp, dword [rax + 0x34]
sub ebp, dword [rax + 0x38]
cmp byte [rdi + 0x11], 0
movzx r14d, byte [rax + 0x26]
je 0x1800b8d6b
sub dword [rdi + 0x14], 1
jne 0x1800b8d6b
mov rcx, rdi
call fcn.18002e8f0
mov rax, qword [rdi + 8]
cmp r14d, ebp
mov r9d, 1
mov rcx, rbx
cmovg ebp, r14d
mov r8d, ebp
mov edx, dword [rax + 0x34]
call fcn.180031e10
mov ebp, eax
jmp 0x1800b8d93
mov ebp, 7
mov eax, dword [rsp + 0x30]
mov r9d, 1
mov dword [rsi + 0x2c], eax
xor r8d, r8d
mov rax, qword [rsp + 0x48]
mov rcx, rbx
mov qword [rsi + 0x30], rax
mov rax, qword [rsp + 0x50]
lea edx, [r9 - 2]
mov qword [rsi + 0x78], rax
mov rax, qword [rsp + 0x58]
mov qword [rsi + 0x80], rax
movzx eax, byte [rsp + 0x20]
mov byte [rsi + 0x6e], al
mov byte [rsi + 0xc4], 0
call fcn.180031e10
mov rbx, qword [rsp + 0x38]
mov r12, qword [rsp + 0x78]
mov byte [rsi + 0x65], 1
test rbx, rbx
je 0x1800b8e08
mov rcx, qword [rbx + 8]
call fcn.180031a60
mov qword [rbx + 8], 0
mov qword [rbx + 0x18], 0
mov rcx, rsi
call fcn.1800734f0
mov eax, ebp
mov rbp, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1800f0be0
add rsp, 0x90
pop r15
pop r14
pop r13
pop rsi
pop rbx
ret