Function at 0x100ee170
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
xor eax, eax
cmp dword [ecx + 0x4c], 5
mov dword [ebp - 0x28], ecx
sete al
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], eax
mov eax, dword [edx + 4]
lea esi, [eax - 1]
mov dword [ebp - 0x24], esi
mov esi, dword [edx + 8]
mov dword [ebp - 0x1c], esi
test eax, eax
je 0x100ee627
mov edx, dword [edx]
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 4]
push edx
push eax
push ecx
push str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d_ORDER_BY_1__2
call sym.MyService.dll_sqlite3_mprintf
add esp, 0x10
cmp dword [edi + 0x2c], 0
mov esi, eax
jne 0x100ee1fb
test esi, esi
je 0x100ee1f4
mov edx, dword [edi]
mov eax, dword [edx]
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0x85
push 0xffffffffffffffff
push esi
push eax
call fcn.10074b10
add esp, 0x1c
mov dword [edi + 0x2c], eax
jmp 0x100ee1fb
mov dword [edi + 0x2c], 7
push esi
call sym.MyService.dll_sqlite3_free
add esp, 4
cmp dword [edi + 0x2c], 0
jne 0x100ee612
mov edi, edi
mov edx, dword [ebp - 0x18]
push edx
call sym.MyService.dll_sqlite3_step
add esp, 4
cmp eax, 0x64
jne 0x100ee612
mov esi, dword [ebp - 0x18]
test esi, esi
je 0x100ee268
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100ee23f
push eax
call dword [0x1012c438]
add esp, 4
mov eax, dword [esi + 0x78]
test eax, eax
je 0x100ee259
mov ecx, 1
cmp cx, word [esi + 0x90]
jae 0x100ee259
add eax, 0x28
jmp 0x100ee26d
mov ebx, dword [esi]
mov eax, 0x19
mov dword [ebx + 0x40], eax
call fcn.1000e000
mov eax, 0x10113968
push eax
call sym.MyService.dll_sqlite3_value_blob
add esp, 4
mov dword [ebp - 0x2c], eax
test esi, esi
je 0x100ee2ab
mov eax, dword [esi]
cmp byte [eax + 0x57], 0
mov ecx, dword [esi + 0x24]
jne 0x100ee290
test ecx, ecx
jne 0x100ee290
xor eax, eax
jmp 0x100ee295
call fcn.1000afb0
mov edx, dword [esi]
mov dword [esi + 0x24], eax
mov eax, dword [edx + 0xc]
test eax, eax
je 0x100ee2ab
push eax
call dword [0x1012c440]
add esp, 4
push 1
push esi
call sym.MyService.dll_sqlite3_column_bytes
push 2
push esi
mov dword [ebp - 4], eax
call sym.MyService.dll_sqlite3_column_int
mov ebx, eax
push 3
push esi
mov dword [ebp - 0x14], ebx
call sym.MyService.dll_sqlite3_column_int
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0xc]
add esp, 0x18
cmp ebx, dword [eax + 4]
jl 0x100ee5f6
mov ebx, eax
mov eax, dword [ebx]
cdq
mov ecx, eax
mov eax, dword [ebp - 0x14]
cdq
shl ecx, 5
xor esi, esi
add esi, eax
adc ecx, edx
push ecx
push esi
push edi
call fcn.100e2e20
add esp, 0xc
mov dword [ebp - 0x10], eax
test eax, eax
je 0x100ee612
mov ecx, dword [eax + 4]
cmp ecx, 4
jl 0x100ee602
mov edx, dword [eax + 8]
cmp ecx, edx
jl 0x100ee602
jg 0x100ee348
cmp dword [ebp - 4], 0
jne 0x100ee33c
mov esi, dword [ebp - 0x28]
cmp dword [esi + 0x4c], 5
jne 0x100ee33c
cmp ecx, edx
jne 0x100ee33c
cmp ecx, 4
je 0x100ee447
mov dword [edi + 0x2c], 0x10b
jmp 0x100ee447
mov eax, dword [ebp - 0x10]
mov ebx, dword [eax]
mov eax, dword [eax + 8]
lea ecx, [ebx + eax]
lea esi, [ebp - 8]
call fcn.100f8220
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
mov edx, 0x100
imul cx, dx
add cx, ax
movzx ecx, cx
cmp ecx, dword [ebp - 8]
jge 0x100ee42d
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
cmp dword [ebp - 8], eax
jge 0x100ee42d
mov eax, dword [ebp - 8]
lea ecx, [ebx + eax]
lea esi, [ebp - 0xc]
call fcn.100f8220
mov ecx, dword [ebp - 4]
add eax, dword [ebp - 8]
cmp dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0xc]
mov edx, ecx
jl 0x100ee3aa
mov edx, dword [ebp - 4]
test edx, edx
jle 0x100ee423
mov edx, dword [ebp - 4]
cmp ecx, edx
jl 0x100ee3b7
mov ecx, edx
mov edx, dword [ebp - 0x2c]
lea esi, [ebx + eax]
cmp ecx, 4
jb 0x100ee3d6
mov eax, dword [esi]
cmp eax, dword [edx]
jne 0x100ee3da
sub ecx, 4
add edx, 4
add esi, 4
cmp ecx, 4
jae 0x100ee3c2
test ecx, ecx
je 0x100ee41d
movzx eax, byte [esi]
movzx ebx, byte [edx]
sub eax, ebx
jne 0x100ee415
cmp ecx, 1
jbe 0x100ee41d
movzx eax, byte [esi + 1]
movzx ebx, byte [edx + 1]
sub eax, ebx
jne 0x100ee415
cmp ecx, 2
jbe 0x100ee41d
movzx eax, byte [esi + 2]
movzx ebx, byte [edx + 2]
sub eax, ebx
jne 0x100ee415
cmp ecx, 3
jbe 0x100ee41d
movzx eax, byte [esi + 3]
movzx ecx, byte [edx + 3]
sub eax, ecx
sar eax, 0x1f
or eax, 1
jmp 0x100ee41f
xor eax, eax
test eax, eax
jne 0x100ee42b
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
test eax, eax
jns 0x100ee434
mov dword [edi + 0x2c], 0x10b
mov edx, dword [ebp - 0x10]
push edx
push edi
call fcn.100edf10
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
add esp, 8
push eax
call sym.MyService.dll_sqlite3_free
add esp, 4
cmp dword [edi + 0x2c], 0
jne 0x100ee612
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
dec eax
push eax
mov eax, dword [ebp - 0x24]
inc ecx
push ecx
push ebx
inc eax
push edi
call fcn.100edcc0
add esp, 0x10
cmp dword [edi + 0x2c], 0
jne 0x100ee612
cmp dword [ebp - 0x30], 0
je 0x100ee5ea
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebx]
push ecx
push eax
xor ebx, ebx
push ebx
push edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x30], eax
call fcn.100e4b00
mov esi, eax
add esp, 0x10
mov ecx, esi
mov eax, edi
call fcn.100e47e0
test eax, eax
jne 0x100ee5db
mov eax, dword [ebp - 0x30]
cdq
shl eax, 5
mov dword [ebp - 0x34], eax
lea esp, [esp]
mov ebx, dword [ebp - 0x1c]
inc ebx
mov dword [ebp - 0x1c], ebx
cmp ebx, dword [esi + 0x18]
jge 0x100ee51e
lea esp, [esp]
mov eax, ebx
cdq
mov ecx, eax
xor eax, eax
add ecx, eax
adc edx, dword [ebp - 0x34]
push edx
push ecx
push edi
call fcn.100e2e20
add esp, 0xc
test eax, eax
je 0x100ee515
mov ecx, dword [eax]
movzx edx, byte [ecx]
movzx ecx, byte [ecx + 1]
mov ebx, 0x100
imul dx, bx
add dx, cx
je 0x100ee509
mov dword [edi + 0x2c], 0x10b
push eax
call sym.MyService.dll_sqlite3_free
mov ebx, dword [ebp - 0x1c]
add esp, 4
inc ebx
mov dword [ebp - 0x1c], ebx
cmp ebx, dword [esi + 0x18]
jl 0x100ee4d0
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x1c], eax
cdq
mov ecx, eax
xor eax, eax
add ecx, eax
adc edx, dword [ebp - 0x34]
push edx
push ecx
push edi
call fcn.100e2e20
add esp, 0xc
mov dword [ebp - 0x10], eax
test eax, eax
je 0x100ee5be
mov edx, eax
mov eax, dword [edx]
movzx ecx, byte [eax]
mov edx, 0x100
imul cx, dx
movzx edx, byte [eax + 1]
add cx, dx
mov edx, dword [ebp - 0x10]
movzx ecx, cx
cmp ecx, dword [edx + 8]
jl 0x100ee56b
mov dword [edi + 0x2c], 0x10b
jmp 0x100ee5b2
cmp dword [ebp - 0x20], 0
je 0x100ee575
test ecx, ecx
jle 0x100ee5b2
add eax, ecx
lea edi, [ebp - 0x40]
call fcn.100f82a0
mov eax, dword [ebp - 0x3c]
cmp eax, dword [esi + 0x24]
jl 0x100ee5a1
mov ecx, dword [ebp - 0x40]
jg 0x100ee591
cmp ecx, dword [esi + 0x20]
jb 0x100ee5a1
cmp dword [ebp - 0x20], 0
jne 0x100ee5af
cmp ecx, dword [esi + 0x20]
jne 0x100ee5a1
cmp eax, dword [esi + 0x24]
je 0x100ee5af
mov eax, dword [ebp + 8]
mov dword [eax + 0x2c], 0x10b
mov edi, eax
jmp 0x100ee5b2
mov edi, dword [ebp + 8]
mov ecx, dword [ebp - 0x10]
push ecx
call sym.MyService.dll_sqlite3_free
add esp, 4
push 0
push esi
push edi
call fcn.100e4660
add esp, 0xc
mov ecx, esi
mov eax, edi
call fcn.100e47e0
test eax, eax
je 0x100ee4c0
mov edi, esi
mov dword [ebp - 0x1c], ebx
call fcn.100e4a10
mov edi, dword [ebp + 8]
jmp 0x100ee5f0
mov edx, dword [ebx + 8]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
cmp dword [edi + 0x2c], 0
je 0x100ee210
jmp 0x100ee612
push eax
mov dword [edi + 0x2c], 0x10b
call sym.MyService.dll_sqlite3_free
add esp, 4
mov ecx, dword [ebp - 0x18]
push ecx
call sym.MyService.dll_sqlite3_finalize
add esp, 4
cmp dword [edi + 0x2c], 0
jne 0x100ee627
mov dword [edi + 0x2c], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret