Function at 0x5d9a10
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
cmp byte [rdx + 0x65], 0
mov rdi, rcx
mov r12, rdx
movsxd rbx, r8d
mov rsi, r9
je 0x5d9dd0
cmp dword [rdx + 0xd8], 1
jg 0x5d9db0
mov ebp, dword [rdx + 0x4c]
test r9, r9
je 0x5d9df0
movzx eax, word [r9 + 0x14]
lea rdx, [0x007407c0]
and eax, 0x3f
cmp byte [rdx + rax], 3
je 0x5d9a98
lea r8, str.non_text_filename
mov rdx, r12
mov r13d, 1
call dbg.sqlite3SetString
mov eax, r13d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r9
mov edx, 1
call dbg.sqlite3ValueText
mov r9, rax
mov eax, dword [r12 + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [r12 + 0x4c], eax
mov eax, dword [r12 + 0x2c]
mov rdx, qword [r12 + 0x78]
shl rbx, 5
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rcx, qword [r12 + 0x30]
mov r14d, dword [r12 + 0x28]
mov dword [rsp + 0x40], eax
or eax, 6
mov dword [r12 + 0x2c], eax
mov rax, qword [r12 + 0x20]
mov qword [rsp + 0x30], rdx
mov rdx, qword [r12 + 0x80]
add rax, rbx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x38], rdx
movzx edx, byte [r12 + 0x6e]
mov byte [r12 + 0x6e], 0
mov r15, qword [rax + 8]
mov byte [rsp + 0x47], dl
movabs rdx, 0xfffffffeefffafff
and rdx, rcx
mov rcx, qword [rax]
mov rax, qword [r15 + 8]
mov dword [rsp + 0x58], r14d
or rdx, 0x201
mov rax, qword [rax]
mov qword [r12 + 0x30], rdx
mov rdx, rdi
mov qword [rsp + 0x50], rcx
mov rcx, r12
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x48], rax
call dbg.execSqlF
mov dword [r12 + 0x4c], ebp
mov r13d, eax
test eax, eax
jne 0x5d9fc0
movsxd rbp, r14d
mov rax, qword [r12 + 0x20]
shl rbp, 5
add rbp, rax
mov r14, qword [rbp + 8]
test rsi, rsi
je 0x5da040
mov rdx, qword [r14 + 8]
mov rdx, qword [rdx]
mov rcx, qword [rdx + 0x48]
mov qword [rsp + 0x70], 0
mov r9, qword [rcx]
test r9, r9
je 0x5d9bc4
lea r8, [rsp + 0x70]
mov rdx, r8
call qword [r9 + 0x30]
test eax, eax
jne 0x5da020
cmp qword [rsp + 0x70], 0
jg 0x5da020
mov rax, qword [r12 + 0x20]
or dword [r12 + 0x2c], 8
mov edx, dword [r12 + 0x30]
mov rcx, r15
movzx r13d, byte [rax + rbx + 0x10]
and edx, 0x38
or r13d, edx
call dbg.sqlite3BtreeGetRequestedReserve
mov rcx, r14
mov dword [rsp + 0x5c], eax
mov rax, qword [r12 + 0x20]
mov rax, qword [rax + rbx + 0x18]
mov edx, dword [rax + 0x74]
call sym.sqlite3BtreeSetCacheSize
xor edx, edx
mov rcx, r15
call sym.sqlite3BtreeSetSpillSize
mov rcx, r14
mov edx, eax
call sym.sqlite3BtreeSetSpillSize
mov edx, r13d
mov rcx, r14
or edx, 0x20
call sym.sqlite3BtreeSetPagerFlags
lea r8, str.BEGIN
mov rdx, rdi
mov rcx, r12
call dbg.execSql
mov r13d, eax
test eax, eax
jne 0x5d9f40
xor r8d, r8d
xor edx, edx
mov rcx, r15
call sym.sqlite3BtreeBeginTrans
mov r13d, eax
test eax, eax
jne 0x5d9f40
test rsi, rsi
mov rax, qword [r15 + 8]
sete sil
mov edx, dword [rax + 0x34]
mov r8d, dword [rsp + 0x5c]
xor r9d, r9d
mov rcx, r14
call dbg.sqlite3BtreeSetPageSize
test eax, eax
jne 0x5da100
movabs rax, 0xff000000ff
test qword [rsp + 0x48], rax
je 0x5da0e0
cmp byte [r12 + 0x67], 0
jne 0x5da100
movsx edx, byte [r12 + 0x6a]
test dl, dl
js 0x5da10b
mov rcx, r14
call sym.sqlite3BtreeSetAutoVacuum
movzx eax, byte [rsp + 0x58]
mov rdx, rdi
mov rcx, r12
mov rbx, qword [rsp + 0x50]
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov byte [r12 + 0xc4], al
mov r9, rbx
call dbg.execSqlF
mov r13d, eax
test eax, eax
jne 0x5d9f40
mov r9, rbx
lea r8, str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov rdx, rdi
mov rcx, r12
call dbg.execSqlF
mov r13d, eax
test eax, eax
jne 0x5d9f40
mov r9, rbx
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, r12
mov byte [r12 + 0xc4], 0
call dbg.execSqlF
and dword [r12 + 0x2c], 0xfffffffb
mov r13d, eax
test eax, eax
jne 0x5d9f40
mov r9, rbx
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, r12
call dbg.execSqlF
mov r13d, eax
test eax, eax
jne 0x5d9f40
lea rdi, [0x0073f158]
mov r13d, 1
lea rbx, [rsp + 0x6c]
mov edx, r13d
mov r8, rbx
mov rcx, r15
call sym.sqlite3BtreeGetMeta
movzx r8d, byte [rdi + 1]
mov edx, r13d
mov rcx, r14
add r8d, dword [rsp + 0x6c]
call sym.sqlite3BtreeUpdateMeta
mov r13d, eax
test eax, eax
jne 0x5d9f40
add rdi, 2
lea rax, [0x0073f162]
cmp rax, rdi
je 0x5da11a
movzx r13d, byte [rdi]
jmp 0x5d9d63
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
mov r13d, 1
call dbg.sqlite3SetString
jmp 0x5d9a7c
lea r8, str.cannot_VACUUM_from_within_a_transaction
mov r13d, 1
call dbg.sqlite3SetString
jmp 0x5d9a7c
lea r9, [0x00734c2e]
jmp 0x5d9ab8
cmp byte [r15 + 0x11], 0
je 0x5d9e0b
mov rcx, r15
call sym.sqlite3BtreeEnter.part.0
cmp byte [r14 + 0x11], 0
je 0x5d9e1a
mov rcx, r14
call sym.sqlite3BtreeEnter.part.0
mov rax, qword [r15 + 8]
lea r8, [rsp + 0x70]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov r9, qword [rcx]
test r9, r9
je 0x5d9e6a
mov rdx, qword [r14 + 8]
lea r8, [rsp + 0x70]
mov qword [rsp + 0x48], r8
movsxd rax, dword [rdx + 0x34]
mov edx, dword [rdx + 0x40]
imul rax, rdx
mov edx, 0xb
mov qword [rsp + 0x70], rax
call qword [r9 + 0x50]
mov r8, qword [rsp + 0x48]
cmp eax, 0xc
mov r13d, eax
je 0x5d9e6a
test eax, eax
jne 0x5d9ecc
mov rdi, r8
xor eax, eax
mov ecx, 0x12
mov edx, 0x7fffffff
rep stosd dword [rdi], eax
mov rcx, r8
mov qword [rsp + 0x48], r8
mov rax, qword [r14]
mov qword [rsp + 0x98], r14
mov qword [rsp + 0x78], r15
mov qword [rsp + 0x90], rax
mov dword [rsp + 0x88], 1
call dbg.sqlite3_backup_step
mov r8, qword [rsp + 0x48]
mov rcx, r8
call dbg.sqlite3_backup_finish
mov r13d, eax
test eax, eax
jne 0x5da133
mov rax, qword [r15 + 8]
and word [rax + 0x28], 0xfffd
cmp byte [r14 + 0x11], 0
je 0x5d9ede
sub dword [r14 + 0x14], 1
je 0x5da160
cmp byte [r15 + 0x11], 0
je 0x5d9ef0
sub dword [r15 + 0x14], 1
je 0x5da153
test r13d, r13d
jne 0x5d9f40
mov rcx, r14
call sym.sqlite3BtreeCommit
mov r13d, eax
test eax, eax
jne 0x5d9f40
mov rcx, r14
call sym.sqlite3BtreeGetAutoVacuum
mov rcx, r15
mov edx, eax
call sym.sqlite3BtreeSetAutoVacuum
mov rcx, r14
call dbg.sqlite3BtreeGetRequestedReserve
mov r9d, 1
mov rcx, r15
mov r8d, eax
mov rax, qword [r14 + 8]
mov edx, dword [rax + 0x34]
call dbg.sqlite3BtreeSetPageSize
mov r13d, eax
nop dword [rax]
mov eax, dword [rsp + 0x40]
mov r9d, 1
xor r8d, r8d
mov rcx, r15
mov byte [r12 + 0xc4], 0
mov edx, 0xffffffff
mov dword [r12 + 0x2c], eax
mov rax, qword [rsp + 0x28]
mov qword [r12 + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [r12 + 0x78], rax
mov rax, qword [rsp + 0x38]
mov qword [r12 + 0x80], rax
movzx eax, byte [rsp + 0x47]
mov byte [r12 + 0x6e], al
call dbg.sqlite3BtreeSetPageSize
mov byte [r12 + 0x65], 1
mov rcx, qword [rbp + 8]
call dbg.sqlite3BtreeClose
mov qword [rbp + 8], 0
mov qword [rbp + 0x18], 0
mov rcx, r12
call dbg.sqlite3ResetAllSchemasOfConnection
jmp 0x5d9a7c
mov eax, dword [rsp + 0x40]
mov r9d, 1
xor r8d, r8d
mov rcx, r15
mov byte [r12 + 0xc4], 0
mov edx, 0xffffffff
mov dword [r12 + 0x2c], eax
mov rax, qword [rsp + 0x28]
mov qword [r12 + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [r12 + 0x78], rax
mov rax, qword [rsp + 0x38]
mov qword [r12 + 0x80], rax
movzx eax, byte [rsp + 0x47]
mov byte [r12 + 0x6e], al
call dbg.sqlite3BtreeSetPageSize
mov byte [r12 + 0x65], 1
jmp 0x5d9fb2
lea r8, str.output_file_already_exists
mov rdx, r12
mov rcx, rdi
mov r13d, 1
call dbg.sqlite3SetString
jmp 0x5d9f40
mov rcx, r15
call dbg.sqlite3BtreeGetRequestedReserve
mov rcx, r14
mov dword [rsp + 0x5c], eax
mov rax, qword [r12 + 0x20]
mov rax, qword [rax + rbx + 0x18]
mov edx, dword [rax + 0x74]
call sym.sqlite3BtreeSetCacheSize
xor edx, edx
mov rcx, r15
call sym.sqlite3BtreeSetSpillSize
mov rcx, r14
mov edx, eax
call sym.sqlite3BtreeSetSpillSize
mov edx, 0x21
mov rcx, r14
call sym.sqlite3BtreeSetPagerFlags
lea r8, str.BEGIN
mov rdx, rdi
mov rcx, r12
call dbg.execSql
mov r13d, eax
test eax, eax
jne 0x5d9f40
xor r8d, r8d
mov edx, 2
mov rcx, r15
call sym.sqlite3BtreeBeginTrans
mov r13d, eax
test eax, eax
jne 0x5d9f40
mov rax, qword [r15 + 8]
mov esi, 1
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
jne 0x5d9c5e
mov dword [r12 + 0x74], 0
jmp 0x5d9c5e
mov edx, dword [r12 + 0x74]
mov r8d, dword [rsp + 0x5c]
xor r9d, r9d
mov rcx, r14
call dbg.sqlite3BtreeSetPageSize
test eax, eax
je 0x5d9c8e
nop dword [rax]
mov r13d, 7
jmp 0x5d9f40
mov rcx, r15
call sym.sqlite3BtreeGetAutoVacuum
mov edx, eax
jmp 0x5d9ca8
test sil, sil
jne 0x5d9dfc
mov rcx, r14
call sym.sqlite3BtreeCommit
mov r13d, eax
jmp 0x5d9f40
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 8]
mov rcx, qword [rax]
cmp byte [rcx + 0x10], 0
jne 0x5d9ecc
call dbg.pager_reset
jmp 0x5d9ecc
mov rcx, r15
call sym.sqlite3BtreeLeave.part.0
jmp 0x5d9ef0
mov rcx, r14
call sym.sqlite3BtreeLeave.part.0
jmp 0x5d9ede