Function at 0x1012f1b0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
push ebx
mov ebx, edx
mov eax, ecx
push esi
push edi
xor edi, edi
mov dword [esp + 0x14], eax
lea ecx, [ebx + 7]
lea ecx, [eax + ecx*4]
mov dword [esp + 0x18], ecx
cmp dword [ecx], edi
jne 0x1012f479
mov esi, dword [eax]
mov dword [esp + 0x1c], str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_ASC
mov dword [esp + 0x20], str.SELECT__s_FROM__s_T_WHERE_T._Q_____AND_T._Q_____ORDER_BY_T._Q_DESC
mov dword [esp + 0x24], str.SELECT__s_FROM__s_T_WHERE_T._Q_
mov dword [esp + 0x28], str.INSERT_INTO__Q._q_content_VALUES__s_
mov dword [esp + 0x2c], str.REPLACE_INTO__Q._q_content_VALUES__s_
mov dword [esp + 0x30], str.DELETE_FROM__Q._q_content_WHERE_id_
mov dword [esp + 0x34], str.REPLACE_INTO__Q._q_docsize_VALUES_____s_
mov dword [esp + 0x38], str.DELETE_FROM__Q._q_docsize_WHERE_id_
mov dword [esp + 0x3c], str.SELECT_sz_s_FROM__Q._q_docsize_WHERE_id_
mov dword [esp + 0x40], str.REPLACE_INTO__Q._q_config_VALUES_____
mov dword [esp + 0x44], str.SELECT__s_FROM__s_AS_T
cmp ebx, 0xa
ja case.0x1012f23b.5
jmp dword [ebx*4 + 0x1012f498]
push dword [esi + 0x28]
push dword [esi + 0x38]
jmp 0x1012f3a0
mov eax, dword [esi + 0x2c]
push eax
push eax
push eax
push dword [esi + 0x28]
push dword [esi + 0x38]
push dword [esp + ebx*4 + 0x30]
call fcn.100294e0
add esp, 0x18
jmp 0x1012f3ac
push dword [esi + 0x2c]
push dword [esi + 0x28]
push dword [esi + 0x38]
push dword [esp + ebx*4 + 0x28]
call fcn.100294e0
add esp, 0x10
jmp 0x1012f3ac
mov edi, dword [esi + 0xc]
inc edi
call fcn.100d6670
test eax, eax
jne 0x1012f3b2
lea eax, [edi*2 + 1]
cdq
push edx
push eax
call fcn.100267c0
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x1012f3b2
xor eax, eax
mov edx, ecx
mov dword [esp + 0x10], edx
test edi, edi
jle 0x1012f2cc
mov dword [esp + 0x10], ecx
mov word [ecx + eax*2], 0x2c3f
inc eax
cmp eax, edi
jl 0x1012f2c1
push edx
mov byte [edx + eax*2 - 1], 0
push dword [esi + 8]
push dword [esi + 4]
push dword [esp + ebx*4 + 0x28]
call fcn.100294e0
add esp, 0x10
mov edi, eax
cmp dword [0x10177b48], 0
je 0x1012f341
mov eax, dword [0x1017ad00]
test eax, eax
je 0x1012f302
push eax
call dword [0x10177b98]
add esp, 4
push dword [esp + 0x10]
call dword [0x10177b74]
sub dword [0x1017ab88], eax
add esp, 4
dec dword [0x1017abac]
push dword [esp + 0x10]
call dword [0x10177b6c]
mov eax, dword [0x1017ad00]
add esp, 4
test eax, eax
je 0x1012f3ae
push eax
call dword [0x10177ba0]
add esp, 4
jmp 0x1012f3ae
push dword [esp + 0x10]
call dword [0x10177b6c]
add esp, 4
jmp 0x1012f3ae
cmp dword [esi + 0x24], edi
mov ecx, 0x10166843
mov eax, 0x1017124c
cmove eax, ecx
push eax
push dword [esi + 8]
push dword [esi + 4]
push dword [esp + ebx*4 + 0x28]
call fcn.100294e0
add esp, 0x10
jmp 0x1012f3ac
push dword [esi + 8]
cmp dword [esi + 0x24], edi
mov ecx, 0x10166843
push dword [esi + 4]
mov eax, str._origin
cmove eax, ecx
push eax
push dword [esp + ebx*4 + 0x28]
call fcn.100294e0
add esp, 0x10
jmp 0x1012f3ac
push dword [esi + 8]
push dword [esi + 4]
push dword [esp + ebx*4 + 0x24]
call fcn.100294e0
add esp, 0xc
mov edi, eax
test edi, edi
jne 0x1012f3bc
mov edi, 7
jmp 0x1012f479
mov eax, dword [esp + 0x14]
mov edx, edi
push 0
push dword [esp + 0x1c]
mov eax, dword [eax]
push 0
inc dword [eax + 0x44]
xor eax, eax
mov ecx, dword [esi]
cmp ebx, 2
setg al
lea eax, [eax*4 + 0x81]
push eax
push 0xffffffffffffffff
call fcn.1009d7f0
mov dword [esp + 0x24], eax
add esp, 0x14
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
dec dword [ecx + 0x44]
cmp dword [0x10177b48], 0
je 0x1012f446
mov eax, dword [0x1017ad00]
test eax, eax
je 0x1012f414
push eax
call dword [0x10177b98]
add esp, 4
push edi
call dword [0x10177b74]
sub dword [0x1017ab88], eax
add esp, 4
dec dword [0x1017abac]
push edi
call dword [0x10177b6c]
mov eax, dword [0x1017ad00]
add esp, 4
test eax, eax
je 0x1012f450
push eax
call dword [0x10177ba0]
jmp 0x1012f44d
push edi
call dword [0x10177b6c]
add esp, 4
mov edi, dword [esp + 0x10]
test edi, edi
je 0x1012f479
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x1012f479
push dword [esi]
call fcn.100d8de0
add esp, 4
push eax
push 0x101689bc
call fcn.100294e0
add esp, 8
mov dword [ebx], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
push ecx
mov dword [eax], ecx
call fcn.10053c90
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret