Function at 0x101034c0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x14]
and eax, 8
push edi
push 0x64
mov dword [esp + 0x20], eax
mov edi, ecx
lea eax, [esi + 4]
mov dword [esp + 0x1c], edx
push 0
push eax
mov dword [esp + 0x1c], 1
mov dword [esp + 0x20], 0
call fcn.10117800
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esi], ecx
mov ebx, dword [edi + 0x44]
test ebx, ebx
jne 0x10103564
mov eax, dword [edi]
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.100285d0
add esp, 0xc
mov ebx, eax
cmp dword [edi + 0x2c], 0
jne 0x10103555
test ebx, ebx
je 0x1010354e
mov eax, dword [edi]
lea ecx, [edi + 0x44]
push 0
push ecx
push 0
mov ecx, dword [eax]
mov edx, ebx
push 0x85
push 0xffffffffffffffff
call fcn.100966f0
add esp, 0x14
mov dword [edi + 0x2c], eax
jmp 0x10103555
mov dword [edi + 0x2c], 7
push ebx
call fcn.10025b30
mov ebx, dword [edi + 0x44]
add esp, 4
mov ecx, dword [ebp + 0x10]
cmp dword [edi + 0x2c], 0
jne 0x101036ed
mov eax, dword [ecx]
cdq
push edx
push eax
push 1
push ebx
call fcn.100520a0
mov eax, dword [ebp + 8]
mov ecx, ebx
push 0
cdq
push 0
push edx
push eax
push dword [esp + 0x38]
mov edx, 2
call fcn.10051ea0
add esp, 0x24
push ebx
call fcn.10050cc0
add esp, 4
cmp eax, 0x64
jne 0x101035c3
push 0
push ebx
call fcn.100516b0
cdq
add esp, 8
mov ecx, eax
shrd eax, edx, 1
and ecx, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
push ebx
call fcn.1004fd70
add esp, 4
mov dword [edi + 0x2c], eax
mov edx, 1
mov ecx, ebx
call fcn.10051d10
test eax, eax
jne 0x101035f2
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x101035f2
push eax
call dword [0x10155b60]
add esp, 4
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov edx, esi
mov eax, dword [eax + 4]
cmp dword [esp + 0x10], eax
cmovge ecx, dword [esp + 0x14]
cmovge eax, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
dec eax
mov ecx, edi
mov dword [esi + 8], eax
call fcn.101022a0
cmp dword [esi + 0xc], 0
mov ebx, dword [esp + 0x1c]
je 0x10103637
push dword [ebp + 8]
mov edx, ebx
mov ecx, edi
push dword [esp + 0x1c]
push esi
call fcn.10103150
add esp, 0xc
cmp dword [edi + 0x2c], 0
lea edx, [edi + 0x2c]
jne 0x101036a4
test ebx, ebx
jne 0x101036a4
mov edx, dword [esi + 4]
mov ebx, dword [esi + 0xc]
or edx, 1
mov dword [esi + 4], edx
test ebx, ebx
je 0x101036a1
mov eax, dword [ebp + 0xc]
and eax, 2
mov dword [ebp + 0xc], eax
je 0x10103665
or edx, 2
mov dword [esi + 4], edx
cmp dword [esp + 0x14], 0
je 0x10103694
mov ecx, dword [esi + 0x2c]
and edx, 2
cmp ecx, dword [esi + 8]
jne 0x1010367f
mov eax, dword [esi + 0x38]
cmp eax, dword [ebx + 8]
jl 0x10103691
mov eax, dword [esi]
push ecx
mov ecx, edi
push dword [eax]
call fcn.10102080
add esp, 8
mov dword [esi + 0x48], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x101036a1
mov edx, esi
mov ecx, edi
call fcn.10102f10
lea edx, [edi + 0x2c]
test byte [esi + 4], 2
je 0x101036b1
mov ecx, 0x10102940
jmp 0x101036c4
mov eax, dword [edi]
mov ecx, 0x10102bd0
mov edi, 0x101029c0
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 0x101036ed
lea eax, [edi + edi*2]
mov ecx, edx
shl eax, 2
push 0
push eax
call fcn.100f9ba0
add esp, 8
test eax, eax
je 0x101036ed
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret