Function at 0x1401177f0
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rbp, qword [rcx]
mov r13, qword [rsp + 0xa0]
mov rbx, rcx
mov edi, edx
call sym.statResetCsr
mov rcx, qword [rbx + 8]
mov esi, edi
call sym.sqlite3_finalize
mov qword [rbx + 8], 0
and esi, 1
jne 0x140117950
mov eax, dword [rbp + 0x20]
mov dword [rbx + 0x14], eax
xor r12d, r12d
test dil, 2
jne 0x1401179f8
xor eax, eax
test dil, 4
jne 0x1401179b0
mov byte [rbx + 0x11], al
mov rcx, qword [rbp + 0x18]
call sym.sqlite3_str_new
mov rdx, qword [rbp + 0x18]
mov rsi, rax
movsxd rax, dword [rbx + 0x14]
mov rcx, rsi
shl rax, 5
add rax, qword [rdx + 0x20]
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 r8, qword [rax]
call sym.sqlite3_str_appendf
test r12, r12
je 0x140117896
mov r8, r12
lea rdx, str.WHERE_name_Q
mov rcx, rsi
call sym.sqlite3_str_appendf
and edi, 8
jne 0x140117a48
lea rax, [0x14014ebc0]
cmp rsi, rax
je 0x140117948
test rsi, rsi
je 0x140117948
mov rax, qword [rsi + 8]
test rax, rax
je 0x140117940
mov edx, dword [rsi + 0x18]
mov byte [rax + rdx], 0
mov eax, dword [rsi + 0x14]
test eax, eax
je 0x1401178d9
test byte [rsi + 0x1d], 4
je 0x140117b18
mov rdi, qword [rsi + 8]
mov rcx, rsi
call sym.sqlite3_free
test rdi, rdi
je 0x140117948
lea rax, [rbx + 8]
mov rcx, qword [rbp + 0x18]
mov r9d, pe_nt_image_headers64
mov rdx, rdi
mov qword [rsp + 0x30], 0
mov r8d, 0xffffffff
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
call sym.sqlite3LockAndPrepare
mov rcx, rdi
mov esi, eax
call sym.sqlite3_free
test esi, esi
je 0x140117a60
mov eax, esi
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, rsi
call sym.sqlite3_free
mov esi, 7
jmp 0x14011792f
mov rax, qword [r13]
test rax, rax
je 0x140117985
movzx edx, word [rax + 0x14]
mov ecx, edx
and cx, 0x202
cmp cx, 0x202
je 0x140117a80
and edx, 1
jne 0x140117ad0
mov edx, 1
mov rcx, rax
call sym.valueToText
mov rcx, qword [rbp + 0x18]
mov rdx, rax
call sym.sqlite3FindDbName
test eax, eax
jns 0x140117832
mov dword [rbx + 0x14], 0
xor esi, esi
mov byte [rbx + 0x10], 1
jmp 0x14011792f
movsxd rsi, esi
mov rcx, qword [r13 + rsi*8]
movzx edx, word [rcx + 0x14]
test dl, 8
jne 0x140117a98
test dl, 0x24
jne 0x140117af0
and edx, 0x12
je 0x14011784e
mov rax, qword [rcx + 8]
mov edx, dword [rcx + 0x10]
movzx r8d, byte [rcx + 0x16]
mov rcx, rax
call sym.memRealValue.isra.0
movapd xmm1, xmm0
jmp 0x140117af9
lea r14d, [rsi + 1]
movsxd rsi, esi
mov r12, qword [r13 + rsi*8]
test r12, r12
je 0x140117b30
movzx eax, word [r12 + 0x14]
mov edx, eax
and dx, 0x202
cmp dx, 0x202
je 0x140117ab0
test al, 1
jne 0x140117ae0
mov rcx, r12
mov edx, 1
mov esi, r14d
call sym.valueToText
mov r12, rax
jmp 0x140117842
lea rdx, str._ORDER_BY_name
mov rcx, rsi
call sym.sqlite3_str_appendf
jmp 0x14011789f
mov dword [rbx + 0x818], 0xffffffff
mov rcx, rbx
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp sym.statNext
cmp byte [rax + 0x16], 1
jne 0x14011796f
mov rax, qword [rax + 8]
jmp 0x140117985
pxor xmm0, xmm0
ucomisd xmm0, qword [rcx]
mov edx, 1
setp al
cmovne eax, edx
jmp 0x14011784e
cmp byte [r12 + 0x16], 1
jne 0x140117a25
mov r12, qword [r12 + 8]
mov esi, r14d
jmp 0x140117842
xor eax, eax
jmp 0x140117985
mov esi, r14d
xor r12d, r12d
jmp 0x140117842
pxor xmm1, xmm1
cvtsi2sd xmm1, qword [rcx]
pxor xmm0, xmm0
mov edx, 1
ucomisd xmm1, xmm0
setp al
cmovne eax, edx
jmp 0x14011784e
mov rcx, rsi
call sym.strAccumFinishRealloc
mov rdi, rax
jmp 0x1401178dd
mov esi, r14d
jmp 0x140117842