Function at 0x100f4380
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.10106200
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov dword [esi], ecx
mov ebx, dword [edi + 0x3c]
test ebx, ebx
jne 0x100f4424
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 0x100f4415
test ebx, ebx
je 0x100f440e
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.1008a1c0
add esp, 0x14
mov dword [edi + 0x24], eax
jmp 0x100f4415
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 0x100f4588
mov eax, dword [ecx]
cdq
push edx
push eax
push 1
push ebx
call fcn.10046be0
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.100469e0
add esp, 0x24
push ebx
call fcn.10045740
add esp, 4
cmp eax, 0x64
jne 0x100f4483
push 0
push ebx
call fcn.10046210
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.10044750
add esp, 4
mov dword [edi + 0x24], eax
mov edx, 1
mov ecx, ebx
call fcn.10046870
test eax, eax
jne 0x100f44b2
mov eax, dword [ebx]
mov eax, dword [eax + 0xc]
test eax, eax
je 0x100f44b2
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.100f3180
cmp dword [esi + 0xc], 0
mov ebx, dword [esp + 0x1c]
je 0x100f44f7
push dword [ebp + 8]
mov edx, ebx
mov ecx, edi
push dword [esp + 0x1c]
push esi
call fcn.100f3fa0
add esp, 0xc
cmp dword [edi + 0x24], 0
jne 0x100f455e
test ebx, ebx
jne 0x100f455e
mov edx, dword [esi + 4]
mov ebx, dword [esi + 0xc]
or edx, 1
mov dword [esi + 4], edx
test ebx, ebx
je 0x100f455e
mov eax, dword [ebp + 0xc]
and eax, 2
mov dword [ebp + 0xc], eax
je 0x100f4522
or edx, 2
mov dword [esi + 4], edx
cmp dword [esp + 0x14], 0
je 0x100f4551
mov ecx, dword [esi + 0x24]
and edx, 2
cmp ecx, dword [esi + 8]
jne 0x100f453c
mov eax, dword [esi + 0x30]
cmp eax, dword [ebx + 8]
jl 0x100f454e
mov eax, dword [esi]
push ecx
mov ecx, edi
push dword [eax]
call fcn.100f2f60
add esp, 8
mov dword [esi + 0x40], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x100f455e
mov edx, esi
mov ecx, edi
call fcn.100f3d70
test byte [esi + 4], 2
je 0x100f4572
mov dword [esi + 0x20], 0x100f37a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
mov ecx, 0x100f3a30
mov edx, 0x100f3820
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