Function at 0x101206e0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x14]
and eax, 8
push edi
push 0x64
mov dword [esp + 0x24], eax
mov ebx, ecx
lea eax, [esi + 4]
mov dword [esp + 0x20], edx
push 0
push eax
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], 0
call fcn.1013ad10
mov ecx, dword [ebp + 0x10]
lea eax, [ebx + 0x44]
add esp, 0xc
mov dword [esi], ecx
cmp dword [eax], 0
jne 0x101207de
mov eax, dword [ebx]
push dword [eax + 8]
push dword [eax + 4]
push str.SELECT_pgno_FROM__q._q_idx_WHERE_segid__AND_term___ORDER_BY_term_DESC_LIMIT_1
call fcn.1002a830
add esp, 0xc
mov edi, eax
cmp dword [ebx + 0x2c], 0
jne 0x1012077c
test edi, edi
je 0x10120773
mov eax, dword [ebx]
lea ecx, [ebx + 0x44]
push 0
push ecx
push 0
mov ecx, dword [eax]
mov edx, edi
push 0x85
push 0xffffffffffffffff
call fcn.1009fe60
add esp, 0x14
mov dword [ebx + 0x2c], eax
jmp 0x10120780
mov dword [ebx + 0x2c], 7
jmp 0x101207d8
test edi, edi
je 0x101207d8
cmp dword [0x10178a38], 0
je 0x101207ce
mov eax, dword [0x1017bbe8]
test eax, eax
je 0x1012079c
push eax
call dword [0x10178a88]
add esp, 4
push edi
call dword [0x10178a64]
sub dword [0x1017ba70], eax
add esp, 4
dec dword [0x1017ba94]
push edi
call dword [0x10178a5c]
mov eax, dword [0x1017bbe8]
add esp, 4
test eax, eax
je 0x101207d8
push eax
call dword [0x10178a90]
jmp 0x101207d5
push edi
call dword [0x10178a5c]
add esp, 4
mov ecx, dword [ebp + 0x10]
lea eax, [ebx + 0x44]
cmp dword [ebx + 0x2c], 0
mov edi, dword [eax]
jne 0x10120a4b
mov eax, dword [ecx]
cdq
push edx
push eax
push 1
push edi
call fcn.10057670
add esp, 0x10
mov edx, 1
mov ecx, edi
call fcn.100571e0
test eax, eax
jne 0x1012085c
cmp dword [esp + 0x1c], eax
je 0x10120849
mov ecx, dword [edi + 0x64]
push eax
push eax
mov eax, dword [ebp + 8]
add ecx, 0x28
cdq
push edx
mov edx, dword [esp + 0x28]
push eax
call fcn.1004ef10
add esp, 0x10
mov dword [esp + 0x24], eax
test eax, eax
je 0x10120849
mov ecx, dword [edi]
mov edx, eax
mov dword [ecx + 0x40], eax
call fcn.1002b6b0
mov ecx, dword [edi]
mov edx, dword [esp + 0x24]
call fcn.10028630
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x1012085c
push eax
call dword [0x10178a90]
add esp, 4
push edi
call fcn.10055f30
add esp, 4
cmp eax, 0x64
jne 0x10120921
test edi, edi
jne 0x10120885
mov ecx, 0x10162818
call fcn.1004e6e0
mov ecx, eax
mov edx, ecx
jmp 0x10120914
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10120898
push eax
call dword [0x10178a88]
add esp, 4
mov ecx, dword [edi + 0x78]
test ecx, ecx
je 0x101208aa
xor eax, eax
cmp ax, word [edi + 0x90]
jb 0x101208c2
mov ecx, dword [edi]
mov edx, 0x19
mov dword [ecx + 0x40], 0x19
call fcn.1002b6b0
mov ecx, 0x10162818
call fcn.1004e6e0
mov esi, dword [edi]
mov ecx, eax
mov eax, dword [edi + 0x24]
mov edx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
cmp byte [esi + 0x57], 0
mov esi, dword [ebp + 0x14]
jne 0x101208e5
test eax, eax
je 0x101208f6
mov ecx, dword [edi]
mov edx, eax
call fcn.10028630
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [edi + 0x24], eax
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10120914
push eax
call dword [0x10178a90]
mov edx, dword [esp + 0x1c]
add esp, 4
mov ecx, dword [esp + 0x14]
sar ecx, 1
and edx, 1
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
push edi
call fcn.10054fa0
add esp, 4
mov dword [ebx + 0x2c], eax
mov edx, 1
mov ecx, edi
call fcn.100571e0
test eax, eax
jne 0x10120950
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x10120950
push eax
call dword [0x10178a90]
add esp, 4
mov eax, dword [ebp + 0x10]
xor edx, edx
mov ecx, ebx
mov eax, dword [eax + 4]
cmp dword [esp + 0x14], eax
cmovge edx, dword [esp + 0x18]
cmovge eax, dword [esp + 0x14]
mov dword [esp + 0x24], edx
dec eax
mov edx, esi
mov dword [esi + 8], eax
call fcn.1011eec0
cmp dword [esi + 0xc], 0
mov edi, dword [esp + 0x20]
je 0x10120995
push dword [ebp + 8]
mov edx, edi
mov ecx, ebx
push dword [esp + 0x20]
push esi
call fcn.101201c0
add esp, 0xc
cmp dword [ebx + 0x2c], 0
lea edx, [ebx + 0x2c]
jne 0x10120a02
test edi, edi
jne 0x10120a02
mov edx, dword [esi + 4]
mov edi, dword [esi + 0xc]
or edx, 1
mov dword [esi + 4], edx
test edi, edi
je 0x101209ff
mov eax, dword [ebp + 0xc]
and eax, 2
mov dword [ebp + 0xc], eax
je 0x101209c3
or edx, 2
mov dword [esi + 4], edx
cmp dword [esp + 0x24], 0
je 0x101209f2
mov ecx, dword [esi + 0x2c]
and edx, 2
cmp ecx, dword [esi + 8]
jne 0x101209dd
mov eax, dword [esi + 0x38]
cmp eax, dword [edi + 8]
jl 0x101209ef
mov eax, dword [esi]
push ecx
mov ecx, ebx
push dword [eax]
call fcn.1011e920
add esp, 8
mov dword [esi + 0x48], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x101209ff
mov edx, esi
mov ecx, ebx
call fcn.1011fe80
lea edx, [ebx + 0x2c]
test byte [esi + 4], 2
je 0x10120a0f
mov ecx, 0x1011f6d0
jmp 0x10120a22
mov eax, dword [ebx]
mov ecx, 0x1011f9e0
mov edi, 0x1011f750
cmp dword [eax + 0x34], 1
cmove ecx, edi
mov dword [esi + 0x28], ecx
mov eax, dword [esi]
mov edi, dword [eax + 0x20]
test edi, edi
jle 0x10120a4b
lea eax, [edi + edi*2]
mov ecx, edx
shl eax, 2
push 0
push eax
call fcn.10115310
add esp, 8
test eax, eax
je 0x10120a4b
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret