Function at 0x100f4450
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 0x5c
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.101062c0
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esi], ecx
mov ebx, dword [edi + 0x3c]
test ebx, ebx
jne 0x100f44f4
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.1001fce0
add esp, 0xc
mov ebx, eax
cmp dword [edi + 0x24], 0
jne 0x100f44e5
test ebx, ebx
je 0x100f44de
mov eax, dword [edi]
lea ecx, [edi + 0x3c]
push 0
push ecx
push 0
mov ecx, dword [eax]
mov edx, ebx
push 0x85
push 0xffffffffffffffff
call fcn.1008a230
add esp, 0x14
mov dword [edi + 0x24], eax
jmp 0x100f44e5
mov dword [edi + 0x24], 7
push ebx
call fcn.1001cd70
mov ebx, dword [edi + 0x3c]
add esp, 4
mov ecx, dword [ebp + 0x10]
cmp dword [edi + 0x24], 0
jne 0x100f4658
mov eax, dword [ecx]
cdq
push edx
push eax
push 1
push ebx
call fcn.10046c20
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.10046a20
add esp, 0x24
push ebx
call fcn.10045780
add esp, 4
cmp eax, 0x64
jne 0x100f4553
push 0
push ebx
call fcn.10046250
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.10044790
add esp, 4
mov dword [edi + 0x24], eax
mov edx, 1
mov ecx, ebx
call fcn.100468b0
test eax, eax
jne 0x100f4582
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100f4582
push eax
call dword [0x10140b50]
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.100f3250
cmp dword [esi + 0xc], 0
mov ebx, dword [esp + 0x1c]
je 0x100f45c7
push dword [ebp + 8]
mov edx, ebx
mov ecx, edi
push dword [esp + 0x1c]
push esi
call fcn.100f4070
add esp, 0xc
cmp dword [edi + 0x24], 0
jne 0x100f462e
test ebx, ebx
jne 0x100f462e
mov edx, dword [esi + 4]
mov ebx, dword [esi + 0xc]
or edx, 1
mov dword [esi + 4], edx
test ebx, ebx
je 0x100f462e
mov eax, dword [ebp + 0xc]
and eax, 2
mov dword [ebp + 0xc], eax
je 0x100f45f2
or edx, 2
mov dword [esi + 4], edx
cmp dword [esp + 0x14], 0
je 0x100f4621
mov ecx, dword [esi + 0x24]
and edx, 2
cmp ecx, dword [esi + 8]
jne 0x100f460c
mov eax, dword [esi + 0x30]
cmp eax, dword [ebx + 8]
jl 0x100f461e
mov eax, dword [esi]
push ecx
mov ecx, edi
push dword [eax]
call fcn.100f3030
add esp, 8
mov dword [esi + 0x40], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x100f462e
mov edx, esi
mov ecx, edi
call fcn.100f3e40
test byte [esi + 4], 2
je 0x100f4642
mov dword [esi + 0x20], 0x100f3870
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
mov ecx, 0x100f3b00
mov edx, 0x100f38f0
cmp dword [eax + 0x30], 1
cmove ecx, edx
mov dword [esi + 0x20], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret