Function at 0x1401a89d0
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
movsxd rbp, edx
mov r13, rcx
mov rdi, r8
mov r14, r9
mov rbx, qword [rcx + rbp*8 + 0x28]
mov rsi, rbp
test rbx, rbx
je 0x1401a8b80
mov qword [r8], rbx
xor r12d, r12d
mov rsi, qword [rbx]
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x1401a8a18
call qword [0x1402ba740]
cmp qword [rbx + 0xb8], 0
jg 0x1401a8b20
cmp byte [rbx + 0xc7], 2
mov rdi, qword [rbx]
je 0x1401a8b3b
mov edx, dword [rbx + 0x30]
test edx, edx
js 0x1401a8b4e
cmp qword [rdi + 0x190], 0
je 0x1401a8c70
mov rcx, rbx
call sym.sqlite3VdbeTransferError
mov rcx, qword [rbx + 0xa8]
test rcx, rcx
je 0x1401a8aa4
cmp qword [rdi + 0x1f0], rcx
jbe 0x1401a8a86
cmp qword [rdi + 0x1e0], rcx
jbe 0x1401a8c90
cmp qword [rdi + 0x1e8], rcx
jbe 0x1401a8ec0
cmp qword [rdi + 0x308], 0
jne 0x1401a8c60
call sym.sqlite3_free
mov qword [rbx + 0xa8], 0
mov edx, dword [rbx + 0x34]
mov eax, 0xffffff02
and edx, dword [rdi + 0x58]
mov qword [rbx + 0xa0], 0
mov word [rbx + 0xc4], ax
movabs rax, 0xffffffff00000001
mov byte [rbx + 0xc7], 1
mov qword [rbx + 0x2c], rax
mov qword [rbx + 0x34], 0
mov qword [rbx + 0x3c], 0
mov qword [rbx + 0x50], 0
cmp byte [rsi + 0x67], 0
jne 0x1401a8b70
test edx, edx
jne 0x1401a8b70
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x1401a8b07
call qword [0x1402ba750]
mov eax, r12d
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rdx, rbx
mov rcx, rsi
call sym.invokeProfileCallback
cmp byte [rbx + 0xc7], 2
mov rdi, qword [rbx]
jne 0x1401a8a36
mov rcx, rbx
call sym.sqlite3VdbeHalt
mov edx, dword [rbx + 0x30]
test edx, edx
jns 0x1401a8a41
mov rcx, qword [rbx + 0xa8]
test rcx, rcx
je 0x1401a8aa4
test rdi, rdi
jne 0x1401a8a63
jmp 0x1401a8a94
mov rcx, rsi
call sym.apiHandleError
jmp 0x1401a8af8
lea rax, str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_DESC
lea rdx, str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_ASC
mov rbx, qword [rcx]
movq xmm0, rdx
movq xmm1, rax
lea rdx, str.SELECT__s_FROM__s_T_WHERE_T._Q_
punpcklqdq xmm0, xmm1
lea rax, str.INSERT_INTO__Q._q_content_VALUES__s_
movq xmm2, rax
movups xmmword [rsp + 0x50], xmm0
movq xmm0, rdx
lea rax, str.DELETE_FROM__Q._q_content_WHERE_id_
punpcklqdq xmm0, xmm2
lea rdx, str.REPLACE_INTO__Q._q_content_VALUES__s_
movq xmm3, rax
movups xmmword [rsp + 0x60], xmm0
movq xmm0, rdx
lea rax, str.DELETE_FROM__Q._q_docsize_WHERE_id_
lea rdx, str.REPLACE_INTO__Q._q_docsize_VALUES_____s_
punpcklqdq xmm0, xmm3
movq xmm4, rax
lea rax, str.REPLACE_INTO__Q._q_config_VALUES_____
movups xmmword [rsp + 0x70], xmm0
movq xmm0, rdx
movq xmm5, rax
lea rdx, str.SELECT_sz_s_FROM__Q._q_docsize_WHERE_id_
punpcklqdq xmm0, xmm4
lea rax, str.SELECT__s_FROM__s_AS_T
movups xmmword [rsp + 0x80], xmm0
movq xmm0, rdx
punpcklqdq xmm0, xmm5
mov qword [rsp + 0xa0], rax
movups xmmword [rsp + 0x90], xmm0
cmp ebp, 0xa
ja case.0x1401a8c56.5
lea rdx, [0x140338100]
mov eax, ebp
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov rdx, rcx
mov rcx, rdi
call sym.measureAllocationSize
jmp 0x1401a8a99
cmp qword [rbx + 0xa8], 0
jne 0x1401a8a4f
mov edx, dword [rbx + 0x34]
mov dword [rdi + 0x50], edx
jmp 0x1401a8aa7
mov rax, qword [rdi + 0x1d8]
mov qword [rcx], rax
mov qword [rdi + 0x1d8], rcx
jmp 0x1401a8a99
mov r12d, dword [rbx + 0x18]
call sym.sqlite3_initialize
mov r15d, eax
test eax, eax
jne 0x1401a8f1d
lea edx, [r12 + 1]
lea r8d, [rdx + rdx]
mov dword [rsp + 0x40], edx
lea ecx, [r8 + 1]
mov dword [rsp + 0x4c], r8d
movsxd rcx, ecx
call sym.sqlite3Malloc
mov r9, rax
test rax, rax
je 0x1401a8f1d
mov edx, dword [rsp + 0x40]
test edx, edx
jle 0x1401a8fb4
cmp r12d, 6
movsxd r8, dword [rsp + 0x4c]
jbe 0x1401a8fc0
mov ecx, edx
movdqu xmm0, xmmword [str.________________________]
shr ecx, 3
shl rcx, 4
add rcx, rax
nop dword [rax]
movups xmmword [rax], xmm0
add rax, 0x10
cmp rcx, rax
jne 0x1401a8d20
mov eax, edx
and eax, 0xfffffff8
mov r15d, eax
cmp eax, edx
je 0x1401a8d9b
mov ecx, r12d
sub edx, eax
sub ecx, eax
cmp ecx, 2
jbe 0x1401a8d5b
mov rcx, qword [0x14033db90]
mov qword [r9 + rax*2], rcx
mov eax, edx
and eax, 0xfffffffc
add r15d, eax
cmp eax, edx
je 0x1401a8d9b
lea eax, [r15 + r15]
lea edx, [r15 + 1]
cdqe
mov byte [r9 + rax], 0x3f
mov byte [r9 + rax + 1], 0x2c
cmp r12d, r15d
jle 0x1401a8d9b
lea eax, [rdx + rdx]
movsxd rcx, eax
mov byte [r9 + rcx], 0x3f
mov byte [r9 + rcx + 1], 0x2c
cmp r12d, edx
jle 0x1401a8d9b
add eax, 2
cdqe
mov byte [r9 + rax], 0x3f
mov byte [r9 + rax + 1], 0x2c
sub r8, 1
mov byte [r9 + r8], 0
mov rcx, qword [rsp + rbp*8 + 0x50]
mov rdx, qword [rbx + 8]
mov r8, qword [rbx + 0x10]
mov qword [rsp + 0x40], r9
call sym.sqlite3_mprintf
mov r9, qword [rsp + 0x40]
mov r15, rax
mov rcx, r9
call sym.sqlite3_free
jmp 0x1401a8df3
mov r9, qword [rbx + 0x50]
mov r8, qword [rbx + 0x48]
mov rdx, qword [rbx + 0x60]
mov rcx, qword [rsp + rbp*8 + 0x50]
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x20], r9
call sym.sqlite3_mprintf
mov r15, rax
test r15, r15
je 0x1401a8f1d
xor r9d, r9d
cmp esi, 3
setge r9b
lea r9d, [r9*4 + 0x81]
mov rax, qword [r13]
add esi, 5
mov r8d, 0xffffffff
mov rdx, r15
movsxd rsi, esi
add dword [rax + 0x78], 1
lea rax, [r13 + rsi*8]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0
mov rcx, qword [rbx]
call sym.sqlite3LockAndPrepare
mov rcx, r15
mov r12d, eax
mov rax, qword [r13]
sub dword [rax + 0x78], 1
call sym.sqlite3_free
test r12d, r12d
je 0x1401a8e80
test r14, r14
je 0x1401a8e80
mov rcx, qword [rbx]
call sym.sqlite3_errmsg
lea rcx, [0x1403321d6]
mov rdx, rax
call sym.sqlite3_mprintf
mov qword [r14], rax
mov rbx, qword [r13 + rbp*8 + 0x28]
mov qword [rdi], rbx
test rbx, rbx
je 0x1401a8b07
jmp 0x1401a8a06
mov rdx, qword [rbx + 8]
mov rcx, qword [rsp + rbp*8 + 0x50]
mov r8, qword [rbx + 0x10]
call sym.sqlite3_mprintf
mov r15, rax
jmp 0x1401a8df3
mov rax, qword [rdi + 0x1c8]
mov qword [rcx], rax
mov qword [rdi + 0x1c8], rcx
jmp 0x1401a8a99
mov ecx, dword [rbx + 0x44]
lea rax, [0x140330c0e]
lea rdx, str._origin
mov r9, qword [rbx + 0x10]
mov r8, qword [rbx + 8]
test ecx, ecx
lea rcx, str.SELECT_sz_s_FROM__Q._q_docsize_WHERE_id_
cmove rdx, rax
call sym.sqlite3_mprintf
mov r15, rax
mov r9d, 0x85
test r15, r15
jne 0x1401a8e0e
mov r12d, 7
jmp 0x1401a8e80
mov r9, qword [rbx + 0x50]
mov rdx, qword [rbx + 0x60]
lea rcx, str.SELECT__s_FROM__s_T_WHERE_T._Q_
mov r8, qword [rbx + 0x48]
call sym.sqlite3_mprintf
mov r9d, 0x81
mov r15, rax
test rax, rax
jne 0x1401a8e0e
jmp 0x1401a8f1d
mov r8d, dword [rbx + 0x44]
lea rax, [0x140330c0e]
mov rdx, qword [rbx + 8]
lea r9, [0x140337f25]
lea rcx, str.REPLACE_INTO__Q._q_docsize_VALUES_____s_
test r8d, r8d
mov r8, qword [rbx + 0x10]
cmove r9, rax
call sym.sqlite3_mprintf
mov r15, rax
jmp 0x1401a8f0e
mov rdx, qword [rbx + 0x60]
mov r8, qword [rbx + 0x48]
lea rcx, str.SELECT__s_FROM__s_AS_T
call sym.sqlite3_mprintf
mov r15, rax
jmp 0x1401a8f0e
mov r8, 0xffffffffffffffff
jmp 0x1401a8d9f
xor eax, eax
jmp 0x1401a8d38