Function at 0x140122120
Capabilities:
Reference sql statements

Disassembly:
push rbx
push rdi
push r13
push r14
push r15
sub rsp, 0x90
mov rax, qword [0x14023c8a0]
xor rax, rsp
mov qword [rsp + 0x60], rax
cmp byte [rdx + 0x65], 0
mov r13, r9
movsxd rdi, r8d
mov rbx, rdx
mov r14, rcx
mov qword [rsp + 0x30], 0
mov r15d, 1
jne 0x140122225
lea edx, [r15 + 0x27]
mov rcx, rbx
call fcn.1401ccf60
mov rdi, rax
test rax, rax
je 0x14012219a
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x140212ae8]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x140212af8]
movsd qword [rax + 0x20], xmm0
mov rcx, qword [r14]
test rcx, rcx
je 0x14012221a
cmp rcx, qword [rbx + 0x1f0]
jae 0x1401221f5
cmp rcx, qword [rbx + 0x1e0]
jb 0x1401221d0
mov rax, qword [rbx + 0x1d8]
mov qword [rcx], rax
mov eax, r15d
mov qword [rbx + 0x1d8], rcx
mov qword [r14], rdi
jmp 0x140122961
cmp rcx, qword [rbx + 0x1e8]
jb 0x1401221f5
mov rax, qword [rbx + 0x1c8]
mov qword [rcx], rax
mov eax, r15d
mov qword [rbx + 0x1c8], rcx
mov qword [r14], rdi
jmp 0x140122961
cmp qword [rbx + 0x308], 0
je 0x140122215
mov rdx, rcx
mov rcx, rbx
call fcn.1401cd4c0
mov eax, r15d
mov qword [r14], rdi
jmp 0x140122961
call fcn.1401cd540
mov qword [r14], rdi
mov eax, r15d
jmp 0x140122961
cmp dword [rdx + 0xd8], r15d
jle 0x1401222a1
mov edx, 0x2b
mov rcx, rbx
call fcn.1401ccf60
mov rdi, rax
test rax, rax
je 0x14012227a
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [rax], xmm0
movups xmm1, xmmword [0x140212b10]
movups xmmword [rax + 0x10], xmm1
movsd xmm0, qword [0x140212b20]
movsd qword [rax + 0x20], xmm0
movzx ecx, word [0x140212b28]
mov word [rax + 0x28], cx
movzx ecx, byte [0x140212b2a]
mov byte [rax + 0x2a], cl
mov rcx, qword [r14]
test rcx, rcx
je 0x14012221a
cmp rcx, qword [rbx + 0x1f0]
jae 0x1401221f5
cmp rcx, qword [rbx + 0x1e0]
jae 0x1401221b4
jmp 0x1401221d0
mov qword [rsp + 0x88], rbp
mov ebp, dword [rdx + 0x4c]
lea rdx, [0x140000000]
test r13, r13
je 0x1401223e2
movzx ecx, word [r9 + 0x14]
mov eax, ecx
and eax, 0x3f
cmp byte [rax + rdx + 0x20af20], 3
je 0x140122389
mov edx, reloc.WS2_32.dll_select
mov rcx, rbx
call fcn.1401ccf60
mov rdi, rax
test rax, rax
je 0x1401222fe
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [rax], xmm0
movzx ecx, word [0x140212b40]
mov word [rax + 0x10], cx
mov rcx, qword [r14]
test rcx, rcx
je 0x14012237e
cmp rcx, qword [rbx + 0x1f0]
jae 0x140122359
cmp rcx, qword [rbx + 0x1e0]
jb 0x140122334
mov rax, qword [rbx + 0x1d8]
mov qword [rcx], rax
mov eax, r15d
mov qword [rbx + 0x1d8], rcx
mov qword [r14], rdi
jmp 0x140122959
cmp rcx, qword [rbx + 0x1e8]
jb 0x140122359
mov rax, qword [rbx + 0x1c8]
mov qword [rcx], rax
mov eax, r15d
mov qword [rbx + 0x1c8], rcx
mov qword [r14], rdi
jmp 0x140122959
cmp qword [rbx + 0x308], 0
je 0x140122379
mov rdx, rcx
mov rcx, rbx
call fcn.1401cd4c0
mov eax, r15d
mov qword [r14], rdi
jmp 0x140122959
call fcn.1401cd540
mov qword [r14], rdi
mov eax, r15d
jmp 0x140122959
mov edx, 0x202
movzx eax, cx
and ax, dx
cmp ax, dx
jne 0x1401223b0
cmp byte [r9 + 0x16], r15b
jne 0x1401223b0
mov r9, qword [r9 + 8]
mov eax, ebp
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x1401223e9
test r15b, cl
je 0x1401223c5
mov eax, ebp
xor r9d, r9d
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x1401223e9
movzx edx, r15b
mov rcx, r13
call fcn.14019bd70
mov r9, rax
mov eax, dword [rbx + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [rbx + 0x4c], eax
jmp 0x1401223e9
lea r9, [0x140203533]
mov eax, dword [rbx + 0x2c]
mov rcx, qword [rbx + 0x30]
mov rdx, qword [rbx + 0x78]
mov dword [rsp + 0x2c], eax
or eax, 6
mov dword [rbx + 0x2c], eax
mov rax, rcx
mov qword [rsp + 0x40], rcx
movabs rcx, 0xfffffffeefffafff
and rax, rcx
mov qword [rsp + 0x48], rdx
mov rdx, qword [rbx + 0x80]
or rax, 0x201
mov qword [rbx + 0x30], rax
mov rax, qword [rbx + 0x20]
mov qword [rsp + 0x80], rsi
mov qword [rsp + 0x78], r12
mov r12, rdi
shl r12, 5
mov qword [rsp + 0x50], rdx
movzx edx, byte [rbx + 0x6e]
mov byte [rbx + 0x6e], 0
mov rcx, qword [rax + r12]
mov rdi, qword [rax + r12 + 8]
mov qword [rsp + 0x38], rcx
mov byte [rsp + 0x20], dl
mov rax, qword [rdi + 8]
mov rcx, qword [rax]
cmp byte [rcx + 0x10], 0
jne 0x14012247b
cmp byte [rcx + 0x14], 0
mov dword [rsp + 0x24], 0
je 0x140122480
mov dword [rsp + 0x24], r15d
mov eax, dword [rbx + 0x28]
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rdx, r14
mov dword [rsp + 0x28], eax
mov rcx, rbx
call fcn.140122ac0
mov dword [rbx + 0x4c], ebp
mov esi, eax
test eax, eax
jne 0x1401228d2
movsxd rax, dword [rsp + 0x28]
shl rax, 5
add rax, qword [rbx + 0x20]
mov qword [rsp + 0x30], rax
mov rbp, qword [rax + 8]
test r13, r13
je 0x1401225de
mov rax, qword [rbp + 8]
mov rcx, qword [rax]
mov rcx, qword [rcx + 0x48]
mov qword [rsp + 0x58], 0
mov rax, qword [rcx]
test rax, rax
je 0x1401225c7
mov rax, qword [rax + 0x30]
lea rdx, [rsp + 0x58]
call qword [case.0x1400faf48.0]
test eax, eax
jne 0x140122504
cmp qword [rsp + 0x58], 0
jle 0x1401225c7
mov edx, 0x1b
mov rcx, rbx
mov esi, r15d
call fcn.1401ccf60
mov rbp, rax
test rax, rax
je 0x140122548
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [rax], xmm0
movsd xmm1, qword [0x140212b70]
movsd qword [rax + 0x10], xmm1
movzx ecx, word [0x140212b78]
mov word [rax + 0x18], cx
movzx ecx, byte [0x140212b7a]
mov byte [rax + 0x1a], cl
mov rcx, qword [r14]
test rcx, rcx
je 0x1401225bf
cmp rcx, qword [rbx + 0x1f0]
jae 0x14012259d
cmp rcx, qword [rbx + 0x1e0]
jb 0x14012257b
mov rax, qword [rbx + 0x1d8]
mov qword [rcx], rax
mov qword [rbx + 0x1d8], rcx
mov qword [r14], rbp
jmp 0x1401228d2
cmp rcx, qword [rbx + 0x1e8]
jb 0x14012259d
mov rax, qword [rbx + 0x1c8]
mov qword [rcx], rax
mov qword [rbx + 0x1c8], rcx
mov qword [r14], rbp
jmp 0x1401228d2
cmp qword [rbx + 0x308], 0
je 0x1401225ba
mov rdx, rcx
mov rcx, rbx
call fcn.1401cd4c0
mov qword [r14], rbp
jmp 0x1401228d2
call fcn.1401cd540
mov qword [r14], rbp
jmp 0x1401228d2
mov rax, qword [rbx + 0x20]
or dword [rbx + 0x2c], 8
movzx r15d, byte [rax + r12 + 0x10]
mov eax, dword [rbx + 0x30]
and eax, 0x38
or r15d, eax
mov rcx, rdi
call fcn.1401ab5a0
mov rcx, qword [rbx + 0x20]
mov dword [rsp + 0x58], eax
mov rdx, qword [rcx + r12 + 0x18]
mov rcx, rbp
mov edx, dword [rdx + 0x74]
call fcn.1401ab8f0
xor edx, edx
mov rcx, rdi
call fcn.1401ab820
mov edx, eax
mov rcx, rbp
call fcn.1401ab820
or r15d, 0x20
mov rcx, rbp
mov edx, r15d
call fcn.1401ab740
lea r8, str.BEGIN
mov rdx, r14
mov rcx, rbx
call fcn.140122ba0
mov esi, eax
test eax, eax
jne 0x1401228d2
xor edx, edx
mov eax, 2
test r13, r13
cmove edx, eax
cmp byte [rdi + 0x11], sil
jne 0x140122665
movzx eax, byte [rdi + 0x10]
test al, al
je 0x140122665
cmp al, 1
jne 0x1401227e0
test r13, r13
jne 0x14012267a
xor r8d, r8d
mov rcx, rdi
call fcn.1401aab20
mov esi, eax
test esi, esi
jne 0x1401228d2
mov rcx, qword [rdi + 8]
mov rax, qword [rcx]
cmp byte [rax + 9], 5
jne 0x140122694
test r13, r13
jne 0x140122694
mov dword [rbx + 0x74], r13d
mov rcx, qword [rdi + 8]
mov edx, dword [rcx + 0x34]
xor r9d, r9d
mov esi, dword [rsp + 0x58]
mov rcx, rbp
mov r8d, esi
call fcn.1401ab640
test eax, eax
jne 0x1401228cd
cmp dword [rsp + 0x24], eax
jne 0x1401226d0
mov edx, dword [rbx + 0x74]
xor r9d, r9d
mov r8d, esi
mov rcx, rbp
call fcn.1401ab640
test eax, eax
jne 0x1401228cd
cmp byte [rbx + 0x67], 0
jne 0x1401228cd
movsx eax, byte [rbx + 0x6a]
test al, al
jns 0x1401226ea
mov rcx, rdi
call fcn.1401ab390
mov edx, eax
mov rcx, rbp
call fcn.1401ab400
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 r15, qword [rsp + 0x38]
mov rdx, r14
mov r9, r15
mov byte [rbx + 0xc4], al
mov rcx, rbx
call fcn.140122ac0
mov esi, eax
test eax, eax
jne 0x1401228d2
mov r9, r15
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, r14
mov rcx, rbx
call fcn.140122ac0
mov esi, eax
test eax, eax
jne 0x1401228d2
mov r9, r15
mov byte [rbx + 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, rbx
call fcn.140122ac0
and dword [rbx + 0x2c], 0xfffffffb
mov esi, eax
test eax, eax
jne 0x1401228d2
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, rbx
call fcn.140122ac0
mov esi, eax
test eax, eax
jne 0x1401228d2
xor r14d, r14d
lea r12, [0x140000000]
nop dword [rax]
nop word [rax + rax]
movzx r8d, byte [rdi + 0x11]
movzx esi, byte [r14 + r12 + 0x20c1b8]
mov r15, qword [rdi + 8]
test r8b, r8b
je 0x1401227cd
inc dword [rdi + 0x14]
cmp byte [rdi + 0x12], 0
jne 0x1401227cd
mov rcx, rdi
call fcn.1401aef40
movzx r8d, byte [rdi + 0x11]
cmp esi, 0xf
jne 0x140122818
mov rax, qword [r15]
mov esi, dword [rax + 0x84]
add esi, dword [rdi + 0x1c]
jmp 0x14012282c
test r13, r13
jne 0x14012267a
mov rax, qword [rdi]
mov edx, dword [rax + 0x2f0]
mov rax, qword [rdi + 8]
mov rcx, qword [rax]
cmp edx, dword [rcx + 0x80]
jle 0x140122811
cmp byte [rcx + 0xa], r13b
je 0x140122811
call fcn.1401b4a10
jmp 0x140122670
xor esi, esi
jmp 0x140122672
mov rax, qword [r15 + 0x18]
lea edx, [rsi*4 + 0x24]
mov rcx, qword [rax + 0x50]
mov esi, dword [rdx + rcx]
bswap esi
test r8b, r8b
je 0x14012283f
sub dword [rdi + 0x14], 1
jne 0x14012283f
mov rcx, rdi
call fcn.1401af050
movzx r8d, byte [r14 + r12 + 0x20c1b9]
mov rcx, rbp
movzx edx, byte [r14 + r12 + 0x20c1b8]
add r8d, esi
call fcn.1401a07e0
mov esi, eax
test eax, eax
jne 0x1401228d2
add r14, 2
cmp r14, 0xa
jl 0x1401227a0
test r13, r13
jne 0x140122886
mov rdx, rbp
mov rcx, rdi
call fcn.14019d8e0
mov esi, eax
test eax, eax
jne 0x1401228d2
mov rcx, rbp
call fcn.1401a95b0
mov esi, eax
test eax, eax
jne 0x1401228d2
test r13, r13
jne 0x1401228d2
mov rcx, rbp
call fcn.1401ab390
mov edx, eax
mov rcx, rdi
call fcn.1401ab400
mov rcx, rbp
call fcn.1401ab5a0
mov rcx, qword [rbp + 8]
lea r9d, [rsi + 1]
mov r8d, eax
mov edx, dword [rcx + 0x34]
mov rcx, rdi
call fcn.1401ab640
mov esi, eax
jmp 0x1401228d2
mov esi, 7
mov eax, dword [rsp + 0x2c]
mov r9d, 1
mov dword [rbx + 0x2c], eax
xor r8d, r8d
mov rax, qword [rsp + 0x40]
mov rcx, rdi
mov qword [rbx + 0x30], rax
mov rax, qword [rsp + 0x48]
lea edx, [r9 - 2]
mov qword [rbx + 0x78], rax
mov rax, qword [rsp + 0x50]
mov qword [rbx + 0x80], rax
movzx eax, byte [rsp + 0x20]
mov byte [rbx + 0x6e], al
mov byte [rbx + 0xc4], 0
call fcn.1401ab640
mov rdi, qword [rsp + 0x30]
mov r12, qword [rsp + 0x78]
mov byte [rbx + 0x65], 1
test rdi, rdi
je 0x140122947
mov rcx, qword [rdi + 8]
call fcn.1401ab9a0
mov qword [rdi + 8], 0
mov qword [rdi + 0x18], 0
mov rcx, rbx
call fcn.1401659d0
mov eax, esi
mov rsi, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400b1c90
add rsp, 0x90
pop r15
pop r14
pop r13
pop rdi
pop rbx
ret