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

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
mov rbp, qword [rcx]
mov rsi, qword [rsp + 0x90]
mov rbx, rcx
mov edi, edx
call sym.statResetCsr
mov rcx, qword [rbx + 8]
call sym.sqlite3_finalize
test dil, 1
mov qword [rbx + 8], 0
jne 0x140367410
mov eax, dword [rbp + 0x20]
mov r13d, 8
xor edx, edx
xor r12d, r12d
test dil, 2
mov dword [rbx + 0x14], eax
jne 0x140367490
xor eax, eax
test dil, 4
jne 0x1403674ab
mov byte [rbx + 0x11], al
mov r13, qword [rbp + 0x18]
call sym.sqlite3_initialize
test eax, eax
jne 0x140367330
mov ecx, dword [0x140395120]
test ecx, ecx
je 0x140367508
mov rcx, qword [0x140394dc0]
test rcx, rcx
je 0x1403672e3
call qword [0x1403951a0]
mov ecx, 0x20
call sym.sqlite3Malloc.part.0
mov rsi, rax
test rsi, rsi
je 0x140367330
test r13, r13
mov eax, 0x3b9aca00
je 0x140367306
mov eax, dword [r13 + 0x88]
pxor xmm0, xmm0
mov dword [rsi + 0x14], eax
xor edx, edx
movups xmmword [rsi], xmm0
lea r13, [0x140395300]
mov dword [rsi + 0x10], 0
mov dword [rsi + 0x18], 0
mov word [rsi + 0x1c], dx
jmp 0x14036733a
lea r13, [0x140395300]
mov rsi, r13
mov rdx, qword [rbp + 0x18]
mov rcx, rsi
movsxd rax, dword [rbx + 0x14]
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 0x140367373
lea rdx, str.WHERE_name_Q
mov r8, r12
mov rcx, rsi
call sym.sqlite3_str_appendf
and edi, 8
jne 0x1403674f0
cmp rsi, r13
je 0x140367478
mov rax, qword [rsi + 8]
test rax, rax
je 0x140367470
mov edx, dword [rsi + 0x18]
mov byte [rax + rdx], 0
mov eax, dword [rsi + 0x14]
test eax, eax
je 0x1403673aa
test byte [rsi + 0x1d], 4
je 0x1403675a8
mov rdi, qword [rsi + 8]
mov rcx, rsi
call sym.sqlite3_free
test rdi, rdi
je 0x140367478
mov rcx, qword [rbp + 0x18]
lea rax, [rbx + 8]
xor r9d, r9d
mov rdx, rdi
mov r8d, pe_nt_image_headers64
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], 0
call sym.sqlite3LockAndPrepare.constprop.0
mov rcx, rdi
mov esi, eax
call sym.sqlite3_free
test esi, esi
je 0x140367560
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rax, qword [rsi]
test rax, rax
je 0x140367441
movzx edx, word [rax + 0x14]
mov ecx, edx
not ecx
test cx, 0x202
je 0x140367520
and edx, 1
jne 0x140367550
mov edx, 1
mov rcx, rax
call sym.valueToText
mov rcx, qword [rbp + 0x18]
mov rdx, rax
mov r13d, 0x10
call sym.sqlite3FindDbName
mov edx, 8
test eax, eax
jns 0x140367297
mov dword [rbx + 0x14], 0
xor esi, esi
mov byte [rbx + 0x10], 1
jmp 0x1403673f8
mov rcx, rsi
call sym.sqlite3_free
mov esi, 7
mov eax, esi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rcx, qword [rsi + rdx]
call sym.sqlite3ValueText.constprop.0
mov rdx, r13
mov r12, rax
xor eax, eax
test dil, 4
je 0x1403672b3
mov rcx, qword [rsi + rdx]
movzx edx, word [rcx + 0x14]
test dl, 8
jne 0x140367538
test dl, 0x24
jne 0x140367580
and edx, 0x12
je 0x1403672b3
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 0x140367589
lea rdx, str._ORDER_BY_name
mov rcx, rsi
call sym.sqlite3_str_appendf
jmp 0x14036737c
mov ecx, 0x20
call qword [0x140395140]
mov rsi, rax
jmp 0x1403672f0
cmp byte [rax + 0x16], 1
jne 0x14036742b
mov rax, qword [rax + 8]
jmp 0x140367441
pxor xmm0, xmm0
ucomisd xmm0, qword [rcx]
mov edx, 1
setp al
cmovne eax, edx
jmp 0x1403672b3
xor eax, eax
jmp 0x140367441
mov dword [rbx + 0x818], 0xffffffff
mov rcx, rbx
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sym.statNext
pxor xmm1, xmm1
cvtsi2sd xmm1, qword [rcx]
pxor xmm0, xmm0
ucomisd xmm1, xmm0
mov edx, 1
setp al
cmovne eax, edx
jmp 0x1403672b3
mov rcx, rsi
call sym.strAccumFinishRealloc
mov rdi, rax
jmp 0x1403673ae