Function at 0x100e0360
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xbc
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0xb8], eax
mov eax, dword [esp + 0xc4]
push ebx
push ebp
mov dword [esp + 0x14], eax
mov ebp, ecx
mov ecx, dword [esp + 0xc8]
lea eax, [edx*4 + 0x3c]
add eax, ebp
mov dword [esp + 0xc], ecx
push esi
push edi
xor edi, edi
mov dword [esp + 0x24], str.DELETE_FROM__Q._q_content_WHERE_rowid___
mov ebx, dword [eax]
mov dword [esp + 0x28], str.SELECT_NOT_EXISTS_SELECT_docid_FROM__Q._q_content_WHERE_rowid___
mov dword [esp + 0x2c], str.DELETE_FROM__Q._q_content
mov dword [esp + 0x30], str.DELETE_FROM__Q._q_segments
mov dword [esp + 0x34], str.DELETE_FROM__Q._q_segdir
mov dword [esp + 0x38], str.DELETE_FROM__Q._q_docsize
mov dword [esp + 0x3c], str.DELETE_FROM__Q._q_stat
mov dword [esp + 0x40], str.SELECT__s_WHERE_rowid_
mov dword [esp + 0x44], str.SELECT__SELECT_max_idx__FROM__Q._q_segdir_WHERE_level______1
mov dword [esp + 0x48], str.REPLACE_INTO__Q._q_segments_blockid__block__VALUES______
mov dword [esp + 0x4c], str.SELECT_coalesce__SELECT_max_blockid__FROM__Q._q_segments___1__1_
mov dword [esp + 0x50], str.REPLACE_INTO__Q._q_segdir_VALUES_____________
mov dword [esp + 0x54], str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level____ORDER_BY_idx_ASC
mov dword [esp + 0x58], str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level_BETWEEN___AND__ORDER_BY_level_DESC__idx_ASC
mov dword [esp + 0x5c], str.SELECT_count___FROM__Q._q_segdir_WHERE_level___
mov dword [esp + 0x60], str.SELECT_max_level__FROM__Q._q_segdir_WHERE_level_BETWEEN___AND__
mov dword [esp + 0x64], str.DELETE_FROM__Q._q_segdir_WHERE_level___
mov dword [esp + 0x68], str.DELETE_FROM__Q._q_segments_WHERE_blockid_BETWEEN___AND__
mov dword [esp + 0x6c], str.INSERT_INTO__Q._q_content_VALUES__s_
mov dword [esp + 0x70], str.DELETE_FROM__Q._q_docsize_WHERE_docid___
mov dword [esp + 0x74], str.REPLACE_INTO__Q._q_docsize_VALUES_____
mov dword [esp + 0x78], str.SELECT_size_FROM__Q._q_docsize_WHERE_docid_
mov dword [esp + 0x7c], str.SELECT_value_FROM__Q._q_stat_WHERE_id_
mov dword [esp + 0x80], str.REPLACE_INTO__Q._q_stat_VALUES_____
mov dword [esp + 0x84], 0x10156603
mov dword [esp + 0x88], 0x10156603
mov dword [esp + 0x8c], str.DELETE_FROM__Q._q_segdir_WHERE_level_BETWEEN___AND__
mov dword [esp + 0x90], str.SELECT___UNION_SELECT_level____1024_____FROM__Q._q_segdir
mov dword [esp + 0x94], str.SELECT_level__count___AS_cnt_FROM__Q._q_segdir___GROUP_BY_level_HAVING_cnt____ORDER_BY__level____1024__ASC__2_DESC_LIMIT_1
mov dword [esp + 0x98], str.SELECT_2__total_1__leaves_end_block___start_block____FROM__SELECT__FROM__Q._q_segdir_________WHERE_level____ORDER_BY_idx_ASC_LIMIT_____
mov dword [esp + 0x9c], str.DELETE_FROM__Q._q_segdir_WHERE_level____AND_idx___
mov dword [esp + 0xa0], str.UPDATE__Q._q_segdir_SET_idx____WHERE_level__AND_idx_
mov dword [esp + 0xa4], str.SELECT_idx__start_block__leaves_end_block__end_block__root_FROM__Q._q_segdir_WHERE_level____AND_idx___
mov dword [esp + 0xa8], str.UPDATE__Q._q_segdir_SET_start_block_____root___WHERE_level____AND_idx___
mov dword [esp + 0xac], str.SELECT_1_FROM__Q._q_segments_WHERE_blockid__AND_block_IS_NULL
mov dword [esp + 0xb0], str.SELECT_idx_FROM__Q._q_segdir_WHERE_level__ORDER_BY_1_ASC
mov dword [esp + 0xb4], str.SELECT_max__level____1024___FROM__Q._q_segdir
mov dword [esp + 0xb8], str.SELECT_level__idx__end_block_FROM__Q._q_segdir_WHERE_level_BETWEEN___AND___ORDER_BY_level_DESC__idx_ASC
mov dword [esp + 0xbc], str.UPDATE_OR_FAIL__Q._q_segdir_SET_level_1_idx__WHERE_level__AND_idx_
mov dword [esp + 0xc0], str.UPDATE_OR_FAIL__Q._q_segdir_SET_level__WHERE_level_1
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x100e0603
lea eax, [esp + 0x24]
lea eax, [eax + edx*4]
cmp edx, 0x12
jne 0x100e0544
push dword [ebp + 0xe4]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [eax]
call fcn.100212d0
add esp, 0x10
jmp 0x100e0572
mov eax, dword [eax]
cmp edx, 7
jne 0x100e0563
push dword [ebp + 0xe0]
push eax
call fcn.100212d0
mov esi, eax
add esp, 8
mov eax, 0x81
jmp 0x100e0579
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call fcn.100212d0
add esp, 0xc
mov esi, eax
mov eax, 0x85
test esi, esi
jne 0x100e0582
lea edi, [esi + 7]
jmp 0x100e05ff
push 0
lea ecx, [esp + 0x1c]
mov edx, esi
push ecx
mov ecx, dword [ebp + 0xc]
push 0
push eax
push 0xffffffffffffffff
call fcn.100931a0
add esp, 0x14
mov edi, eax
cmp dword [0x10165af8], 0
je 0x100e05eb
mov eax, dword [0x10168b40]
test eax, eax
je 0x100e05b9
push eax
call dword [0x10165b48]
add esp, 4
push esi
call dword [0x10165b24]
sub dword [0x101689c8], eax
add esp, 4
dec dword [0x101689ec]
push esi
call dword [0x10165b1c]
mov eax, dword [0x10168b40]
add esp, 4
test eax, eax
je 0x100e05f5
push eax
call dword [0x10165b50]
jmp 0x100e05f2
push esi
call dword [0x10165b1c]
add esp, 4
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
mov dword [eax], ebx
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x100e0648
test ebx, ebx
je 0x100e0615
movsx ebp, word [ebx + 0x10]
jmp 0x100e0617
xor ebp, ebp
xor eax, eax
test edi, edi
jne 0x100e0648
nop dword [eax]
cmp eax, ebp
jge 0x100e0640
push dword [edx + eax*4]
lea esi, [eax + 1]
push esi
push ebx
call fcn.1004b490
mov edx, dword [esp + 0x28]
mov edi, eax
add esp, 0xc
mov eax, esi
test edi, edi
je 0x100e0620
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
jmp 0x100e064a
mov dword [ecx], ebx
mov ecx, dword [esp + 0xc8]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10129081
add esp, 0xbc
ret