Function at 0x18007f730
Capabilities:
Reference sql statements

Disassembly:
mov r11, rsp
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov qword [r11 + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xe0
lea rax, str.DELETE_FROM__Q._q_content_WHERE_rowid___
xor ebx, ebx
lea r13, str.INSERT_INTO__Q._q_content_VALUES__z_
mov qword [rsp + 0x50], rax
lea rax, str.SELECT_NOT_EXISTS_SELECT_docid_FROM__Q._q_content_WHERE_rowid___
mov r14, r9
mov qword [rsp + 0x58], rax
lea rax, str.DELETE_FROM__Q._q_content
mov r15, r8
mov qword [rsp + 0x60], rax
lea rax, str.DELETE_FROM__Q._q_segments
mov rbp, rcx
mov qword [rsp + 0x68], rax
lea rax, str.DELETE_FROM__Q._q_segdir
mov edi, ebx
mov qword [rsp + 0x70], rax
lea rax, str.SELECT__FROM__Q._q_content_WHERE_rowid_
lea esi, [rbx + 1]
mov qword [rsp + 0x78], rax
lea rax, str.SELECT_coalesce_max_idx_1__0__FROM__Q._q_segdir_WHERE_level_
mov qword [r11 - 0x38], r13
mov qword [r11 - 0x88], rax
lea rax, str.INSERT_INTO__Q._q_segments_blockid__block__VALUES______
mov qword [r11 - 0x80], rax
lea rax, str.SELECT_coalesce_max_blockid_1__1__FROM__Q._q_segments
mov qword [r11 - 0x78], rax
lea rax, str.INSERT_INTO__Q._q_segdir_VALUES_____________
mov qword [r11 - 0x70], rax
lea rax, str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level____ORDER_BY_idx_ASC
mov qword [r11 - 0x68], rax
lea rax, str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_ORDER_BY_level_DESC__idx_ASC
mov qword [r11 - 0x60], rax
lea rax, str.SELECT_count___FROM__Q._q_segdir_WHERE_level___
mov qword [r11 - 0x58], rax
lea rax, str.SELECT_count____max_level__FROM__Q._q_segdir
mov qword [r11 - 0x50], rax
lea rax, str.DELETE_FROM__Q._q_segdir_WHERE_level___
mov qword [r11 - 0x48], rax
lea rax, str.DELETE_FROM__Q._q_segments_WHERE_blockid_BETWEEN___AND__
mov qword [r11 - 0x40], rax
lea rax, str.SELECT_block_FROM__Q._q_segments_WHERE_blockid___
mov qword [r11 - 0x30], rax
movsxd rax, edx
mov r12, qword [rcx + rax*8 + 0x48]
mov qword [rsp + 0x40], rax
mov qword [r11 + 8], r12
test r12, r12
jne 0x18007f91a
cmp edx, 0x10
jne 0x18007f8b5
mov eax, dword [rcx + 0x30]
lea edi, [rax + rax + 2]
call sym.sqlite3.dll_sqlite3_initialize
test eax, eax
jne 0x18007f8a8
mov ecx, edi
call fcn.180007030
test rax, rax
je 0x18007f8a8
mov byte [rax], 0x3f
movsxd rcx, dword [rbp + 0x30]
mov r8d, esi
mov byte [rax + rcx*2 + 1], bl
cmp dword [rbp + 0x30], esi
jl 0x18007f893
lea rdx, [rax + 2]
mov word [rdx - 1], 0x3f2c
inc r8d
add rdx, 2
cmp r8d, dword [rbp + 0x30]
jle 0x18007f880
mov r8, qword [rbp + 0x28]
mov rdx, qword [rbp + 0x20]
mov r9, rax
mov rcx, r13
call sym.sqlite3.dll_sqlite3_mprintf
jmp 0x18007f8c7
mov qword [r15], rbx
mov eax, 7
jmp 0x18007f958
mov r8, qword [rcx + 0x28]
mov rdx, qword [rcx + 0x20]
mov rcx, qword [rsp + rax*8 + 0x50]
call sym.sqlite3.dll_sqlite3_mprintf
mov r13, rax
test rax, rax
jne 0x18007f8d4
lea edi, [rax + 7]
jmp 0x18007f91a
mov rcx, qword [rbp + 0x18]
lea rax, [rsp + 0x110]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
mov r9d, esi
or r8d, 0xffffffff
mov rdx, r13
mov qword [rsp + 0x20], rbx
call fcn.180055990
mov rcx, r13
mov edi, eax
call sym.sqlite3.dll_sqlite3_free
mov rax, qword [rsp + 0x40]
mov r12, qword [rsp + 0x110]
mov qword [rbp + rax*8 + 0x48], r12
test r14, r14
je 0x18007f953
test r12, r12
je 0x18007f92c
movsx eax, word [r12 + 0x62]
jmp 0x18007f92e
mov eax, ebx
movsxd rbp, eax
test edi, edi
jne 0x18007f953
cmp rbx, rbp
jge 0x18007f953
mov r8, qword [r14 + rbx*8]
mov edx, esi
mov rcx, r12
call sym.sqlite3.dll_sqlite3_bind_value
inc esi
inc rbx
mov edi, eax
test eax, eax
je 0x18007f935
mov qword [r15], r12
mov eax, edi
lea r11, [rsp + 0xe0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret