Function at 0x10197680
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 4], 0
mov ebx, ecx
mov dword [ebp - 0x10], edi
mov eax, dword [edi + 4]
mov ecx, dword [ebx]
mov esi, dword [edi + 8]
lea edx, [eax - 1]
mov dword [ebp - 0x24], edx
test eax, eax
je 0x10197a6d
push dword [edi]
push dword [ecx + 8]
push dword [ecx + 4]
push str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d
call fcn.100e2630
push eax
lea edx, [ebp - 4]
mov ecx, ebx
call fcn.10190400
add esp, 0x14
cmp dword [ebx + 0x24], 0
mov eax, dword [ebp - 4]
jne 0x10197a5b
push eax
call fcn.101066b0
add esp, 4
cmp eax, 0x64
jne 0x10197a58
push 1
push dword [ebp - 4]
call fcn.10106cb0
push 1
push dword [ebp - 4]
mov dword [ebp - 0x20], eax
call fcn.10107120
push 2
push dword [ebp - 4]
mov dword [ebp - 0x18], eax
call fcn.10106f50
push 3
push dword [ebp - 4]
mov dword [ebp - 0xc], eax
call fcn.10106f50
mov edx, dword [ebp - 0xc]
add esp, 0x20
mov dword [ebp - 0x2c], eax
cmp edx, dword [edi + 4]
jl 0x101976cd
mov eax, dword [edi]
xor edi, edi
cdq
mov ecx, eax
mov eax, dword [ebp - 0xc]
shl ecx, 5
cdq
add edi, eax
adc ecx, edx
push ecx
push edi
mov ecx, ebx
call fcn.101902b0
add esp, 8
mov dword [ebp - 8], eax
test eax, eax
je 0x10197a58
mov edi, dword [eax + 8]
cmp edi, dword [eax + 4]
jg 0x10197a48
jl 0x1019776e
mov dword [ebx + 0x24], 0x10b
jmp 0x10197840
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
lea ecx, [ecx + edi]
call fcn.101a0e60
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 0x1019782c
cmp eax, edi
jge 0x1019782c
lea ecx, [edx + eax]
lea edx, [ebp - 0x1c]
call fcn.101a0e60
mov ecx, dword [ebp - 0x20]
mov edi, eax
add edi, dword [ebp - 0x14]
mov edx, ecx
mov eax, dword [ebp - 0x1c]
cmp eax, ecx
cmovl edx, eax
test edx, edx
je 0x10197826
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
add ecx, edi
mov edi, dword [ebp - 0x18]
sub edx, 4
jb 0x101977e1
nop
mov eax, dword [ecx]
cmp eax, dword [edi]
jne 0x101977e6
add ecx, 4
add edi, 4
sub edx, 4
jae 0x101977d0
cmp edx, 0xfffffffc
je 0x1019781a
mov al, byte [ecx]
cmp al, byte [edi]
jne 0x10197813
cmp edx, 0xfffffffd
je 0x1019781a
mov al, byte [ecx + 1]
cmp al, byte [edi + 1]
jne 0x10197813
cmp edx, 0xfffffffe
je 0x1019781a
mov al, byte [ecx + 2]
cmp al, byte [edi + 2]
jne 0x10197813
cmp edx, 0xffffffff
je 0x1019781a
mov al, byte [ecx + 3]
cmp al, byte [edi + 3]
je 0x1019781a
sbb eax, eax
or eax, 1
jmp 0x1019781c
xor eax, eax
test eax, eax
jne 0x1019782a
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
sub eax, ecx
test eax, eax
jns 0x10197833
mov dword [ebx + 0x24], 0x10b
mov edx, dword [ebp - 8]
mov ecx, ebx
call fcn.10197420
mov eax, dword [ebp - 8]
push eax
call fcn.100dfd40
add esp, 4
cmp dword [ebx + 0x24], 0
jne 0x10197a58
mov ecx, dword [ebp - 0x24]
xor eax, eax
mov edx, dword [ebp - 0xc]
inc ecx
dec edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x24], edx
cmp ecx, edx
jg 0x101978e1
mov eax, dword [ebp - 0x10]
xor edi, edi
mov eax, dword [eax]
cdq
mov ecx, eax
mov eax, dword [ebp - 8]
shl ecx, 5
cdq
add edi, eax
adc ecx, edx
push ecx
push edi
mov ecx, ebx
call fcn.101902b0
mov edi, eax
add esp, 8
test edi, edi
je 0x101978c7
mov ecx, dword [edi + 8]
cmp ecx, dword [edi + 4]
jge 0x1019789d
mov dword [ebx + 0x24], 0x10b
lea eax, [esi + 1]
cmp dword [ebp - 8], eax
jl 0x101978c7
mov edx, dword [edi]
mov eax, 0x100
movzx ecx, byte [edx]
imul ecx, eax
movzx eax, byte [edx + 1]
add cx, ax
xor eax, eax
cmp ax, cx
je 0x101978c7
mov dword [ebx + 0x24], 0x10b
push edi
call fcn.100dfd40
mov ecx, dword [ebp - 8]
add esp, 4
mov eax, dword [ebx + 0x24]
inc ecx
mov edx, dword [ebp - 0x24]
mov dword [ebp - 8], ecx
test eax, eax
je 0x10197863
test eax, eax
jne 0x10197a58
cmp dword [ebp - 0x2c], eax
je 0x10197a37
mov eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, dword [ebp - 0xc]
xor esi, esi
push ecx
mov edi, ecx
mov ecx, ebx
mov eax, dword [eax]
push eax
mov dword [ebp - 0x2c], eax
call fcn.10191450
add esp, 8
mov dword [ebp - 8], eax
mov edx, eax
mov ecx, ebx
call fcn.10191240
test eax, eax
jne 0x10197a21
mov eax, dword [ebp - 0x2c]
cdq
mov ecx, eax
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x18], ecx
nop
mov eax, dword [ebp - 8]
lea esi, [edi + 1]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x20], eax
cmp esi, eax
jge 0x1019799d
shl ecx, 5
mov dword [ebp - 0x24], ecx
mov eax, esi
cdq
add eax, 0
adc edx, ecx
mov ecx, ebx
push edx
push eax
call fcn.101902b0
add esp, 8
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x10197989
mov edi, dword [eax]
mov eax, 0x100
movzx edx, byte [edi]
imul edx, eax
movzx eax, byte [edi + 1]
add dx, ax
je 0x1019797e
mov dword [ebx + 0x24], 0x10b
push dword [ebp - 0x2c]
call fcn.100dfd40
add esp, 4
mov eax, dword [ebp - 8]
inc esi
mov ecx, dword [ebp - 0x24]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x20], eax
cmp esi, eax
jl 0x10197946
mov ecx, dword [ebp - 0x18]
shl ecx, 5
xor edi, edi
cdq
add edi, eax
adc ecx, edx
push ecx
push edi
mov ecx, ebx
call fcn.101902b0
mov edi, eax
add esp, 8
test edi, edi
je 0x101979fa
mov eax, dword [edi]
movzx edx, byte [eax]
movzx ecx, byte [eax + 1]
shl edx, 8
add edx, ecx
cmp edx, dword [edi + 8]
jge 0x101979ea
lea ecx, [eax + edx]
lea edx, [ebp - 0x38]
call fcn.100e3fa0
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x38]
cmp eax, dword [ecx + 0x20]
jne 0x101979ea
mov eax, dword [ebp - 0x34]
cmp eax, dword [ecx + 0x24]
je 0x101979f1
mov dword [ebx + 0x24], 0x10b
push edi
call fcn.100dfd40
add esp, 4
mov edx, dword [ebp - 8]
mov ecx, ebx
push 0
call fcn.10191190
mov edx, dword [ebp - 8]
add esp, 4
mov ecx, ebx
call fcn.10191240
mov edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
test eax, eax
je 0x10197930
mov ecx, dword [ebp - 8]
call fcn.101913d0
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
jmp 0x101976cd
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x24], eax
mov esi, dword [edi + 8]
jmp 0x101976cd
push eax
mov dword [ebx + 0x24], 0x10b
call fcn.100dfd40
add esp, 4
mov eax, dword [ebp - 4]
push eax
call fcn.101057b0
add esp, 4
cmp dword [ebx + 0x24], 0
jne 0x10197a6d
mov dword [ebx + 0x24], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret