Function at 0x1401af6ce
Capabilities:
Reference sql statements

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov qword [rbp + 0x20], r8
mov dword [rbp + 0x28], r9d
mov rax, qword [rbp + 0x10]
mov qword [rbp - 0x18], rax
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov qword [rbp - 0x20], rax
mov dword [rbp - 4], 0
mov dword [rbp - 8], 0
mov qword [rbp - 0x10], 0
mov rax, qword [rbp - 0x18]
mov rcx, rax
call sym.statResetCsr
mov rax, qword [rbp - 0x18]
mov rax, qword [rax + 8]
mov rcx, rax
call sym.sqlite3_finalize
mov rax, qword [rbp - 0x18]
mov qword [rax + 8], 0
mov eax, dword [rbp + 0x18]
and eax, 1
test eax, eax
je 0x1401af7ac
mov eax, dword [rbp - 4]
lea edx, [rax + 1]
mov dword [rbp - 4], edx
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x30]
add rax, rdx
mov rax, qword [rax]
mov rcx, rax
call sym.sqlite3_value_text
mov qword [rbp - 0x28], rax
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 0x18]
mov rdx, qword [rbp - 0x28]
mov rcx, rax
call sym.sqlite3FindDbName
mov rdx, qword [rbp - 0x18]
mov dword [rdx + 0x14], eax
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x14]
test eax, eax
jns 0x1401af7ba
mov rax, qword [rbp - 0x18]
mov dword [rax + 0x14], 0
mov rax, qword [rbp - 0x18]
mov byte [rax + 0x10], 1
mov eax, 0
jmp 0x1401af963
mov rax, qword [rbp - 0x20]
mov edx, dword [rax + 0x20]
mov rax, qword [rbp - 0x18]
mov dword [rax + 0x14], edx
mov eax, dword [rbp + 0x18]
and eax, 2
test eax, eax
je 0x1401af7ed
mov eax, dword [rbp - 4]
lea edx, [rax + 1]
mov dword [rbp - 4], edx
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x30]
add rax, rdx
mov rax, qword [rax]
mov rcx, rax
call sym.sqlite3_value_text
mov qword [rbp - 0x10], rax
mov eax, dword [rbp + 0x18]
and eax, 4
test eax, eax
je 0x1401af853
mov eax, dword [rbp - 4]
lea edx, [rax + 1]
mov dword [rbp - 4], edx
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x30]
add rax, rdx
mov rax, qword [rax]
mov rcx, rax
call sym.sqlite3_value_double
movq rax, xmm0
pxor xmm0, xmm0
movq xmm1, rax
ucomisd xmm1, xmm0
setp dl
mov ecx, 1
pxor xmm0, xmm0
movq xmm2, rax
ucomisd xmm2, xmm0
mov eax, ecx
cmove eax, edx
mov edx, eax
mov rax, qword [rbp - 0x18]
mov byte [rax + 0x11], dl
jmp 0x1401af85b
mov rax, qword [rbp - 0x18]
mov byte [rax + 0x11], 0
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 0x18]
mov rcx, rax
call sym.sqlite3_str_new
mov qword [rbp - 0x30], rax
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 0x18]
mov rdx, qword [rax + 0x20]
mov rax, qword [rbp - 0x18]
mov eax, dword [rax + 0x14]
cdqe
shl rax, 5
add rax, rdx
mov rdx, qword [rax]
mov rax, qword [rbp - 0x30]
mov r8, rdx
lea rdx, str.SELECT__FROM__SELECT_sqlite_schema_AS_name_1_AS_rootpage_table_AS_type_UNION_ALL_SELECT_name_rootpage_type_FROM___w_.sqlite_schema_WHERE_rootpage_0_
mov rcx, rax
call sym.sqlite3_str_appendf
cmp qword [rbp - 0x10], 0
je 0x1401af8c5
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x30]
mov r8, rdx
lea rdx, str.WHERE_name_Q
mov rcx, rax
call sym.sqlite3_str_appendf
mov eax, dword [rbp + 0x18]
and eax, 8
test eax, eax
je 0x1401af8e2
mov rax, qword [rbp - 0x30]
lea rdx, str._ORDER_BY_name
mov rcx, rax
call sym.sqlite3_str_appendf
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.sqlite3_str_finish
mov qword [rbp - 0x38], rax
cmp qword [rbp - 0x38], 0
jne 0x1401af900
mov eax, 7
jmp 0x1401af963
mov rax, qword [rbp - 0x18]
lea rcx, [rax + 8]
mov rax, qword [rbp - 0x20]
mov rax, qword [rax + 0x18]
mov rdx, qword [rbp - 0x38]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov r8d, 0xffffffff
mov rcx, rax
call sym.sqlite3_prepare_v2
mov dword [rbp - 8], eax
mov rax, qword [rbp - 0x38]
mov rcx, rax
call sym.sqlite3_free
cmp dword [rbp - 8], 0
jne 0x1401af960
mov rax, qword [rbp - 0x18]
mov dword [rax + 0x818], 0xffffffff
mov rax, qword [rbp + 0x10]
mov rcx, rax
call sym.statNext
mov dword [rbp - 8], eax
mov eax, dword [rbp - 8]
add rsp, 0x70
pop rbp
ret