Function at 0x507a60
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ecx + eax*4 + 0x1c]
lea edx, [ecx + eax*4 + 0x1c]
xor ebx, ebx
push edi
test esi, esi
mov dword [ebp - 4], edx
jne 0x507c17
mov esi, dword [ecx]
cmp eax, 0xa
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
ja case.0x507ae4.4
xor ecx, ecx
mov cl, byte [eax + 0x507c48]
jmp dword [ecx*4 + 0x507c34]
mov edx, dword [esi + 0x24]
mov eax, dword [esi + 0x34]
push edx
push eax
push str.SELECT__s_FROM__s_AS_T
jmp 0x507b9c
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 fcn.004711e0
add esp, 0x18
jmp 0x507ba4
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 fcn.004711e0
add esp, 0x10
jmp 0x507ba4
mov edi, dword [esi + 0xc]
inc edi
lea eax, [edi + edi + 1]
cdq
push edx
push eax
call fcn.0046f440
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x507baa
xor ecx, ecx
test edi, edi
jle 0x507b67
mov ecx, edi
mov dl, 0x2c
mov byte [eax], 0x3f
mov byte [eax + 1], dl
add eax, 2
dec edi
jne 0x507b5b
mov eax, dword [ebp + 0xc]
mov byte [ebx + ecx*2 - 1], 0
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ebx
push ecx
mov ecx, dword [ebp + eax*4 - 0x30]
push edx
push ecx
call fcn.004711e0
push ebx
mov edi, eax
call fcn.0046f4b0
add esp, 0x14
jmp 0x507ba6
mov edx, dword [esi + 8]
mov ecx, dword [esi + 4]
push edx
mov edx, dword [ebp + eax*4 - 0x30]
push ecx
push edx
call fcn.004711e0
add esp, 0xc
mov edi, eax
test edi, edi
jne 0x507bb1
mov ebx, 7
jmp 0x507c17
mov eax, dword [ebp + 0xc]
mov ecx, 1
cmp eax, 2
jle 0x507bc3
mov ecx, 5
mov eax, dword [ebp + 8]
push 0
mov eax, dword [eax]
mov edx, dword [eax + 0x40]
inc edx
mov dword [eax + 0x40], edx
mov edx, dword [ebp - 4]
mov eax, dword [esi]
push edx
push ecx
push 0xffffffffffffffff
push edi
push eax
call fcn.004a51d0
mov ecx, dword [ebp + 8]
mov ebx, eax
push edi
mov eax, dword [ecx]
dec dword [eax + 0x40]
call fcn.0046f4b0
add esp, 0x1c
test ebx, ebx
je 0x507c17
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x507c17
mov edx, dword [esi]
push edx
call fcn.004d6e30
push eax
push 0x8b4ff8
call fcn.004711e0
add esp, 0xc
mov dword [edi], eax
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax]
push eax
mov dword [ecx], eax
call fcn.00482d90
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret