Function at 0x1401db09f
Capabilities:
Reference sql statements

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xc0
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
mov dword [rbp - 4], 0
mov rax, qword [rbp + 0x10]
mov edx, dword [rbp + 0x18]
movsxd rdx, edx
add rdx, 4
mov rax, qword [rax + rdx*8 + 8]
test rax, rax
jne 0x1401db4ad
lea rax, str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_ASC
mov qword [rbp - 0x90], rax
lea rax, str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_DESC
mov qword [rbp - 0x88], rax
lea rax, str.SELECT__s_FROM__s_T_WHERE_T._Q_
mov qword [rbp - 0x80], rax
lea rax, str.INSERT_INTO__Q._q_content_VALUES__s_
mov qword [rbp - 0x78], rax
lea rax, str.REPLACE_INTO__Q._q_content_VALUES__s_
mov qword [rbp - 0x70], rax
lea rax, str.DELETE_FROM__Q._q_content_WHERE_id_
mov qword [rbp - 0x68], rax
lea rax, str.REPLACE_INTO__Q._q_docsize_VALUES_____s_
mov qword [rbp - 0x60], rax
lea rax, str.DELETE_FROM__Q._q_docsize_WHERE_id_
mov qword [rbp - 0x58], rax
lea rax, str.SELECT_sz_s_FROM__Q._q_docsize_WHERE_id_
mov qword [rbp - 0x50], rax
lea rax, str.REPLACE_INTO__Q._q_config_VALUES_____
mov qword [rbp - 0x48], rax
lea rax, str.SELECT__s_FROM__s_AS_T
mov qword [rbp - 0x40], rax
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x10], 0
cmp dword [rbp + 0x18], 0xa
ja case.0x1401db199.5
mov eax, dword [rbp + 0x18]
lea rdx, [rax*4]
lea rax, [0x14037da6c]
mov eax, dword [rdx + rax]
cdqe
lea rdx, [0x14037da6c]
add rax, rdx
jmp rax
mov rax, qword [rbp - 0x20]
mov rcx, qword [rax + 0x48]
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax + 0x60]
mov eax, dword [rbp + 0x18]
cdqe
mov rax, qword [rbp + rax*8 - 0x90]
mov r8, rcx
mov rcx, rax
call sym.sqlite3_mprintf
mov qword [rbp - 0x10], rax
jmp 0x1401db3db
mov rax, qword [rbp - 0x20]
mov r8, qword [rax + 0x50]
mov rax, qword [rbp - 0x20]
mov rcx, qword [rax + 0x50]
mov rax, qword [rbp - 0x20]
mov r9, qword [rax + 0x50]
mov rax, qword [rbp - 0x20]
mov r10, qword [rax + 0x48]
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax + 0x60]
mov eax, dword [rbp + 0x18]
cdqe
mov rax, qword [rbp + rax*8 - 0x90]
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x20], rcx
mov r8, r10
mov rcx, rax
call sym.sqlite3_mprintf
mov qword [rbp - 0x10], rax
jmp 0x1401db3db
mov rax, qword [rbp - 0x20]
mov r8, qword [rax + 0x50]
mov rax, qword [rbp - 0x20]
mov rcx, qword [rax + 0x48]
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax + 0x60]
mov eax, dword [rbp + 0x18]
cdqe
mov rax, qword [rbp + rax*8 - 0x90]
mov r9, r8
mov r8, rcx
mov rcx, rax
call sym.sqlite3_mprintf
mov qword [rbp - 0x10], rax
jmp 0x1401db3db
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x18]
add eax, 1
mov dword [rbp - 0x24], eax
mov eax, dword [rbp - 0x24]
add eax, eax
add eax, 1
cdqe
mov rcx, rax
call sym.sqlite3_malloc64
mov qword [rbp - 0x30], rax
cmp qword [rbp - 0x30], 0
je 0x1401db3da
mov dword [rbp - 0x14], 0
jmp 0x1401db2bd
mov eax, dword [rbp - 0x14]
add eax, eax
movsxd rdx, eax
mov rax, qword [rbp - 0x30]
add rax, rdx
mov byte [rax], 0x3f
mov eax, dword [rbp - 0x14]
add eax, eax
cdqe
lea rdx, [rax + 1]
mov rax, qword [rbp - 0x30]
add rax, rdx
mov byte [rax], 0x2c
add dword [rbp - 0x14], 1
mov eax, dword [rbp - 0x14]
cmp eax, dword [rbp - 0x24]
jl 0x1401db292
mov eax, dword [rbp - 0x14]
add eax, eax
cdqe
lea rdx, [rax - 1]
mov rax, qword [rbp - 0x30]
add rax, rdx
mov byte [rax], 0
mov rax, qword [rbp - 0x20]
mov rcx, qword [rax + 0x10]
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax + 8]
mov eax, dword [rbp + 0x18]
cdqe
mov rax, qword [rbp + rax*8 - 0x90]
mov r8, qword [rbp - 0x30]
mov r9, r8
mov r8, rcx
mov rcx, rax
call sym.sqlite3_mprintf
mov qword [rbp - 0x10], rax
mov rax, qword [rbp - 0x30]
mov rcx, rax
call sym.sqlite3_free
jmp 0x1401db3da
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x44]
test eax, eax
je 0x1401db332
lea rax, [0x14037da5f]
jmp 0x1401db339
lea rax, [0x14036d6da]
mov rdx, qword [rbp - 0x20]
mov r8, qword [rdx + 0x10]
mov rdx, qword [rbp - 0x20]
mov rdx, qword [rdx + 8]
mov ecx, dword [rbp + 0x18]
movsxd rcx, ecx
mov rcx, qword [rbp + rcx*8 - 0x90]
mov r9, rax
call sym.sqlite3_mprintf
mov qword [rbp - 0x10], rax
jmp 0x1401db3db
mov rax, qword [rbp - 0x20]
mov r9, qword [rax + 0x10]
mov rax, qword [rbp - 0x20]
mov r8, qword [rax + 8]
mov rax, qword [rbp - 0x20]
mov eax, dword [rax + 0x44]
test eax, eax
je 0x1401db389
lea rax, str._origin
jmp 0x1401db390
lea rax, [0x14036d6da]
mov edx, dword [rbp + 0x18]
movsxd rdx, edx
mov rcx, qword [rbp + rdx*8 - 0x90]
mov rdx, rax
call sym.sqlite3_mprintf
mov qword [rbp - 0x10], rax
jmp 0x1401db3db
mov rax, qword [rbp - 0x20]
mov rcx, qword [rax + 0x10]
mov rax, qword [rbp - 0x20]
mov rdx, qword [rax + 8]
mov eax, dword [rbp + 0x18]
cdqe
mov rax, qword [rbp + rax*8 - 0x90]
mov r8, rcx
mov rcx, rax
call sym.sqlite3_mprintf
mov qword [rbp - 0x10], rax
jmp 0x1401db3db
nop
cmp qword [rbp - 0x10], 0
jne 0x1401db3ee
mov dword [rbp - 4], 7
jmp 0x1401db4ad
mov dword [rbp - 0x18], 1
cmp dword [rbp + 0x18], 2
jle 0x1401db3ff
or dword [rbp - 0x18], 4
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov edx, dword [rax + 0x78]
add edx, 1
mov dword [rax + 0x78], edx
mov eax, dword [rbp + 0x18]
cdqe
add rax, 4
lea rdx, [rax*8]
mov rax, qword [rbp + 0x10]
add rax, rdx
lea rcx, [rax + 8]
mov r8d, dword [rbp - 0x18]
mov rax, qword [rbp - 0x20]
mov rax, qword [rax]
mov rdx, qword [rbp - 0x10]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rcx
mov r9d, r8d
mov r8d, 0xffffffff
mov rcx, rax
call sym.sqlite3_prepare_v3
mov dword [rbp - 4], eax
mov rax, qword [rbp + 0x10]
mov rax, qword [rax]
mov edx, dword [rax + 0x78]
sub edx, 1
mov dword [rax + 0x78], edx
mov rax, qword [rbp - 0x10]
mov rcx, rax
call sym.sqlite3_free
cmp dword [rbp - 4], 0
je 0x1401db4ad
cmp qword [rbp + 0x28], 0
je 0x1401db4ad
mov rax, qword [rbp - 0x20]
mov rax, qword [rax]
mov rcx, rax
call sym.sqlite3_errmsg
mov rdx, rax
lea rax, [0x14036de00]
mov rcx, rax
call sym.sqlite3_mprintf
mov rdx, qword [rbp + 0x28]
mov qword [rdx], rax
mov rax, qword [rbp + 0x10]
mov edx, dword [rbp + 0x18]
movsxd rdx, edx
add rdx, 4
mov rdx, qword [rax + rdx*8 + 8]
mov rax, qword [rbp + 0x20]
mov qword [rax], rdx
mov rax, qword [rbp + 0x20]
mov rax, qword [rax]
mov rcx, rax
call sym.sqlite3_reset
mov eax, dword [rbp - 4]
add rsp, 0xc0
pop rbp
ret