Function at 0x140140620
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
cmp qword [rcx + 0x78], 0
mov r15, r9
mov rbx, qword [rsp + 0x90]
mov r12d, r8d
mov r13, rdx
mov qword [rsp + 0x70], 0
mov rdi, rcx
mov ebp, 0xffffffff
jne 0x14014068b
mov rdx, qword [rcx]
lea rcx, str.SELECT_pgno_FROM__q._q_idx_WHERE_segid__AND_term___ORDER_BY_term_ASC_LIMIT_1
mov r8, qword [rdx + 0x10]
mov rdx, qword [rdx + 8]
call fcn.1400ea510
mov r8, rax
lea rdx, [rdi + 0x78]
mov rcx, rdi
call fcn.140137990
mov rsi, qword [rdi + 0x78]
mov r14d, 1
test rsi, rsi
je 0x140140722
movsxd r8, dword [r15]
mov edx, r14d
mov rcx, rsi
call fcn.1400ee1d0
mov r9d, r12d
mov qword [rsp + 0x20], 0
mov r8, r13
mov edx, 2
mov rcx, rsi
call fcn.1400ed510
mov rcx, rsi
call fcn.1400c06c0
cmp eax, 0x64
jne 0x1401406ec
xor edx, edx
mov rcx, rsi
call fcn.1400c0ba0
mov rbp, rax
sar rbp, 1
and eax, r14d
mov dword [rsp + 0x70], eax
mov rcx, rsi
call fcn.1400c1490
mov edx, r14d
mov dword [rdi + 0x3c], eax
mov rcx, rsi
call fcn.1401ee140
test eax, eax
jne 0x140140718
mov rax, qword [rsi]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140140718
call qword [0x1402cd320]
cmp dword [rdi + 0x3c], 0
jne 0x140140867
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbx + 8], xmm0
movups xmmword [rbx + 0x18], xmm0
movups xmmword [rbx + 0x28], xmm0
movups xmmword [rbx + 0x38], xmm0
movups xmmword [rbx + 0x48], xmm0
movups xmmword [rbx + 0x58], xmm0
movups xmmword [rbx + 0x68], xmm0
mov qword [rbx + 0x78], rax
or dword [rbx + 8], r14d
mov qword [rbx], r15
test ebp, ebp
js 0x140140793
lea eax, [rbp - 1]
mov rdx, rbx
mov rcx, rdi
mov dword [rbx + 0xc], eax
call fcn.140140890
test byte [rbx + 8], 2
je 0x140140776
lea rax, [0x140140bf0]
mov qword [rbx + 0x30], rax
jmp 0x140140793
mov rax, qword [rdi]
lea rcx, [0x1401401a0]
lea rdx, [0x1401409a0]
cmp dword [rax + 0x60], r14d
cmove rcx, rdx
mov qword [rbx + 0x30], rcx
mov rcx, qword [rbx + 0x10]
test rcx, rcx
je 0x140140867
mov r8, qword [rcx]
movsxd rsi, dword [rcx + 0xc]
add r8, rsi
mov dword [rbx + 0x40], esi
movzx ecx, byte [r8]
test cl, cl
jns 0x14014080c
movzx edx, byte [r8 + 1]
test dl, dl
js 0x1401407ce
and ecx, 0x7f
mov r14d, 2
shl ecx, 7
or ecx, edx
jmp 0x14014080c
movzx eax, byte [r8 + 2]
shl ecx, 0xe
or eax, ecx
test al, al
js 0x1401407f3
mov ecx, edx
and eax, 0x1fc07f
and ecx, 0x7f
mov r14d, 3
shl ecx, 7
or ecx, eax
jmp 0x14014080c
lea rdx, [rsp + 0x30]
mov rcx, r8
call fcn.14019dec0
mov ecx, dword [rsp + 0x30]
btr ecx, 0x1f
movzx r14d, al
lea eax, [rsi + r14]
xor r8d, r8d
mov dword [rbx + 0x40], eax
mov rdx, rbx
mov eax, ecx
mov rcx, rdi
mov qword [rbx + 0x20], rax
call fcn.140140050
mov rdx, rbx
mov rcx, rdi
call fcn.14013fed0
cmp dword [rsp + 0x70], 0
je 0x140140867
mov edx, dword [rbx + 8]
mov r9d, dword [rbx + 0x38]
and edx, 2
cmp r9d, dword [rbx + 0xc]
jne 0x140140855
mov rax, qword [rbx + 0x10]
mov ecx, dword [rax + 0xc]
cmp dword [rbx + 0x44], ecx
jl 0x140140867
mov rax, qword [rbx]
mov rcx, rdi
mov r8d, dword [rax]
call fcn.14012c5c0
mov qword [rbx + 0x58], rax
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret