Function at 0x101a25a0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
lea edx, [ecx + eax*4 + 0x1c]
xor edi, edi
mov dword [ebp - 4], edx
cmp dword [edx], edi
jne 0x101a275b
mov esi, dword [ecx]
mov dword [ebp - 0x30], str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_ASC
mov dword [ebp - 0x2c], str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_DESC
mov dword [ebp - 0x28], str.SELECT__s_FROM__s_T_WHERE_T._Q_
mov dword [ebp - 0x24], str.INSERT_INTO__Q._q_content_VALUES__s_
mov dword [ebp - 0x20], str.REPLACE_INTO__Q._q_content_VALUES__s_
mov dword [ebp - 0x1c], str.DELETE_FROM__Q._q_content_WHERE_id_
mov dword [ebp - 0x18], str.REPLACE_INTO__Q._q_docsize_VALUES_____
mov dword [ebp - 0x14], str.DELETE_FROM__Q._q_docsize_WHERE_id_
mov dword [ebp - 0x10], str.SELECT_sz_FROM__Q._q_docsize_WHERE_id_
mov dword [ebp - 0xc], str.REPLACE_INTO__Q._q_config_VALUES_____
mov dword [ebp - 8], str.SELECT__s_FROM__s_AS_T
cmp eax, 0xa
ja case.0x101a261f.5
movzx ecx, byte [eax + 0x101a278c]
jmp dword [ecx*4 + 0x101a2778]
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x34]
push edx
push eax
push str.SELECT__s_FROM__s_AS_T
jmp 0x101a26d6
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x34]
mov eax, dword [ebp + eax*4 - 0x30]
push ecx
push ecx
push ecx
mov ecx, dword [esi + 0x24]
push ecx
push edx
push eax
call sym.SQLite.Interop.dll_sqlite3_mprintf
add esp, 0x18
jmp 0x101a26de
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x34]
push ecx
push edx
push eax
push str.SELECT__s_FROM__s_T_WHERE_T._Q_
call sym.SQLite.Interop.dll_sqlite3_mprintf
add esp, 0x10
jmp 0x101a26de
mov ebx, dword [esi + 0xc]
inc ebx
lea eax, [ebx + ebx + 1]
cdq
push edx
push eax
call sym.SQLite.Interop.dll_sqlite3_malloc64
mov edi, eax
add esp, 8
test edi, edi
je 0x101a26e4
xor eax, eax
test ebx, ebx
jle 0x101a26a1
mov cl, 0x2c
mov byte [edi + eax*2], 0x3f
mov byte [edi + eax*2 + 1], cl
inc eax
cmp eax, ebx
jl 0x101a2694
mov byte [edi + eax*2 - 1], 0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
mov eax, dword [ebp + 0xc]
push edi
push ecx
mov ecx, dword [ebp + eax*4 - 0x30]
push edx
push ecx
call sym.SQLite.Interop.dll_sqlite3_mprintf
push edi
mov ebx, eax
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 0x14
jmp 0x101a26e0
mov edx, dword [esi + 8]
mov ecx, dword [esi + 4]
push edx
mov edx, dword [ebp + eax*4 - 0x30]
push ecx
push edx
call sym.SQLite.Interop.dll_sqlite3_mprintf
add esp, 0xc
mov ebx, eax
test ebx, ebx
jne 0x101a26eb
mov edi, 7
jmp 0x101a275b
cmp dword [ebp + 0xc], 2
mov eax, 1
jle 0x101a26fb
mov eax, 5
mov edx, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
inc dword [ecx + 0x40]
mov ecx, dword [esi]
push 0
push edx
push 0
and eax, 0xf
or eax, 0x80
push eax
push 0xffffffffffffffff
push ebx
push ecx
call fcn.101fbc70
mov edi, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
dec dword [eax + 0x40]
add esp, 0x1c
push ebx
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
test edi, edi
je 0x101a275b
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x101a275b
mov ecx, dword [esi]
push ecx
call sym.SQLite.Interop.dll_sqlite3_errmsg
add esp, 4
push eax
push 0x102759c0
call sym.SQLite.Interop.dll_sqlite3_mprintf
add esp, 8
mov dword [ebx], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x10]
push eax
mov dword [ecx], eax
call sym.SQLite.Interop.dll_sqlite3_reset
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret