Function at 0x14028f540
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 rsi, qword [rcx]
mov rbp, qword [rsp + 0xa0]
mov r12, rcx
mov ebx, edx
call sym.statResetCsr
mov rcx, qword [r12 + 8]
call sym.sqlite3_finalize
mov qword [r12 + 8], 0
test bl, 1
jne 0x14028f718
mov eax, dword [rsi + 0x20]
mov r13d, 8
xor edi, edi
mov dword [r12 + 0x14], eax
xor eax, eax
test bl, 2
jne 0x14028f750
test bl, 4
jne 0x14028f769
mov byte [r12 + 0x11], 0
mov rbp, qword [rsi + 0x18]
call sym.sqlite3_initialize
test eax, eax
jne 0x14028f628
mov ecx, dword [0x1402ba6c0]
test ecx, ecx
je 0x14028f7c8
mov rcx, qword [0x1402ba340]
test rcx, rcx
je 0x14028f5d6
call qword [0x1402ba740]
mov ecx, 0x20
call sym.sqlite3Malloc.part.0
mov r13, rax
test r13, r13
je 0x14028f628
mov eax, 0x3b9aca00
test rbp, rbp
je 0x14028f5f8
mov eax, dword [rbp + 0x88]
pxor xmm0, xmm0
xor edx, edx
mov dword [r13 + 0x14], eax
lea rbp, [0x1402ba8a0]
mov dword [r13 + 0x10], 0
mov dword [r13 + 0x18], 0
mov word [r13 + 0x1c], dx
movups xmmword [r13], xmm0
jmp 0x14028f632
lea rbp, [0x1402ba8a0]
mov r13, rbp
mov rdx, qword [rsi + 0x18]
movsxd rax, dword [r12 + 0x14]
mov rcx, r13
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 rdi, rdi
je 0x14028f66c
mov r8, rdi
lea rdx, str.WHERE_name_Q
mov rcx, r13
call sym.sqlite3_str_appendf
and ebx, 8
jne 0x14028f7b0
cmp r13, rbp
je 0x14028f7a0
mov rax, qword [r13 + 8]
test rax, rax
je 0x14028f798
mov edx, dword [r13 + 0x18]
mov byte [rax + rdx], 0
mov eax, dword [r13 + 0x14]
test eax, eax
je 0x14028f6a6
test byte [r13 + 0x1d], 4
je 0x14028f868
mov r14, qword [r13 + 8]
mov rcx, r13
call sym.sqlite3_free
test r14, r14
je 0x14028f7a0
lea rax, [r12 + 8]
mov rcx, qword [rsi + 0x18]
mov r9d, pe_nt_image_headers64
mov rdx, r14
mov qword [rsp + 0x30], 0
mov r8d, 0xffffffff
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
call sym.sqlite3LockAndPrepare
mov rcx, r14
mov r13d, eax
call sym.sqlite3_free
test r13d, r13d
je 0x14028f7f8
mov eax, r13d
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, qword [rbp]
call sym.sqlite3ValueText.constprop.0
mov rcx, qword [rsi + 0x18]
mov rdx, rax
call sym.sqlite3FindDbName
test eax, eax
js 0x14028f820
mov dword [r12 + 0x14], eax
mov r13d, 0x10
mov eax, 8
xor edi, edi
test bl, 2
je 0x14028f59a
mov rcx, qword [rbp + rax]
call sym.sqlite3ValueText.constprop.0
mov rdi, rax
mov rax, r13
test bl, 4
je 0x14028f5a3
mov rcx, qword [rbp + rax]
movzx edx, word [rcx + 0x14]
test dl, 8
jne 0x14028f7e0
test dl, 0x24
jne 0x14028f840
xor eax, eax
and edx, 0x12
jne 0x14028f880
mov byte [r12 + 0x11], al
jmp 0x14028f5a9
mov rcx, r13
call sym.sqlite3_free
mov r13d, 7
jmp 0x14028f703
lea rdx, str._ORDER_BY_name
mov rcx, r13
call sym.sqlite3_str_appendf
jmp 0x14028f675
mov ecx, 0x20
call qword [0x1402ba6e0]
mov r13, rax
jmp 0x14028f5e3
pxor xmm0, xmm0
ucomisd xmm0, qword [rcx]
mov edx, 1
setp al
cmovne eax, edx
jmp 0x14028f78b
mov dword [r12 + 0x818], 0xffffffff
mov rcx, r12
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
jmp sym.statNext
mov dword [r12 + 0x14], 0
xor r13d, r13d
mov byte [r12 + 0x10], 1
jmp 0x14028f703
pxor xmm0, xmm0
mov edx, 1
cvtsi2sd xmm0, qword [rcx]
ucomisd xmm0, qword [0x14033d4d8]
setp al
cmovne eax, edx
jmp 0x14028f78b
mov rcx, r13
call sym.strAccumFinishRealloc
mov r14, rax
jmp 0x14028f6aa
mov r9, qword [rcx + 8]
mov edx, dword [rcx + 0x10]
movzx r8d, byte [rcx + 0x16]
mov rcx, r9
call sym.memRealValue.isra.0
ucomisd xmm0, qword [0x14033d4d8]
mov edx, 1
setp al
cmovne eax, edx
jmp 0x14028f78b