Function at 0x4ef18b
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
and dword [ebp - 4], 0
push ebx
push esi
mov esi, eax
push edi
lea edi, [esi + edx*4 + 0x24]
mov ebx, dword [edi]
mov ecx, str.SELECT__s_FROM__Q._q_content_AS_x_WHERE_rowid_
mov eax, str.INSERT_INTO__Q._q_content_VALUES__s_
mov dword [ebp - 0x6c], str.DELETE_FROM__Q._q_content_WHERE_rowid___
mov dword [ebp - 0x68], str.SELECT_NOT_EXISTS_SELECT_docid_FROM__Q._q_content_WHERE_rowid___
mov dword [ebp - 0x64], str.DELETE_FROM__Q._q_content
mov dword [ebp - 0x60], str.DELETE_FROM__Q._q_segments
mov dword [ebp - 0x5c], str.DELETE_FROM__Q._q_segdir
mov dword [ebp - 0x58], str.DELETE_FROM__Q._q_docsize
mov dword [ebp - 0x54], str.DELETE_FROM__Q._q_stat
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], str.SELECT__SELECT_max_idx__FROM__Q._q_segdir_WHERE_level______1
mov dword [ebp - 0x48], str.INSERT_INTO__Q._q_segments_blockid__block__VALUES______
mov dword [ebp - 0x44], str.SELECT_coalesce__SELECT_max_blockid__FROM__Q._q_segments___1__1_
mov dword [ebp - 0x40], str.INSERT_INTO__Q._q_segdir_VALUES_____________
mov dword [ebp - 0x3c], str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level____ORDER_BY_idx_ASC
mov dword [ebp - 0x38], str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_ORDER_BY_level_DESC__idx_ASC
mov dword [ebp - 0x34], str.SELECT_count___FROM__Q._q_segdir_WHERE_level___
mov dword [ebp - 0x30], str.SELECT_count____max_level__FROM__Q._q_segdir
mov dword [ebp - 0x2c], str.DELETE_FROM__Q._q_segdir_WHERE_level___
mov dword [ebp - 0x28], str.DELETE_FROM__Q._q_segments_WHERE_blockid_BETWEEN___AND__
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], str.DELETE_FROM__Q._q_docsize_WHERE_docid___
mov dword [ebp - 0x1c], str.REPLACE_INTO__Q._q_docsize_VALUES_____
mov dword [ebp - 0x18], str.SELECT_size_FROM__Q._q_docsize_WHERE_docid_
mov dword [ebp - 0x14], str.SELECT_value_FROM__Q._q_stat_WHERE_id0
mov dword [ebp - 0x10], str.REPLACE_INTO__Q._q_stat_VALUES_0___
mov dword [ebp - 0xc], ebx
test ebx, ebx
jne 0x4ef2c3
cmp edx, 0x12
jne 0x4ef26d
push dword [esi + 0x88]
push dword [esi + 0x14]
push dword [esi + 0x10]
push eax
call fcn.004cfb5f
add esp, 0x10
jmp 0x4ef28d
push dword [esi + 0x14]
push dword [esi + 0x10]
cmp edx, 7
jne 0x4ef281
push dword [esi + 0x84]
push ecx
jmp 0x4ef263
push dword [ebp + edx*4 - 0x6c]
call fcn.004cfb5f
add esp, 0xc
mov dword [ebp - 8], eax
test eax, eax
jne 0x4ef29d
mov dword [ebp - 4], 7
jmp 0x4ef2c3
push 0
lea eax, [ebp - 0xc]
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push dword [esi + 0xc]
call fcn.004eeb20
push dword [ebp - 8]
mov dword [ebp - 4], eax
call fcn.004bc89c
mov ebx, dword [ebp - 0xc]
add esp, 0x18
mov dword [edi], ebx
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4ef2fa
push ebx
call fcn.004c110e
add esp, 4
mov dword [ebp + 0xc], eax
xor eax, eax
jmp 0x4ef2f4
cmp eax, dword [ebp + 0xc]
jge 0x4ef2fa
push dword [edi + eax*4]
lea esi, [eax + 1]
push esi
push ebx
call fcn.004dfd5f
mov dword [ebp - 4], eax
add esp, 0xc
mov eax, esi
cmp dword [ebp - 4], 0
je 0x4ef2da
mov eax, dword [ebp + 8]
pop edi
mov dword [eax], ebx
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret