Function at 0x60958b44
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push edi
push esi
push ebx
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp + 0x20]
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
xor esi, esi
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 8]
or eax, dword [ebp - 4]
jne 0x60958b88
mov edx, dword [ebp + 0x2c]
mov dword [ebp - 0x1c], edx
add esp, 0xfffffff4
mov eax, dword [ebp - 0x1c]
add eax, 0x48
push eax
call sym.sqlite3.dll_sqlite3_malloc
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60958bac
mov eax, 7
jmp 0x60958cf3
mov edi, ebx
mov eax, esi
cld
mov ecx, 0x12
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], edx
mov eax, dword [ebp + 0xc]
mov dword [ebx], eax
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
mov dword [ebx + 0x10], edx
mov dword [ebx + 0x14], ecx
cmp dword [ebp - 0x1c], 0
je 0x60958bfc
lea eax, [ebx + 0x48]
mov dword [ebx + 0x1c], eax
mov ecx, dword [ebp + 0x2c]
mov dword [ebx + 0x20], ecx
add esp, 0xfffffffc
push ecx
push dword [ebp + 0x28]
push eax
call sym._memcpy
add esp, 0x10
jmp 0x60958cca
mov eax, dword [ebp + 8]
cmp dword [eax + 0x6c], 0
jne 0x60958c25
add esp, 0xfffffffc
push dword [eax + 0x14]
push dword [eax + 0x10]
push 0x60958af0
call sym.sqlite3.dll_sqlite3_mprintf
mov edx, dword [ebp + 8]
mov dword [edx + 0x6c], eax
add esp, 0x10
test eax, eax
je 0x60958c52
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x70]
test edx, edx
jne 0x60958c90
mov eax, dword [ecx + 0x74]
cmp eax, dword [ecx + 0x78]
jne 0x60958c65
lea esi, [eax + 0x10]
add esp, 0xfffffff8
mov eax, esi
shl eax, 2
push eax
push dword [ecx + 0x7c]
call sym.sqlite3.dll_sqlite3_realloc
add esp, 0x10
test eax, eax
jne 0x60958c5c
mov esi, 7
jmp 0x60958ce4
mov edx, dword [ebp + 8]
mov dword [edx + 0x78], esi
mov dword [edx + 0x7c], eax
add esp, 0xfffffff4
push 0
lea eax, [ebx + 0x18]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp + 8]
push dword [ecx + 0x6c]
push dword [ecx + 0xc]
call sym.sqlite3.dll_sqlite3_prepare_v2
mov esi, eax
add esp, 0x20
test esi, esi
jne 0x60958ce4
mov eax, dword [ebp + 8]
inc dword [eax + 0x74]
jmp 0x60958ca3
lea eax, [edx - 1]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x70], eax
mov eax, dword [ecx + 0x7c]
mov eax, dword [eax + edx*4 - 4]
mov dword [ebx + 0x18], eax
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 4]
push ecx
push edx
push 1
push dword [ebx + 0x18]
call sym.sqlite3.dll_sqlite3_bind_int64
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
push edx
push eax
push 2
push dword [ebx + 0x18]
call sym.sqlite3.dll_sqlite3_bind_int64
add esp, 0x20
add esp, 0xfffffff4
push ebx
call sym._fts3SegReaderNext
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x60958ce4
mov eax, dword [ebp + 0x30]
mov dword [eax], ebx
jmp 0x60958cf1
add esp, 0xfffffff8
push ebx
mov edx, dword [ebp + 8]
push edx
call sym._sqlite3Fts3SegReaderFree
mov eax, esi
lea esp, [ebp - 0x38]
pop ebx
pop esi
pop edi
leave
ret