Function at 0x1400216b0
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x88
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x38], 0
mov rdx, qword [rsp + 0xa0]
lea rcx, str.SELECT_name__sql_FROM_sqlite_schema_WHERE__s
call sym.sqlite3.exe_sqlite3_mprintf
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x48]
call fcn.1400014e0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 0xffffffff
mov rdx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax]
call sym.sqlite3.exe_sqlite3_prepare_v2
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x14002179d
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax]
call sym.sqlite3.exe_sqlite3_errmsg
mov qword [rsp + 0x68], rax
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx]
call sym.sqlite3.exe_sqlite3_extended_errcode
mov dword [rsp + 0x60], eax
mov ecx, 2
call fcn.140158204
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x68]
mov r9, rcx
mov ecx, dword [rsp + 0x60]
mov r8d, ecx
lea rdx, [0x14019f6b8]
mov rcx, rax
call fcn.1400013e0
jmp 0x140021a83
mov rcx, qword [rsp + 0x40]
call sym.sqlite3.exe_sqlite3_step
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0x64
jne 0x1400218a8
xor edx, edx
mov rcx, qword [rsp + 0x40]
call sym.sqlite3.exe_sqlite3_column_text
mov qword [rsp + 0x58], rax
mov edx, 1
mov rcx, qword [rsp + 0x40]
call sym.sqlite3.exe_sqlite3_column_text
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x58], 0
je 0x1400217eb
cmp qword [rsp + 0x50], 0
jne 0x1400217ed
jmp 0x14002179d
mov rdx, qword [rsp + 0x58]
lea rcx, [0x14019f494]
call fcn.1400311e0
mov ecx, 1
call fcn.140158204
mov rcx, rax
call fcn.140158660
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x98]
call sym.sqlite3.exe_sqlite3_exec
cmp qword [rsp + 0x38], 0
je 0x140021870
mov ecx, 2
call fcn.140158204
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x38]
lea rdx, [0x14019f6d0]
mov rcx, rax
call fcn.1400013e0
mov rcx, qword [rsp + 0x38]
call sym.sqlite3.exe_sqlite3_free
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0xa8], 0
je 0x140021897
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
call qword [rsp + 0xa8]
lea rcx, [0x14019f524]
call fcn.1400311e0
jmp 0x14002179d
cmp dword [rsp + 0x30], 0x65
je 0x140021a83
mov rcx, qword [rsp + 0x40]
call sym.sqlite3.exe_sqlite3_finalize
mov rcx, qword [rsp + 0x48]
call sym.sqlite3.exe_sqlite3_free
mov rdx, qword [rsp + 0xa0]
lea rcx, str.SELECT_name__sql_FROM_sqlite_schema_WHERE__s_ORDER_BY_rowid_DESC
call sym.sqlite3.exe_sqlite3_mprintf
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x48]
call fcn.1400014e0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 0xffffffff
mov rdx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax]
call sym.sqlite3.exe_sqlite3_prepare_v2
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x14002197e
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax]
call sym.sqlite3.exe_sqlite3_errmsg
mov qword [rsp + 0x70], rax
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx]
call sym.sqlite3.exe_sqlite3_extended_errcode
mov dword [rsp + 0x64], eax
mov ecx, 2
call fcn.140158204
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x70]
mov r9, rcx
mov ecx, dword [rsp + 0x64]
mov r8d, ecx
lea rdx, str.Error:___d___s_on___s__n
mov rcx, rax
call fcn.1400013e0
jmp 0x140021a83
mov rcx, qword [rsp + 0x40]
call sym.sqlite3.exe_sqlite3_step
cmp eax, 0x64
jne 0x140021a83
xor edx, edx
mov rcx, qword [rsp + 0x40]
call sym.sqlite3.exe_sqlite3_column_text
mov qword [rsp + 0x58], rax
mov edx, 1
mov rcx, qword [rsp + 0x40]
call sym.sqlite3.exe_sqlite3_column_text
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x58], 0
je 0x1400219c6
cmp qword [rsp + 0x50], 0
jne 0x1400219c8
jmp 0x14002197e
mov rdx, qword [rsp + 0x58]
lea rcx, str._s...
call fcn.1400311e0
mov ecx, 1
call fcn.140158204
mov rcx, rax
call fcn.140158660
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x98]
call sym.sqlite3.exe_sqlite3_exec
cmp qword [rsp + 0x38], 0
je 0x140021a4b
mov ecx, 2
call fcn.140158204
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x38]
lea rdx, str.Error:__s_nSQL:___s__n
mov rcx, rax
call fcn.1400013e0
mov rcx, qword [rsp + 0x38]
call sym.sqlite3.exe_sqlite3_free
mov qword [rsp + 0x38], 0
cmp qword [rsp + 0xa8], 0
je 0x140021a72
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
call qword [rsp + 0xa8]
lea rcx, str.done_n
call fcn.1400311e0
jmp 0x14002197e
mov rcx, qword [rsp + 0x40]
call sym.sqlite3.exe_sqlite3_finalize
mov rcx, qword [rsp + 0x48]
call sym.sqlite3.exe_sqlite3_free
add rsp, 0x88
ret