Function at 0x101da520
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov ecx, dword [ebx]
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 4]
lea edx, [eax - 1]
mov dword [ebp - 0x20], edx
mov edx, dword [esi + 8]
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], edx
test eax, eax
je 0x101da902
mov eax, dword [esi]
mov edx, dword [ecx + 8]
push eax
mov eax, dword [ecx + 4]
push edx
push eax
push str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d_ORDER_BY_1__2
call sym.SQLite.Interop.dll_sqlite3_mprintf
add esp, 0x10
cmp dword [ebx + 0x24], 0
mov edi, eax
jne 0x101da598
test edi, edi
je 0x101da591
mov ecx, dword [ebx]
mov eax, dword [ecx]
push 0
lea edx, [ebp - 4]
push edx
push 0
push 0x85
push 0xffffffffffffffff
push edi
push eax
call fcn.101fbc70
add esp, 0x1c
mov dword [ebx + 0x24], eax
jmp 0x101da598
mov dword [ebx + 0x24], 7
push edi
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
cmp dword [ebx + 0x24], 0
jne 0x101da8ed
jmp 0x101da5b0
mov eax, dword [ebp - 4]
push eax
call sym.SQLite.Interop.dll_sqlite3_step
add esp, 4
cmp eax, 0x64
jne 0x101da8ed
mov ecx, dword [ebp - 4]
push 1
push ecx
call sym.SQLite.Interop.dll_sqlite3_column_blob
mov edx, dword [ebp - 4]
push 1
push edx
mov dword [ebp - 0x24], eax
call sym.SQLite.Interop.dll_sqlite3_column_bytes
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
push 2
push eax
call sym.SQLite.Interop.dll_sqlite3_column_int
mov ecx, dword [ebp - 4]
mov edi, eax
push 3
push ecx
mov dword [ebp - 0x1c], edi
call sym.SQLite.Interop.dll_sqlite3_column_int
add esp, 0x20
mov dword [ebp - 0x28], eax
cmp edi, dword [esi + 4]
jl 0x101da8d1
mov eax, dword [esi]
cdq
mov ecx, eax
mov eax, edi
cdq
shl ecx, 5
xor esi, esi
add esi, eax
adc ecx, edx
push ecx
push esi
push ebx
call fcn.101cc600
add esp, 0xc
mov dword [ebp - 8], eax
test eax, eax
je 0x101da8ed
mov edx, dword [eax + 4]
cmp edx, 4
jl 0x101da8dd
mov ecx, dword [eax + 8]
cmp edx, ecx
jl 0x101da8dd
jg 0x101da657
mov dword [ebx + 0x24], 0x10b
jmp 0x101da74a
mov edi, dword [eax]
add ecx, edi
lea esi, [ebp - 0x10]
call fcn.10114f40
movzx edx, byte [edi]
movzx ecx, byte [edi + 1]
mov eax, 0x100
imul dx, ax
mov eax, dword [ebp - 0x10]
add dx, cx
movzx edx, dx
cmp edx, eax
jge 0x101da730
mov ecx, dword [ebp - 8]
cmp eax, dword [ecx + 8]
jge 0x101da730
lea ecx, [edi + eax]
lea esi, [ebp - 0x18]
call fcn.10114f40
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
add eax, dword [ebp - 0x10]
mov esi, ecx
cmp ecx, edx
jl 0x101da6ac
mov esi, edx
test esi, esi
je 0x101da728
cmp ecx, edx
jl 0x101da6b6
mov ecx, edx
mov edx, dword [ebp - 0x24]
lea esi, [edi + eax]
cmp ecx, 4
jb 0x101da6d5
mov eax, dword [esi]
cmp eax, dword [edx]
jne 0x101da6d9
sub ecx, 4
add edx, 4
add esi, 4
cmp ecx, 4
jae 0x101da6c1
test ecx, ecx
je 0x101da71c
movzx eax, byte [esi]
movzx edi, byte [edx]
sub eax, edi
jne 0x101da714
cmp ecx, 1
jbe 0x101da71c
movzx eax, byte [esi + 1]
movzx edi, byte [edx + 1]
sub eax, edi
jne 0x101da714
cmp ecx, 2
jbe 0x101da71c
movzx eax, byte [esi + 2]
movzx edi, byte [edx + 2]
sub eax, edi
jne 0x101da714
cmp ecx, 3
jbe 0x101da71c
movzx eax, byte [esi + 3]
movzx ecx, byte [edx + 3]
sub eax, ecx
sar eax, 0x1f
or eax, 1
jmp 0x101da71e
xor eax, eax
test eax, eax
jne 0x101da72e
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
sub ecx, edx
mov eax, ecx
test eax, eax
jns 0x101da737
mov dword [ebx + 0x24], 0x10b
mov edx, dword [ebp - 8]
push edx
push ebx
call fcn.10137e00
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 8]
add esp, 8
push eax
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
cmp dword [ebx + 0x24], 0
jne 0x101da8ed
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebp + 8]
lea eax, [edi - 1]
push eax
mov eax, dword [ebp - 0x20]
inc ecx
push ecx
push esi
inc eax
push ebx
call fcn.101d1090
add esp, 0x10
cmp dword [ebx + 0x24], 0
jne 0x101da8ed
cmp dword [ebp - 0x28], 0
je 0x101da8c5
mov esi, dword [esi]
push edi
push esi
push 0
push ebx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], 0
call fcn.101d53e0
mov edi, eax
add esp, 0x10
mov ecx, edi
mov eax, ebx
mov dword [ebp - 8], edi
call fcn.10116ca0
test eax, eax
jne 0x101da8b5
mov eax, esi
cdq
shl eax, 5
mov dword [ebp - 0x2c], eax
mov esi, dword [ebp - 0x14]
inc esi
mov dword [ebp - 0xc], esi
cmp esi, dword [edi + 0x18]
jge 0x101da81e
nop
mov eax, esi
cdq
mov ecx, eax
xor eax, eax
add ecx, eax
adc edx, dword [ebp - 0x2c]
push edx
push ecx
push ebx
call fcn.101cc600
add esp, 0xc
test eax, eax
je 0x101da815
mov ecx, dword [eax]
movzx edx, byte [ecx]
movzx ecx, byte [ecx + 1]
mov edi, 0x100
imul dx, di
add dx, cx
je 0x101da809
mov dword [ebx + 0x24], 0x10b
push eax
call sym.SQLite.Interop.dll_sqlite3_free
mov edi, dword [ebp - 8]
add esp, 4
inc esi
cmp esi, dword [edi + 0x18]
jl 0x101da7d0
mov dword [ebp - 0xc], esi
mov edi, dword [edi + 0x18]
mov eax, edi
cdq
mov ecx, eax
xor eax, eax
add ecx, eax
adc edx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], edi
push edx
push ecx
push ebx
call fcn.101cc600
mov esi, eax
add esp, 0xc
test esi, esi
je 0x101da892
mov eax, dword [esi]
movzx edx, byte [eax]
mov ecx, 0x100
imul dx, cx
movzx ecx, byte [eax + 1]
add dx, cx
movzx ecx, dx
cmp ecx, dword [esi + 8]
jl 0x101da863
mov edi, dword [ebp - 8]
jmp 0x101da880
add eax, ecx
lea edi, [ebp - 0x38]
call fcn.10114dc0
mov edx, dword [ebp - 0x38]
mov edi, dword [ebp - 8]
cmp edx, dword [edi + 0x20]
jne 0x101da880
mov eax, dword [ebp - 0x34]
cmp eax, dword [edi + 0x24]
je 0x101da887
mov dword [ebx + 0x24], 0x10b
push esi
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
jmp 0x101da895
mov edi, dword [ebp - 8]
push 0
push edi
push ebx
call fcn.101d1aa0
add esp, 0xc
mov ecx, edi
mov eax, ebx
call fcn.10116ca0
mov edi, dword [ebp - 8]
test eax, eax
je 0x101da7c3
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0xc], ecx
call fcn.10138ac0
mov edi, dword [ebp - 0x1c]
jmp 0x101da8cb
mov edx, dword [esi + 8]
mov dword [ebp - 0xc], edx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x20], edi
cmp dword [ebx + 0x24], 0
je 0x101da5b0
jmp 0x101da8ed
push eax
mov dword [ebx + 0x24], 0x10b
call sym.SQLite.Interop.dll_sqlite3_free
add esp, 4
mov eax, dword [ebp - 4]
push eax
call sym.SQLite.Interop.dll_sqlite3_finalize
add esp, 4
cmp dword [ebx + 0x24], 0
jne 0x101da902
mov dword [ebx + 0x24], eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret