Function at 0x18011f9e0
Capabilities:
Reference sql statements

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], r8
mov qword [r11 + 8], rcx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa8
movsxd r13, edx
xor r12d, r12d
mov r15, r9
lea r14, [rcx + r13*8 + 0x28]
mov rdi, rcx
cmp qword [r14], r12
jne 0x18011fc7b
lea rax, str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_ASC
mov qword [r11 + 0x10], rbx
mov rbx, qword [rcx]
mov qword [rsp + 0x40], rax
lea rax, str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_DESC
mov qword [r11 - 0x38], rbp
mov qword [rsp + 0x48], rax
lea rax, str.SELECT__s_FROM__s_T_WHERE_T._Q_
mov qword [rsp + 0x50], rax
lea rax, str.INSERT_INTO__Q._q_content_VALUES__s_
mov qword [r11 - 0x80], rax
lea rax, str.REPLACE_INTO__Q._q_content_VALUES__s_
mov qword [r11 - 0x78], rax
lea rax, str.DELETE_FROM__Q._q_content_WHERE_id_
mov qword [r11 - 0x70], rax
lea rax, str.REPLACE_INTO__Q._q_docsize_VALUES_____s_
mov qword [r11 - 0x68], rax
lea rax, str.DELETE_FROM__Q._q_docsize_WHERE_id_
mov qword [r11 - 0x60], rax
lea rax, str.SELECT_sz_s_FROM__Q._q_docsize_WHERE_id_
mov qword [r11 - 0x58], rax
lea rax, str.REPLACE_INTO__Q._q_config_VALUES_____
mov qword [r11 - 0x50], rax
lea rax, str.SELECT__s_FROM__s_AS_T
mov qword [r11 - 0x48], rax
cmp r13d, 0xa
ja case.0x18011fab9.5
lea rcx, [0x180000000]
mov edx, dword [rcx + r13*4 + 0x11fca4]
add rdx, rcx
jmp rdx
mov r8, qword [rbx + 0x48]
mov rdx, qword [rbx + 0x60]
jmp 0x18011fbdc
mov r9, qword [rbx + 0x50]
mov r8, qword [rbx + 0x48]
mov rdx, qword [rbx + 0x60]
mov rcx, qword [rsp + r13*8 + 0x40]
mov qword [rsp + 0x28], r9
mov qword [rsp + 0x20], r9
call sym.sqlite.dll_sqlite3_mprintf
jmp 0x18011fbe6
mov r9, qword [rbx + 0x50]
mov r8, qword [rbx + 0x48]
mov rdx, qword [rbx + 0x60]
mov rcx, qword [rsp + r13*8 + 0x40]
call sym.sqlite.dll_sqlite3_mprintf
jmp 0x18011fbe6
mov ebp, dword [rbx + 0x18]
inc ebp
lea eax, [rbp + rbp + 1]
movsxd rcx, eax
call sym.sqlite.dll_sqlite3_malloc64
mov rdi, rax
test rax, rax
je 0x18011fbee
mov edx, r12d
mov rax, r12
movsxd rcx, ebp
test ebp, ebp
jle 0x18011fb4e
mov edx, ecx
nop word [rax + rax]
mov word [rdi + rax*2], 0x2c3f
inc rax
cmp rax, rcx
jl 0x18011fb40
mov rcx, qword [rsp + r13*8 + 0x40]
movsxd rax, edx
mov r9, rdi
mov byte [rdi + rax*2 - 1], r12b
mov r8, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
call sym.sqlite.dll_sqlite3_mprintf
mov rcx, rdi
mov rsi, rax
call sym.sqlite.dll_sqlite3_free
mov rdi, qword [rsp + 0xe0]
jmp 0x18011fbe9
cmp dword [rbx + 0x44], r12d
mov r8, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, qword [rsp + r13*8 + 0x40]
lea rax, [0x18014d1d4]
lea r9, [0x180143844]
cmovne r9, rax
call sym.sqlite.dll_sqlite3_mprintf
jmp 0x18011fbe6
cmp dword [rbx + 0x44], r12d
mov r9, qword [rbx + 0x10]
mov r8, qword [rbx + 8]
mov rcx, qword [rsp + r13*8 + 0x40]
lea rax, str._origin
lea rdx, [0x180143844]
cmovne rdx, rax
call sym.sqlite.dll_sqlite3_mprintf
jmp 0x18011fbe6
mov r8, qword [rbx + 0x10]
mov rdx, qword [rbx + 8]
mov rcx, qword [rsp + r13*8 + 0x40]
call sym.sqlite.dll_sqlite3_mprintf
mov rsi, rax
test rsi, rsi
jne 0x18011fbf6
mov r12d, 7
jmp 0x18011fc6b
mov eax, 5
mov r9d, 1
mov qword [rsp + 0x30], r12
cmp r13d, 2
mov rdx, rsi
mov qword [rsp + 0x28], r14
cmovg r9d, eax
mov rax, qword [rdi]
or r8d, 0xffffffff
inc dword [rax + 0x78]
mov rcx, qword [rbx]
and r9d, 0xf
bts r9d, 7
mov qword [rsp + 0x20], r12
call fcn.180087650
mov rdx, qword [rdi]
mov rcx, rsi
dec dword [rdx + 0x78]
mov r12d, eax
call sym.sqlite.dll_sqlite3_free
test r12d, r12d
je 0x18011fc6b
test r15, r15
je 0x18011fc6b
mov rcx, qword [rbx]
call sym.sqlite.dll_sqlite3_errmsg
lea rcx, [0x180143854]
mov rdx, rax
call sym.sqlite.dll_sqlite3_mprintf
mov qword [r15], rax
mov rbx, qword [rsp + 0xe8]
mov rbp, qword [rsp + 0xa0]
mov rax, qword [rsp + 0xf0]
mov rcx, qword [r14]
mov qword [rax], rcx
call sym.sqlite.dll_sqlite3_reset
mov eax, r12d
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret