Function at 0x6f39e0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov dword [ebp - 0x68], str.DELETE_FROM__Q._q_content_WHERE_rowid___
mov dword [ebp - 0x64], str.SELECT_NOT_EXISTS_SELECT_docid_FROM__Q._q_content_WHERE_rowid___
mov dword [ebp - 0x60], str.DELETE_FROM__Q._q_content
mov dword [ebp - 0x5c], str.DELETE_FROM__Q._q_segments
mov dword [ebp - 0x58], str.DELETE_FROM__Q._q_segdir
mov dword [ebp - 0x54], str.DELETE_FROM__Q._q_docsize
mov dword [ebp - 0x50], str.DELETE_FROM__Q._q_stat
mov dword [ebp - 0x4c], str.SELECT__s_FROM__Q._q_content_AS_x_WHERE_rowid_
mov dword [ebp - 0x48], str.SELECT__SELECT_max_idx__FROM__Q._q_segdir_WHERE_level______1
mov dword [ebp - 0x44], str.INSERT_INTO__Q._q_segments_blockid__block__VALUES______
mov dword [ebp - 0x40], str.SELECT_coalesce__SELECT_max_blockid__FROM__Q._q_segments___1__1_
mov dword [ebp - 0x3c], str.INSERT_INTO__Q._q_segdir_VALUES_____________
mov dword [ebp - 0x38], str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level____ORDER_BY_idx_ASC
mov dword [ebp - 0x34], str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_ORDER_BY_level_DESC__idx_ASC
mov dword [ebp - 0x30], str.SELECT_count___FROM__Q._q_segdir_WHERE_level___
mov dword [ebp - 0x2c], str.SELECT_count____max_level__FROM__Q._q_segdir
mov dword [ebp - 0x28], str.DELETE_FROM__Q._q_segdir_WHERE_level___
mov dword [ebp - 0x24], str.DELETE_FROM__Q._q_segments_WHERE_blockid_BETWEEN___AND__
mov dword [ebp - 0x20], str.INSERT_INTO__Q._q_content_VALUES__s_
mov dword [ebp - 0x1c], str.DELETE_FROM__Q._q_docsize_WHERE_docid___
mov dword [ebp - 0x18], str.REPLACE_INTO__Q._q_docsize_VALUES_____
mov dword [ebp - 0x14], str.SELECT_size_FROM__Q._q_docsize_WHERE_docid_
mov dword [ebp - 0x10], str.SELECT_value_FROM__Q._q_stat_WHERE_id0
mov dword [ebp - 0xc], str.REPLACE_INTO__Q._q_stat_VALUES_0___
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + eax*4 + 0x24]
mov dword [ebp - 0x6c], edx
cmp dword [ebp - 0x6c], 0
jne 0x6f3b79
cmp dword [ebp + 0xc], 0x12
jne 0x6f3adf
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x88]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + eax*4 - 0x68]
push ecx
call fcn.00686e10
add esp, 0x10
mov dword [ebp - 0x70], eax
jmp 0x6f3b33
cmp dword [ebp + 0xc], 7
jne 0x6f3b12
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x84]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + edx*4 - 0x68]
push eax
call fcn.00686e10
add esp, 0x10
mov dword [ebp - 0x70], eax
jmp 0x6f3b33
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + edx*4 - 0x68]
push eax
call fcn.00686e10
add esp, 0xc
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x70], 0
jne 0x6f3b42
mov dword [ebp - 4], 7
jmp 0x6f3b79
push 0
lea ecx, [ebp - 0x6c]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
push ecx
call fcn.006b87a0
add esp, 0x14
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0x70]
push edx
call fcn.00684fa0
add esp, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x6c]
mov dword [ecx + eax*4 + 0x24], edx
cmp dword [ebp + 0x14], 0
je 0x6f3bd0
mov eax, dword [ebp - 0x6c]
push eax
call fcn.0069e080
add esp, 4
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], 0
jmp 0x6f3ba0
mov ecx, dword [ebp - 0x74]
add ecx, 1
mov dword [ebp - 0x74], ecx
cmp dword [ebp - 4], 0
jne 0x6f3bd0
mov edx, dword [ebp - 0x74]
cmp edx, dword [ebp - 0x78]
jge 0x6f3bd0
mov eax, dword [ebp - 0x74]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + eax*4]
push edx
mov eax, dword [ebp - 0x74]
add eax, 1
push eax
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.0069df00
add esp, 0xc
mov dword [ebp - 4], eax
jmp 0x6f3b97
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x6c]
mov dword [edx], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret