Function at 0x140287cb0
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
movsxd r12, edx
mov r13, rcx
mov rdi, r8
mov rbx, qword [rcx + r12*8 + 0x28]
mov rsi, r12
mov r14, r9
test rbx, rbx
je 0x140287e60
mov qword [r8], rbx
xor ebp, ebp
mov rsi, qword [rbx]
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x140287cf7
call qword [0x1403951a0]
cmp qword [rbx + 0xb8], 0
jg 0x140287e00
cmp byte [rbx + 0xc5], 2
mov rdi, qword [rbx]
je 0x140287e1b
mov edx, dword [rbx + 0x30]
test edx, edx
js 0x140287e2e
cmp qword [rdi + 0x190], 0
je 0x140288180
mov rcx, rbx
call sym.sqlite3VdbeTransferError
mov rcx, qword [rbx + 0xa8]
test rcx, rcx
je 0x140287d83
cmp rcx, qword [rdi + 0x1f0]
jae 0x140287d65
cmp rcx, qword [rdi + 0x1e0]
jae 0x1402881e0
cmp rcx, qword [rdi + 0x1e8]
jae 0x140288200
cmp qword [rdi + 0x308], 0
jne 0x140287fe8
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 + 0xc2], ax
movabs rax, 0xffffffff00000001
mov byte [rbx + 0xc5], 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 0x140287e50
test edx, edx
jne 0x140287e50
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x140287de6
call qword [0x1403951b0]
mov eax, ebp
add rsp, 0xa8
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 + 0xc5], 2
mov rdi, qword [rbx]
jne 0x140287d15
mov rcx, rbx
call sym.sqlite3VdbeHalt
mov edx, dword [rbx + 0x30]
test edx, edx
jns 0x140287d20
mov rcx, qword [rbx + 0xa8]
test rcx, rcx
je 0x140287d83
test rdi, rdi
je 0x140287d73
jmp 0x140287d42
mov rcx, rsi
call sym.apiHandleError
jmp 0x140287dd7
lea rax, str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_DESC
cmp r12d, 4
mov r15, qword [r13]
lea rdx, str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_ASC
movq xmm1, rax
lea rcx, str.SELECT__s_FROM__s_T_WHERE_T._Q_
movq xmm0, rdx
lea rax, str.INSERT_INTO__Q._q_content_VALUES__s_
punpcklqdq xmm0, xmm1
movaps xmmword [rsp + 0x40], xmm0
movq xmm0, rcx
lea rdx, str.REPLACE_INTO__Q._q_content_VALUES__s_
movq xmm2, rax
lea rax, str.DELETE_FROM__Q._q_content_WHERE_id_
punpcklqdq xmm0, xmm2
movaps xmmword [rsp + 0x50], xmm0
movq xmm0, rdx
lea rdx, str.REPLACE_INTO__Q._q_docsize_VALUES_____
movq xmm3, rax
lea rax, str.DELETE_FROM__Q._q_docsize_WHERE_id_
punpcklqdq xmm0, xmm3
movaps xmmword [rsp + 0x60], xmm0
movq xmm0, rdx
lea rdx, str.SELECT_sz_FROM__Q._q_docsize_WHERE_id_
movq xmm4, rax
lea rax, str.REPLACE_INTO__Q._q_config_VALUES_____
punpcklqdq xmm0, xmm4
movaps xmmword [rsp + 0x70], xmm0
movq xmm0, rdx
movq xmm5, rax
lea rax, str.SELECT__s_FROM__s_AS_T
punpcklqdq xmm0, xmm5
movaps xmmword [rsp + 0x80], xmm0
mov qword [rsp + 0x90], rax
jg 0x140288148
cmp r12d, 2
jg 0x140288000
je 0x1402881a0
mov r9, qword [r15 + 0x50]
mov r8, qword [r15 + 0x48]
mov rdx, qword [r15 + 0x60]
mov rcx, qword [rsp + r12*8 + 0x40]
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x20], r9
call sym.sqlite3_mprintf
test rax, rax
mov rbx, rax
je 0x140288170
mov r8d, 0x81
mov rax, qword [r13]
add esi, 5
xor r9d, r9d
mov rdx, rbx
mov rcx, qword [r15]
movsxd rsi, esi
add dword [rax + 0x78], 1
lea rax, [r13 + rsi*8]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call sym.sqlite3LockAndPrepare.constprop.0
mov rcx, rbx
mov ebp, eax
mov rax, qword [r13]
sub dword [rax + 0x78], 1
call sym.sqlite3_free
test ebp, ebp
je 0x140287fcb
test r14, r14
je 0x140287fcb
mov rcx, qword [r15]
call sym.sqlite3_errmsg
lea rcx, [0x14046cd96]
mov rdx, rax
call sym.sqlite3_mprintf
mov qword [r14], rax
mov rbx, qword [r13 + r12*8 + 0x28]
test rbx, rbx
mov qword [rdi], rbx
je 0x140287de6
jmp 0x140287ce5
mov rdx, rcx
mov rcx, rdi
call sym.measureAllocationSize
jmp 0x140287d78
mov ebx, dword [r15 + 0x18]
call sym.sqlite3_initialize
test eax, eax
mov dword [rsp + 0x34], eax
jne 0x140288170
lea r9d, [rbx + 1]
lea r8d, [r9 + r9]
mov dword [rsp + 0x38], r9d
lea ecx, [r8 + 1]
mov dword [rsp + 0x3c], r8d
movsxd rcx, ecx
call sym.sqlite3Malloc
test rax, rax
mov rbp, rax
je 0x140288170
mov r9d, dword [rsp + 0x38]
test r9d, r9d
jle 0x140288216
cmp ebx, 6
movsxd r8, dword [rsp + 0x3c]
mov edx, dword [rsp + 0x34]
jbe 0x140288222
mov edx, r9d
movdqa xmm0, xmmword [str.________________]
shr edx, 3
shl rdx, 4
lea rcx, [rdx + rax]
and edx, 0x10
je 0x140288090
movups xmmword [rax], xmm0
lea rax, [rax + 0x10]
cmp rax, rcx
je 0x1402880a0
nop word cs:[rax + rax]
movups xmmword [rax], xmm0
add rax, 0x20
movups xmmword [rax - 0x10], xmm0
cmp rax, rcx
jne 0x140288090
mov eax, r9d
and eax, 0xfffffff8
and r9d, 7
mov edx, eax
je 0x14028810b
mov r9d, ebx
sub r9d, eax
lea ecx, [r9 + 1]
cmp r9d, 2
jbe 0x1402880d6
mov r9, qword [str.________________]
mov qword [rbp + rax*2], r9
mov eax, ecx
and eax, 0xfffffffc
add edx, eax
and ecx, 3
je 0x14028810b
movzx ecx, word [str.________________]
lea eax, [rdx + rdx]
cmp ebx, edx
movsxd r9, eax
mov word [rbp + r9], cx
lea r9d, [rdx + 1]
jle 0x14028810b
lea edx, [rax + 2]
cmp ebx, r9d
movsxd rdx, edx
mov word [rbp + rdx], cx
jle 0x14028810b
add eax, 4
cdqe
mov word [rbp + rax], cx
sub r8, 1
mov byte [rbp + r8], 0
mov rcx, qword [rsp + r12*8 + 0x40]
mov r9, rbp
mov rdx, qword [r15 + 8]
mov r8, qword [r15 + 0x10]
call sym.sqlite3_mprintf
mov rcx, rbp
mov rbx, rax
call sym.sqlite3_free
test rbx, rbx
je 0x140288170
mov r8d, 0x85
jmp 0x140287f67
cmp r12d, 0xa
jne 0x1402881c0
mov r8, qword [r15 + 0x48]
mov rcx, rax
mov rdx, qword [r15 + 0x60]
call sym.sqlite3_mprintf
mov r8d, 0x85
test rax, rax
mov rbx, rax
jne 0x140287f67
mov ebp, 7
jmp 0x140287fcb
cmp qword [rbx + 0xa8], 0
jne 0x140287d2e
mov edx, dword [rbx + 0x34]
mov dword [rdi + 0x50], edx
jmp 0x140287d86
mov rdx, qword [r15 + 0x60]
mov r9, qword [r15 + 0x50]
mov r8, qword [r15 + 0x48]
call sym.sqlite3_mprintf
test rax, rax
mov rbx, rax
jne 0x140287f61
jmp 0x140288170
mov rdx, qword [r15 + 8]
mov rcx, qword [rsp + r12*8 + 0x40]
mov r8, qword [r15 + 0x10]
call sym.sqlite3_mprintf
test rax, rax
mov rbx, rax
jne 0x14028813a
jmp 0x140288170
mov rax, qword [rdi + 0x1d8]
mov qword [rcx], rax
mov qword [rdi + 0x1d8], rcx
jmp 0x140287d78
mov rax, qword [rdi + 0x1c8]
mov qword [rcx], rax
mov qword [rdi + 0x1c8], rcx
jmp 0x140287d78
mov r8, 0xffffffffffffffff
jmp 0x14028810f
xor eax, eax
jmp 0x1402880ae