Function at 0x14009ec30
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x60
movsxd rbp, r8d
mov r13, r9
xor r8d, r8d
mov rbx, rdx
mov rsi, rcx
mov r12d, r8d
cmp byte [rdx + 0x5f], r8b
jne 0x14009ed0c
mov rdi, qword [rcx]
test rdi, rdi
je 0x14009eccb
cmp qword [rdx + 0x298], r8
je 0x14009ec7a
mov rdx, rdi
mov rcx, rbx
call fcn.1400170b0
jmp 0x14009eccb
cmp rdi, qword [rdx + 0x190]
jb 0x14009ec9f
cmp rdi, qword [rdx + 0x198]
jae 0x14009ec9f
mov rax, qword [rdx + 0x188]
mov qword [rdi], rax
mov qword [rdx + 0x188], rdi
jmp 0x14009eccb
cmp dword [0x1401abb60], r8d
mov rcx, rdi
je 0x14009ecc5
call qword [0x1401abb98]
movsxd rcx, eax
sub qword [0x1401b2b20], rcx
mov rcx, rdi
dec qword [0x1401b2b68]
call qword [0x1401abb88]
mov edx, SQLGetData
mov rcx, rbx
call fcn.1400174f0
test rax, rax
je 0x14009ecff
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x140165690]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1401656a0]
movsd qword [rax + 0x20], xmm0
mov qword [rsi], rax
mov eax, 1
jmp 0x14009f435
cmp dword [rdx + 0xc8], 1
jle 0x14009edde
mov rdi, qword [rcx]
test rdi, rdi
je 0x14009ed88
cmp qword [rdx + 0x298], r8
je 0x14009ed37
mov rdx, rdi
mov rcx, rbx
call fcn.1400170b0
jmp 0x14009ed88
cmp rdi, qword [rdx + 0x190]
jb 0x14009ed5c
cmp rdi, qword [rdx + 0x198]
jae 0x14009ed5c
mov rax, qword [rdx + 0x188]
mov qword [rdi], rax
mov qword [rdx + 0x188], rdi
jmp 0x14009ed88
cmp dword [0x1401abb60], r8d
mov rcx, rdi
je 0x14009ed82
call qword [0x1401abb98]
movsxd rcx, eax
sub qword [0x1401b2b20], rcx
mov rcx, rdi
dec qword [0x1401b2b68]
call qword [0x1401abb88]
mov edx, reloc.ODBC32.dll_SQLGetData
mov rcx, rbx
call fcn.1400174f0
test rax, rax
je 0x14009edd1
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1401656b8]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1401656c8]
movsd qword [rax + 0x20], xmm0
movzx ecx, word [0x1401656d0]
mov word [rax + 0x28], cx
movzx ecx, byte [0x1401656d2]
mov byte [rax + 0x2a], cl
mov qword [rsi], rax
mov eax, 1
jmp 0x14009f435
mov edi, dword [rdx + 0x4c]
lea rdx, [0x140000000]
test r13, r13
je 0x14009ef04
movzx ecx, word [r9 + 8]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x14bf90], 3
je 0x14009eeac
mov rdi, qword [rsi]
test rdi, rdi
je 0x14009ee78
cmp qword [rbx + 0x298], r8
je 0x14009ee27
mov rdx, rdi
mov rcx, rbx
call fcn.1400170b0
jmp 0x14009ee78
cmp rdi, qword [rbx + 0x190]
jb 0x14009ee4c
cmp rdi, qword [rbx + 0x198]
jae 0x14009ee4c
mov rax, qword [rbx + 0x188]
mov qword [rdi], rax
mov qword [rbx + 0x188], rdi
jmp 0x14009ee78
cmp dword [0x1401abb60], r8d
mov rcx, rdi
je 0x14009ee72
call qword [0x1401abb98]
movsxd rcx, eax
sub qword [0x1401b2b20], rcx
mov rcx, rdi
dec qword [0x1401b2b68]
call qword [0x1401abb88]
mov edx, 0x12
mov rcx, rbx
call fcn.1400174f0
test rax, rax
je 0x14009ee9f
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [rax], xmm0
movzx ecx, word [0x1401656e8]
mov word [rax + 0x10], cx
mov qword [rsi], rax
mov eax, 1
jmp 0x14009f435
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x14009eed4
cmp byte [r9 + 0xa], 1
jne 0x14009eed4
mov r9, qword [r9 + 0x10]
mov eax, edi
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x14009ef0b
test cl, 1
je 0x14009eee9
mov eax, edi
mov r9, r8
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x14009ef0b
mov dl, 1
mov rcx, r13
call fcn.14003bc00
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x14009ef0b
lea r9, [0x14016076c]
mov eax, dword [rbx + 0x2c]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rcx, qword [rbx + 0x30]
mov edx, dword [rbx + 0x74]
mov dword [rsp + 0x34], eax
or eax, 6
mov dword [rbx + 0x2c], eax
mov rax, rcx
and rax, 0xffffffffefffaf7f
mov qword [rsp + 0x50], rcx
or rax, 0x201
mov dword [rsp + 0x38], edx
mov edx, dword [rbx + 0x78]
mov rcx, rbp
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
shl rcx, 5
mov dword [rsp + 0x3c], edx
movzx edx, byte [rbx + 0x68]
mov byte [rbx + 0x68], r12b
mov byte [rsp + 0x20], dl
mov rdx, qword [rcx + rax]
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x90], r14
mov r14, qword [rcx + rax + 8]
mov qword [rsp + 0x48], rdx
mov rdx, rsi
mov qword [rsp + 0xa0], r15
movsxd r15, dword [rbx + 0x28]
mov rax, qword [r14 + 8]
mov dword [rsp + 0x30], r15d
mov rcx, qword [rax]
movzx eax, byte [rcx + 0x10]
mov rcx, rbx
mov byte [rsp + 0x98], al
call fcn.14009ea40
mov dword [rbx + 0x4c], edi
mov ebp, eax
test eax, eax
jne 0x14009f39a
mov rcx, qword [rbx + 0x20]
mov r12, r15
shl r12, 5
xor ebp, ebp
add r12, rcx
mov r15, qword [r12 + 8]
test r13, r13
je 0x14009f0ca
mov rax, qword [r15 + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x28], rbp
mov rax, qword [rcx]
test rax, rax
je 0x14009f0c2
lea rdx, [rsp + 0x28]
call qword [rax + 0x30]
test eax, eax
jne 0x14009f007
cmp qword [rsp + 0x28], rbp
jle 0x14009f0c2
mov rdi, qword [rsi]
mov ebp, 1
test rdi, rdi
je 0x14009f07c
cmp qword [rbx + 0x298], 0
je 0x14009f02b
mov rdx, rdi
mov rcx, rbx
call fcn.1400170b0
jmp 0x14009f07c
cmp rdi, qword [rbx + 0x190]
jb 0x14009f050
cmp rdi, qword [rbx + 0x198]
jae 0x14009f050
mov rax, qword [rbx + 0x188]
mov qword [rdi], rax
mov qword [rbx + 0x188], rdi
jmp 0x14009f07c
cmp dword [0x1401abb60], 0
mov rcx, rdi
je 0x14009f076
call qword [0x1401abb98]
movsxd rcx, eax
sub qword [0x1401b2b20], rcx
mov rcx, rdi
dec qword [0x1401b2b68]
call qword [0x1401abb88]
mov edx, reloc.WLDAP32.dll_Ordinal_27
mov rcx, rbx
call fcn.1400174f0
test rax, rax
je 0x14009f0ba
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [rax], xmm0
movsd xmm1, qword [0x140165718]
movsd qword [rax + 0x10], xmm1
movzx ecx, word [0x140165720]
mov word [rax + 0x18], cx
movzx ecx, byte [0x140165722]
mov byte [rax + 0x1a], cl
mov qword [rsi], rax
jmp 0x14009f39a
or dword [rbx + 0x2c], 8
mov rcx, qword [rbx + 0x20]
mov rax, qword [r14 + 8]
mov edi, dword [rax + 0x30]
sub edi, dword [rax + 0x34]
mov rax, qword [rsp + 0x40]
mov dword [rsp + 0x28], edi
mov rax, qword [rax + rcx + 0x18]
mov rcx, r15
mov edx, dword [rax + 0x74]
call fcn.14002e070
mov rax, qword [r14 + 8]
mov rcx, qword [rax]
mov r8, qword [rcx + 0x118]
movsxd r9, dword [r8 + 0x1c]
test r9d, r9d
jns 0x14009f121
mov eax, dword [r8 + 0x28]
add eax, dword [r8 + 0x24]
movsxd rcx, eax
mov rax, r9
neg rax
shl rax, 0xa
cqo
idiv rcx
mov r9, rax
mov edx, dword [r8 + 0x20]
mov rcx, r15
cmp r9d, edx
cmovge edx, r9d
call fcn.14002e0c0
mov rax, qword [r15 + 8]
lea r8, str.BEGIN
mov rdx, rsi
mov rcx, qword [rax]
mov dword [rcx + 0xb], 1
cmp byte [rcx + 0xc], 0
mov byte [rcx + 0xf], 0
movzx eax, byte [rcx + 0xf]
cmovne eax, ebp
and byte [rcx + 0x18], 0xfe
mov byte [rcx + 0xf], al
mov rcx, rbx
call fcn.14009e7c0
mov ebp, eax
test eax, eax
jne 0x14009f39a
xor edx, edx
mov eax, 2
test r13, r13
mov rcx, r14
cmove edx, eax
xor r8d, r8d
call fcn.14002e710
mov ebp, eax
test eax, eax
jne 0x14009f39a
mov rcx, qword [r14 + 8]
xor ebp, ebp
mov rax, qword [rcx]
cmp byte [rax + 9], 5
jne 0x14009f1ac
mov dword [rbx + 0x6c], ebp
mov rcx, qword [r14 + 8]
mov edx, dword [rcx + 0x30]
xor r9d, r9d
mov rcx, r15
mov r8d, edi
call fcn.14002e130
test eax, eax
jne 0x14009f395
cmp byte [rsp + 0x98], al
jne 0x14009f1e7
mov edx, dword [rbx + 0x6c]
xor r9d, r9d
mov r8d, edi
mov rcx, r15
call fcn.14002e130
test eax, eax
jne 0x14009f395
cmp byte [rbx + 0x61], 0
jne 0x14009f395
movsx eax, byte [rbx + 0x64]
test al, al
js 0x14009f1fd
mov edx, eax
jmp 0x14009f212
mov rax, qword [r14 + 8]
mov edx, ebp
cmp byte [rax + 0x21], 0
je 0x14009f212
cmp byte [rax + 0x22], 0
setne dl
inc edx
mov rcx, r15
call fcn.14002e1f0
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 rdi, qword [rsp + 0x48]
mov rdx, rsi
mov r9, rdi
mov byte [rbx + 0xb4], al
mov rcx, rbx
call fcn.14009ea40
mov ebp, eax
test eax, eax
jne 0x14009f39a
mov r9, rdi
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
mov rdx, rsi
mov rcx, rbx
call fcn.14009ea40
mov ebp, eax
test eax, eax
jne 0x14009f39a
mov r9, rdi
mov byte [rbx + 0xb4], al
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, rsi
mov rcx, rbx
call fcn.14009ea40
and dword [rbx + 0x2c], 0xfffffffb
mov ebp, eax
test eax, eax
jne 0x14009f39a
mov r9, rdi
lea r8, str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, rsi
mov rcx, rbx
call fcn.14009ea40
mov ebp, eax
test eax, eax
jne 0x14009f39a
xor esi, esi
mov edi, esi
mov rdx, qword [r14 + 8]
lea r8, [0x140000000]
movzx r9d, byte [rdi + r8 + 0x147020]
cmp r9d, 0xf
jne 0x14009f2dc
mov rax, qword [rdx]
mov edx, dword [rax + 0x84]
add edx, dword [r14 + 0x1c]
jmp 0x14009f30a
mov rax, qword [rdx + 0x18]
lea ecx, [r9*4 + 0x24]
add rcx, qword [rax + 0x50]
movzx eax, byte [rcx + 2]
movzx edx, byte [rcx + 1]
shl edx, 8
or edx, eax
movzx eax, byte [rcx]
shl eax, 0x18
shl edx, 8
or edx, eax
movzx eax, byte [rcx + 3]
or edx, eax
movzx r8d, byte [rdi + r8 + 0x147021]
mov rcx, r15
add r8d, edx
mov edx, r9d
call fcn.140037e80
mov ebp, eax
test eax, eax
jne 0x14009f39a
add rdi, 2
cmp rdi, 0xa
jl 0x14009f2b3
test r13, r13
jne 0x14009f347
mov rdx, r15
mov rcx, r14
call fcn.14003a620
mov ebp, eax
test eax, eax
jne 0x14009f39a
mov rcx, r15
call fcn.14002fd70
mov ebp, eax
test eax, eax
jne 0x14009f39a
test r13, r13
jne 0x14009f39a
mov rax, qword [r15 + 8]
mov edx, esi
cmp byte [rax + 0x21], sil
je 0x14009f36f
cmp byte [rax + 0x22], sil
setne dl
inc edx
mov rcx, r14
call fcn.14002e1f0
mov rdx, qword [r15 + 8]
mov r9d, 1
mov r8d, dword [rsp + 0x28]
mov rcx, r14
mov edx, dword [rdx + 0x30]
call fcn.14002e130
mov ebp, eax
jmp 0x14009f39a
mov ebp, 7
mov eax, dword [rsp + 0x34]
mov r15, qword [rsp + 0xa0]
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x50]
mov qword [rbx + 0x30], rax
mov eax, dword [rsp + 0x38]
mov dword [rbx + 0x74], eax
mov eax, dword [rsp + 0x3c]
mov dword [rbx + 0x78], eax
movzx eax, byte [rsp + 0x20]
mov byte [rbx + 0x68], al
mov byte [rbx + 0xb4], 0
mov r14, qword [r14 + 8]
test byte [r14 + 0x26], 2
jne 0x14009f404
mov edi, dword [r14 + 0x30]
lea rdx, [r14 + 0x30]
sub edi, dword [r14 + 0x34]
mov rcx, qword [r14]
mov r8d, edi
call fcn.140025100
mov ecx, dword [r14 + 0x30]
movzx eax, di
sub ecx, eax
or word [r14 + 0x26], 2
mov dword [r14 + 0x34], ecx
mov r14, qword [rsp + 0x90]
mov byte [rbx + 0x5f], 1
test r12, r12
je 0x14009f42b
mov rcx, qword [r12 + 8]
call fcn.14002df50
xor eax, eax
mov qword [r12 + 8], rax
mov qword [r12 + 0x18], rax
mov rcx, rbx
call fcn.140066770
mov eax, ebp
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret