Function at 0x1403a8010
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rsi
push rdi
push r13
push r15
sub rsp, 0xa0
mov rax, qword [0x1404af540]
xor rax, rsp
mov qword [rsp + 0x70], rax
cmp byte [rdx + 0x65], 0
mov r13, r9
mov dword [rsp + 0x24], r8d
mov rsi, rdx
mov rdi, rcx
mov qword [rsp + 0x38], 0
mov r15d, 1
jne 0x1403a80a3
mov edx, reloc.SinoSPE.dll_Ordinal_40
mov rcx, rsi
call fcn.140342dc0
mov rbx, rax
test rax, rax
je 0x1403a8088
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1403f3880]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1403f3890]
movsd qword [rax + 0x20], xmm0
mov rdx, qword [rdi]
test rdx, rdx
je 0x1403a8098
mov rcx, rsi
call fcn.140342c30
mov qword [rdi], rbx
mov eax, r15d
jmp 0x1403a87b8
cmp dword [rdx + 0xd8], r15d
jle 0x1403a8113
mov edx, Ordinal_44
mov rcx, rsi
call fcn.140342dc0
mov rbx, rax
test rax, rax
je 0x1403a80f8
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x1403f38a8]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x1403f38b8]
movsd qword [rax + 0x20], xmm0
movzx eax, word [0x1403f38c0]
mov word [rbx + 0x28], ax
movzx eax, byte [0x1403f38c2]
mov byte [rbx + 0x2a], al
mov rdx, qword [rdi]
test rdx, rdx
je 0x1403a8098
mov rcx, rsi
call fcn.140342c30
mov eax, r15d
mov qword [rdi], rbx
jmp 0x1403a87b8
mov qword [rsp + 0x88], r14
mov r14d, dword [rdx + 0x4c]
lea rdx, [0x140000000]
test r13, r13
je 0x1403a81dc
movzx ecx, word [r9 + 0x14]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x3e4010], 3
je 0x1403a8188
mov edx, reloc.OLEAUT32.dll_SafeArrayGetUBound
mov rcx, rsi
call fcn.140342dc0
mov rbx, rax
test rax, rax
je 0x1403a816d
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [rax], xmm0
movzx ecx, word [0x1403f38d8]
mov word [rax + 0x10], cx
mov rdx, qword [rdi]
test rdx, rdx
je 0x1403a817d
mov rcx, rsi
call fcn.140342c30
mov qword [rdi], rbx
mov eax, r15d
jmp 0x1403a87b0
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x1403a81ac
cmp byte [r9 + 0x16], r15b
jne 0x1403a81ac
mov r9, qword [r9 + 8]
and dword [rsi + 0x4c], 0xfffffffe
or dword [rsi + 0x4c], 6
jmp 0x1403a81e3
test r15b, cl
je 0x1403a81be
and dword [rsi + 0x4c], 0xfffffffe
xor r9d, r9d
or dword [rsi + 0x4c], 6
jmp 0x1403a81e3
movzx edx, r15b
mov rcx, r13
call fcn.1403af620
and dword [rsi + 0x4c], 0xfffffffe
mov r9, rax
or dword [rsi + 0x4c], 6
mov r8d, dword [rsp + 0x24]
jmp 0x1403a81e3
lea r9, [0x1403f5736]
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 + 0x50], rcx
movabs rcx, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x58], rdx
mov rdx, qword [rsi + 0x80]
or rax, 0x201
mov qword [rsi + 0x30], rax
mov rax, qword [rsi + 0x20]
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0x90], r12
movsxd r12, r8d
shl r12, 5
mov qword [rsp + 0x60], rdx
movzx edx, byte [rsi + 0x6e]
mov byte [rsi + 0x6e], 0
mov rcx, qword [r12 + rax]
mov rbx, qword [r12 + rax + 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 0x1403a8278
cmp byte [rcx + 0x14], 0
mov dword [rsp + 0x2c], 0
je 0x1403a827d
mov dword [rsp + 0x2c], r15d
mov eax, dword [rsi + 0x28]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rdx, rdi
mov dword [rsp + 0x28], eax
mov rcx, rsi
call fcn.1402b5570
mov dword [rsi + 0x4c], r14d
mov ebp, eax
test eax, eax
jne 0x1403a8725
movsxd rax, dword [rsp + 0x28]
mov rcx, qword [rsi + 0x20]
shl rax, 5
add rax, rcx
mov qword [rsp + 0x38], rax
mov r14, qword [rax + 8]
mov qword [rsp + 0x48], r14
test r13, r13
je 0x1403a836f
mov rax, qword [r14 + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x68], 0
mov rax, qword [rcx]
test rax, rax
je 0x1403a8358
lea rdx, [rsp + 0x68]
call qword [rax + reloc.SinoSPE.dll_Ordinal_48]
test eax, eax
jne 0x1403a82fb
cmp qword [rsp + 0x68], 0
jle 0x1403a8358
mov edx, Ordinal_29
mov rcx, rsi
mov ebp, r15d
call fcn.140342dc0
mov r14, rax
test rax, rax
je 0x1403a8340
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x1403f3908]
movsd qword [rax + 0x10], xmm0
movzx ecx, word [0x1403f3910]
mov word [rax + 0x18], cx
movzx eax, byte [0x1403f3912]
mov byte [r14 + 0x1a], al
mov rdx, qword [rdi]
test rdx, rdx
je 0x1403a8350
mov rcx, rsi
call fcn.140342c30
mov qword [rdi], r14
jmp 0x1403a8725
or dword [rsi + 0x2c], 8
mov rcx, qword [rsi + 0x20]
mov eax, dword [rsi + 0x30]
and eax, 0x38
movzx r15d, byte [rcx + r12 + 0x10]
or r15d, eax
cmp dword [rsi + 0x74], 0
je 0x1403a83a0
movsxd rbp, dword [rsp + 0x24]
mov rdx, rbp
shl rdx, 5
mov rdx, qword [rdx + rcx]
mov rcx, rsi
call fcn.1403a6d50
test rax, rax
je 0x1403a83a4
cmp dword [rax], 0
je 0x1403a83a4
mov dword [rsi + 0x74], 0
jmp 0x1403a83a4
mov ebp, dword [rsp + 0x24]
mov rax, qword [rsi + 0x20]
mov rcx, r14
movsxd rdx, ebp
shl rdx, 5
mov rdx, qword [rdx + rax + 0x18]
mov edx, dword [rdx + 0x74]
call fcn.14033c850
xor edx, edx
mov rcx, rbx
call fcn.14033ca50
mov edx, eax
mov rcx, r14
call fcn.14033ca50
or r15d, 0x20
mov rcx, r14
mov edx, r15d
call fcn.14033c9f0
lea r8, str.BEGIN
mov rdx, rdi
mov rcx, rsi
call fcn.1402b5310
mov ebp, eax
test eax, eax
jne 0x1403a8725
xor edx, edx
mov eax, 2
test r13, r13
cmove edx, eax
cmp byte [rbx + 0x11], bpl
jne 0x1403a8426
movzx eax, byte [rbx + 0x10]
test al, al
je 0x1403a8426
cmp al, 1
jne 0x1403a858f
test r13, r13
jne 0x1403a843b
xor r8d, r8d
mov rcx, rbx
call fcn.1402a72e0
mov ebp, eax
test ebp, ebp
jne 0x1403a8725
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x1403a8451
test r13, r13
jne 0x1403a8451
mov dword [rsi + 0x74], r13d
mov rax, qword [rbx + 8]
xor r9d, r9d
mov r12d, dword [rsp + 0xf0]
mov rcx, r14
mov r8d, r12d
mov edx, dword [rax + 0x34]
call fcn.14033c8f0
test eax, eax
jne 0x1403a8720
cmp dword [rsp + 0x2c], eax
jne 0x1403a8495
mov edx, dword [rsi + 0x74]
xor r9d, r9d
mov r8d, r12d
mov rcx, r14
call fcn.14033c8f0
test eax, eax
jne 0x1403a8720
cmp byte [rsi + 0x67], 0
jne 0x1403a8720
movsx eax, byte [rsi + 0x6a]
test al, al
jns 0x1403a84af
mov rcx, rbx
call fcn.14033a600
mov edx, eax
mov rcx, r14
call fcn.14033c7c0
mov eax, dword [rsp + 0x28]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov r14, qword [rsp + 0x40]
mov rdx, rdi
mov r9, r14
mov byte [rsi + 0xc4], al
mov rcx, rsi
call fcn.1402b5570
mov ebp, eax
test eax, eax
jne 0x1403a8725
mov r9, r14
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, rdi
mov rcx, rsi
call fcn.1402b5570
mov ebp, eax
test eax, eax
jne 0x1403a8725
mov r9, r14
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, rdi
mov rcx, rsi
call fcn.1402b5570
and dword [rsi + 0x2c], 0xfffffffb
mov ebp, eax
test eax, eax
jne 0x1403a8725
mov r9, r14
lea r8, str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, rdi
mov rcx, rsi
call fcn.1402b5570
mov ebp, eax
test eax, eax
jne 0x1403a8725
xor r14d, r14d
cmp byte [rbx + 0x11], 0
lea rbp, [0x140000000]
movzx edi, byte [r14 + rbp + 0x3e8198]
mov r15, qword [rbx + 8]
je 0x1403a857c
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], 0
jne 0x1403a857c
mov rcx, rbx
call fcn.1402a8560
cmp edi, 0xf
jne 0x1403a85c7
mov rax, qword [r15]
mov edi, dword [rax + 0x84]
add edi, dword [rbx + 0x1c]
jmp 0x1403a85db
test r13, r13
jne 0x1403a843b
mov rax, qword [rbx]
mov edx, dword [rax + 0x308]
mov rax, qword [rbx + 8]
mov rcx, qword [rax]
cmp edx, dword [rcx + 0x80]
jle 0x1403a85c0
cmp byte [rcx + 0xa], r13b
je 0x1403a85c0
call fcn.140315ad0
jmp 0x1403a8431
xor ebp, ebp
jmp 0x1403a8433
mov rax, qword [r15 + 0x18]
lea edx, [rdi*4 + 0x24]
mov rcx, qword [rax + 0x50]
mov edi, dword [rdx + rcx]
bswap edi
cmp byte [rbx + 0x11], 0
je 0x1403a85ef
sub dword [rbx + 0x14], 1
jne 0x1403a85ef
mov rcx, rbx
call fcn.1403acf60
movzx r8d, byte [r14 + rbp + 0x3e8199]
movzx edx, byte [r14 + rbp + 0x3e8198]
add r8d, edi
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call fcn.14033d550
mov ebp, eax
test eax, eax
jne 0x1403a8725
add r14, 2
cmp r14, 0xa
jl 0x1403a8551
test r13, r13
jne 0x1403a8643
mov rdx, rdi
mov rcx, rbx
call fcn.140339c00
mov ebp, eax
test eax, eax
jne 0x1403a8725
mov rcx, rdi
call fcn.1403399d0
mov ebp, eax
test eax, eax
jne 0x1403a8725
test r13, r13
jne 0x1403a8725
mov rcx, rdi
call fcn.14033a600
mov edx, eax
mov rcx, rbx
call fcn.14033c7c0
mov rax, qword [rdi + 8]
mov r14, qword [rbx + 8]
mov edi, dword [rax + 0x34]
cmp byte [rbx + 0x11], r13b
je 0x1403a8692
inc dword [rbx + 0x14]
cmp byte [rbx + 0x12], r13b
jne 0x1403a8692
mov rcx, rbx
call fcn.1402a8560
mov byte [r14 + 0x26], r12b
test r12d, r12d
jns 0x1403a86a3
mov r12d, dword [r14 + 0x34]
sub r12d, dword [r14 + 0x38]
test byte [r14 + 0x28], 2
je 0x1403a86c5
cmp byte [rbx + 0x11], 0
je 0x1403a86be
sub dword [rbx + 0x14], 1
jne 0x1403a86be
mov rcx, rbx
call fcn.1403acf60
mov ebp, 8
jmp 0x1403a8725
lea eax, [rdi - 0x200]
cmp eax, 0xfe00
ja 0x1403a86e5
lea eax, [rdi - 1]
test edi, eax
jne 0x1403a86e5
mov rcx, r14
mov dword [r14 + 0x34], edi
call fcn.1402c03a0
mov rcx, qword [r14]
lea rdx, [r14 + 0x34]
mov r8d, r12d
call fcn.14036e880
mov ecx, dword [r14 + 0x34]
mov ebp, eax
or word [r14 + 0x28], 2
movzx eax, r12w
sub ecx, eax
mov dword [r14 + 0x38], ecx
cmp byte [rbx + 0x11], 0
je 0x1403a8725
sub dword [rbx + 0x14], 1
jne 0x1403a8725
mov rcx, rbx
call fcn.1403acf60
jmp 0x1403a8725
mov ebp, 7
mov eax, dword [rsp + 0x30]
mov r9d, 1
mov dword [rsi + 0x2c], eax
xor r8d, r8d
mov rax, qword [rsp + 0x50]
mov edx, 0xffffffff
mov qword [rsi + 0x30], rax
mov rcx, rbx
mov rax, qword [rsp + 0x58]
mov qword [rsi + 0x78], rax
mov rax, qword [rsp + 0x60]
mov qword [rsi + 0x80], rax
movzx eax, byte [rsp + 0x20]
mov byte [rsi + 0x6e], al
mov byte [rsi + 0xc4], 0
call fcn.14033c8f0
mov rbx, qword [rsp + 0x38]
mov r12, qword [rsp + 0x90]
mov byte [rsi + 0x65], 1
test rbx, rbx
je 0x1403a879e
mov rcx, qword [rbx + 8]
call fcn.140339560
mov qword [rbx + 8], 0
mov qword [rbx + 0x18], 0
mov rcx, rsi
call fcn.140377a10
mov eax, ebp
mov rbp, qword [rsp + 0x98]
mov r14, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x70]
xor rcx, rsp
call fcn.1403ca460
add rsp, 0xa0
pop r15
pop r13
pop rdi
pop rsi
pop rbx
ret