Function at 0x100299d0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
mov ebx, edx
mov dword [ebp - 4], 0
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x20], ebx
mov eax, dword [ebx + 4]
mov esi, dword [ebx + 8]
mov dword [ebp - 0xc], edi
mov ecx, dword [edi]
lea edx, [eax - 1]
mov dword [ebp - 0x24], edx
test eax, eax
je 0x10029d92
push dword [ebx]
push dword [ecx + 8]
push dword [ecx + 4]
push str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d_ORDER_BY_1__2
call sym.SQLite.Interop.dll_SI1c7a7970970b9619
add esp, 0x10
mov ebx, eax
cmp dword [edi + 0x24], 0
jne 0x10029a4a
test ebx, ebx
je 0x10029a43
mov ecx, dword [edi]
lea eax, [ebp - 4]
push 0
push eax
push 0
mov ecx, dword [ecx]
mov edx, ebx
push 0x85
push 0xffffffffffffffff
call fcn.100a7a30
add esp, 0x14
mov dword [edi + 0x24], eax
jmp 0x10029a4a
mov dword [edi + 0x24], 7
push ebx
call sym.SQLite.Interop.dll_SIfc350ae509dc2b53
add esp, 4
cmp dword [edi + 0x24], 0
jne 0x10029d7e
nop dword [eax]
mov ebx, dword [ebp - 4]
push ebx
call sym.SQLite.Interop.dll_SI9c6d7cd7b7d38055
add esp, 4
cmp eax, 0x64
jne 0x10029d7e
push 1
push ebx
call sym.SQLite.Interop.dll_SIbc9b0b73a965892b
push 1
push dword [ebp - 4]
mov ebx, eax
call sym.SQLite.Interop.dll_SId99ac2a61d035e11
push 2
push dword [ebp - 4]
mov dword [ebp - 0x1c], eax
call sym.SQLite.Interop.dll_SIbff6307869d58daf
push 3
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
call sym.SQLite.Interop.dll_SIbff6307869d58daf
mov ecx, dword [ebp - 0x20]
add esp, 0x20
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x10]
cmp eax, dword [ecx + 4]
jl 0x10029d62
mov eax, dword [ecx]
xor edi, edi
cdq
mov ecx, eax
mov eax, dword [ebp - 0x10]
shl ecx, 5
cdq
add edi, eax
adc ecx, edx
push ecx
push edi
mov edi, dword [ebp - 0xc]
mov ecx, edi
call fcn.10033470
mov edx, eax
add esp, 8
mov dword [ebp - 8], edx
test edx, edx
je 0x10029d7e
mov ecx, dword [edx + 4]
cmp ecx, 4
jl 0x10029d6e
mov eax, dword [edx + 8]
cmp eax, ecx
jg 0x10029d6e
cmp ecx, eax
jg 0x10029b0d
mov dword [edi + 0x24], 0x10b
jmp 0x10029be0
mov ecx, dword [edx]
lea edx, [ebp - 0x14]
add ecx, eax
call fcn.10020290
mov eax, dword [ebp - 8]
mov edx, dword [eax]
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
add ecx, eax
mov eax, dword [ebp - 0x14]
cmp ecx, eax
jge 0x10029bcc
mov ecx, dword [ebp - 8]
cmp eax, dword [ecx + 8]
jge 0x10029bcc
lea ecx, [edx + eax]
lea edx, [ebp - 0x18]
call fcn.10020290
add eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov edx, ecx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x18]
cmp eax, ecx
cmovl edx, eax
test edx, edx
jle 0x10029bc6
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
add ecx, dword [ebp - 0x28]
sub edx, 4
jb 0x10029b81
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x10029b86
add ecx, 4
add ebx, 4
sub edx, 4
jae 0x10029b70
cmp edx, 0xfffffffc
je 0x10029bba
mov al, byte [ecx]
cmp al, byte [ebx]
jne 0x10029bb3
cmp edx, 0xfffffffd
je 0x10029bba
mov al, byte [ecx + 1]
cmp al, byte [ebx + 1]
jne 0x10029bb3
cmp edx, 0xfffffffe
je 0x10029bba
mov al, byte [ecx + 2]
cmp al, byte [ebx + 2]
jne 0x10029bb3
cmp edx, 0xffffffff
je 0x10029bba
mov al, byte [ecx + 3]
cmp al, byte [ebx + 3]
je 0x10029bba
sbb eax, eax
or eax, 1
jmp 0x10029bbc
xor eax, eax
test eax, eax
jne 0x10029bca
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
sub eax, ecx
test eax, eax
jns 0x10029bd3
mov dword [edi + 0x24], 0x10b
mov edx, dword [ebp - 8]
mov ecx, edi
call fcn.10029da0
mov edx, dword [ebp - 8]
push edx
call sym.SQLite.Interop.dll_SIfc350ae509dc2b53
add esp, 4
cmp dword [edi + 0x24], 0
jne 0x10029d7e
mov ebx, dword [ebp - 0x10]
inc esi
mov ecx, edi
lea eax, [ebx - 1]
push eax
mov eax, dword [ebp - 0x24]
push esi
mov esi, dword [ebp - 0x20]
inc eax
push eax
mov edx, esi
call fcn.10029fe0
add esp, 0xc
cmp dword [edi + 0x24], 0
jne 0x10029d7e
cmp dword [ebp - 0x2c], 0
je 0x10029d5c
mov eax, dword [esi]
xor edx, edx
push ebx
push eax
mov ecx, edi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x2c], eax
xor esi, esi
call fcn.10031990
mov ebx, eax
add esp, 8
mov edx, ebx
mov dword [ebp - 0x28], ebx
mov ecx, edi
call fcn.10031e20
test eax, eax
jne 0x10029d50
mov eax, dword [ebp - 0x2c]
cdq
mov ecx, eax
shl ecx, 5
mov dword [ebp - 8], ecx
nop
mov esi, dword [ebp - 0x1c]
inc esi
cmp esi, dword [ebx + 0x18]
jge 0x10029cbf
nop dword [eax]
mov eax, esi
cdq
add eax, 0
adc edx, ecx
mov ecx, edi
push edx
push eax
call fcn.10033470
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x10029cb3
mov edi, dword [ebx]
mov eax, 0x100
movzx edx, byte [edi]
imul edx, eax
movzx eax, byte [edi + 1]
mov edi, dword [ebp - 0xc]
add dx, ax
je 0x10029caa
mov dword [edi + 0x24], 0x10b
push ebx
call sym.SQLite.Interop.dll_SIfc350ae509dc2b53
add esp, 4
mov ebx, dword [ebp - 0x28]
inc esi
mov ecx, dword [ebp - 8]
cmp esi, dword [ebx + 0x18]
jl 0x10029c70
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x1c], eax
cdq
add eax, 0
adc edx, ecx
mov ecx, edi
push edx
push eax
call fcn.10033470
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
je 0x10029d2e
mov ecx, dword [eax]
mov dword [ebp - 0x2c], ecx
movzx edx, byte [ecx]
movzx ecx, byte [ecx + 1]
shl edx, 8
add edx, ecx
cmp edx, dword [eax + 8]
jl 0x10029cfd
mov dword [edi + 0x24], 0x10b
jmp 0x10029d25
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx + edx]
lea edx, [ebp - 0x38]
call fcn.10020110
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebx + 0x20]
jne 0x10029d1b
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebx + 0x24]
je 0x10029d22
mov dword [edi + 0x24], 0x10b
mov eax, dword [ebp - 0x24]
push eax
call sym.SQLite.Interop.dll_SIfc350ae509dc2b53
add esp, 4
push 0
mov edx, ebx
mov ecx, edi
call fcn.10031f20
add esp, 4
mov edx, ebx
mov ecx, edi
call fcn.10031e20
mov ecx, dword [ebp - 8]
test eax, eax
je 0x10029c60
mov ecx, ebx
call fcn.10031ad0
mov ebx, dword [ebp - 0x10]
jmp 0x10029d5f
mov esi, dword [esi + 8]
mov dword [ebp - 0x24], ebx
cmp dword [edi + 0x24], 0
je 0x10029a60
jmp 0x10029d7e
push edx
mov dword [edi + 0x24], 0x10b
call sym.SQLite.Interop.dll_SIfc350ae509dc2b53
add esp, 4
push dword [ebp - 4]
call fcn.100e6950
add esp, 4
cmp dword [edi + 0x24], 0
jne 0x10029d92
mov dword [edi + 0x24], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret