Function at 0x66644dd0
Capabilities:
Contain obfuscated stackstrings
Reference sql statements

Disassembly:
push ebp
push edi
lea edi, [edx + 4]
push esi
mov esi, eax
push ebx
xor ebx, ebx
sub esp, 0x6c
mov eax, dword [eax + edi*4 + 0xc]
mov dword [esp + 0x20], ecx
test eax, eax
je 0x66644e08
mov edi, dword [esp + 0x20]
mov dword [edi], eax
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_reset
add esp, 0x6c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x34], str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_ASC
mov ebp, dword [esi]
mov ebx, edx
mov dword [esp + 0x38], str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_DESC
mov dword [esp + 0x3c], str.SELECT__s_FROM__s_T_WHERE_T._Q_
mov dword [esp + 0x40], str.INSERT_INTO__Q._q_content_VALUES__s_
mov dword [esp + 0x44], str.REPLACE_INTO__Q._q_content_VALUES__s_
mov dword [esp + 0x48], str.DELETE_FROM__Q._q_content_WHERE_id_
mov dword [esp + 0x4c], str.REPLACE_INTO__Q._q_docsize_VALUES_____
mov dword [esp + 0x50], str.DELETE_FROM__Q._q_docsize_WHERE_id_
mov dword [esp + 0x54], str.SELECT_sz_FROM__Q._q_docsize_WHERE_id_
mov dword [esp + 0x58], str.REPLACE_INTO__Q._q_config_VALUES_____
mov dword [esp + 0x5c], str.SELECT__s_FROM__s_AS_T
cmp edx, 4
jg 0x66644f30
cmp edx, 2
jg 0x66644fd8
jne 0x66644f70
mov eax, dword [ebp + 0x28]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x34]
mov dword [esp], str.SELECT__s_FROM__s_T_WHERE_T._Q_
mov dword [esp + 4], eax
call sym.libsqlite3_0.dll_sqlite3_mprintf
mov edx, eax
test eax, eax
je 0x66644f60
mov ecx, 0x81
mov eax, dword [esi]
mov dword [esp + 0x24], edx
add dword [eax + 0x40], 1
lea eax, [esi + ebx*4 + 0x1c]
mov dword [esp], ecx
mov ecx, 0xffffffff
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp]
call fcn.666445b0
mov edx, dword [esp + 0x24]
mov ebx, eax
mov eax, dword [esi]
sub dword [eax + 0x40], 1
mov dword [esp], edx
call sym.libsqlite3_0.dll_sqlite3_free
test ebx, ebx
je 0x66644f25
mov eax, dword [esp + 0x80]
test eax, eax
je 0x66644f25
mov eax, dword [ebp]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_errmsg
mov dword [esp], 0x6667eaa2
mov dword [esp + 4], eax
call sym.libsqlite3_0.dll_sqlite3_mprintf
mov ecx, dword [esp + 0x80]
mov dword [ecx], eax
mov eax, dword [esi + edi*4 + 0xc]
jmp 0x66644dea
cmp edx, 0xa
jne 0x66644fa8
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x34]
mov dword [esp], str.SELECT__s_FROM__s_AS_T
mov dword [esp + 4], eax
call sym.libsqlite3_0.dll_sqlite3_mprintf
mov ecx, 0x85
mov edx, eax
test eax, eax
jne 0x66644eac
nop
mov ebx, 7
jmp 0x66644f25
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x34]
mov dword [esp + 4], eax
mov eax, dword [esp + edx*4 + 0x34]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_mprintf
mov edx, eax
test eax, eax
jne 0x66644ea7
jmp 0x66644f60
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, dword [ebp + 4]
mov dword [esp + 4], eax
mov eax, dword [esp + edx*4 + 0x34]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_mprintf
mov edx, eax
test eax, eax
je 0x66644f60
mov ecx, 0x85
jmp 0x66644eac
mov eax, dword [ebp + 0xc]
mov edx, dword [0x6667ced0]
mov dword [esp + 0x24], eax
test edx, edx
jne 0x666450a0
call fcn.66587320
test eax, eax
jne 0x66644f60
call fcn.665cb300
test eax, eax
jne 0x66644f60
mov ecx, dword [esp + 0x24]
add ecx, 1
lea eax, [ecx + ecx]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
add eax, 1
cdq
call fcn.6658bcf0
mov dword [esp + 0x24], eax
test eax, eax
je 0x66644f60
mov ecx, dword [esp + 0x2c]
test ecx, ecx
jle 0x666450aa
mov ecx, dword [esp + 0x28]
add ecx, eax
lea esi, [esi]
mov byte [eax], 0x3f
add eax, 2
mov byte [eax - 1], 0x2c
cmp ecx, eax
jne 0x66645040
mov eax, dword [esp + 0x28]
sub eax, 1
mov ecx, dword [esp + 0x24]
mov byte [ecx + eax], 0
mov dword [esp + 0xc], ecx
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, dword [ebp + 4]
mov dword [esp + 4], eax
mov eax, dword [esp + ebx*4 + 0x34]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_mprintf
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x28], eax
mov dword [esp], ecx
call sym.libsqlite3_0.dll_sqlite3_free
mov edx, dword [esp + 0x28]
test edx, edx
jne 0x66644fc8
jmp 0x66644f60
lock or dword [esp], 0
jmp 0x66645007
mov eax, 0xffffffff
jmp 0x66645055