Function at 0x1400e14a0
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
xor eax, eax
mov rbx, qword [rsp + 0xf8]
mov rbp, qword [rsp + 0xf0]
mov qword [rsp + 0x38], rdx
lea rdx, [rbx + 8]
mov rsi, rcx
mov ecx, 0x1e
mov rdi, rdx
mov dword [rsp + 0x40], r8d
rep stosd dword [rdi], eax
mov dword [rsp + 0x50], r9d
mov qword [rbx], rbp
cmp qword [rsi + 0x70], 0
jne 0x1400e1515
mov rax, qword [rsi]
lea rcx, str.SELECT_pgno_FROM__q._q_idx_WHERE_segid__AND_term___ORDER_BY_term_DESC_LIMIT_1
mov rdx, qword [rax + 8]
mov r8, qword [rax + 0x10]
call fcn.140151f20
lea rdx, [rsi + 0x70]
mov rcx, rsi
mov r8, rax
call fcn.1400dc110
mov r13d, dword [rsi + 0x3c]
mov rdi, qword [rsi + 0x70]
test r13d, r13d
jne 0x1400e1a9d
mov r8d, dword [rbp]
mov edx, 1
mov rcx, rdi
call fcn.14014dd70
xor r8d, r8d
mov r9d, dword [rsp + 0x40]
mov rcx, rdi
mov qword [rsp + 0x20], r8
mov r8, qword [rsp + 0x38]
mov edx, 2
call fcn.14014dca0
mov rcx, rdi
call fcn.1401538e0
cmp eax, 0x64
jne 0x1400e157c
xor edx, edx
mov rcx, rdi
call fcn.14014ebc0
movsxd r12, eax
mov r14, r12
sar r12, 1
and r14d, 1
jmp 0x1400e1585
xor r14d, r14d
mov r12d, 1
mov rcx, rdi
call fcn.140152950
mov edx, 2
mov rcx, rdi
mov dword [rsi + 0x3c], eax
call fcn.14014ddd0
mov eax, dword [rbp + 4]
cmp eax, r12d
jg 0x1400e15ab
mov r13d, r14d
mov eax, r12d
mov edi, dword [rsp + 0x50]
dec eax
mov rdx, rbx
mov rcx, rsi
mov dword [rbx + 0xc], eax
and edi, 8
mov dword [rsp + 0x34], edi
call fcn.1400e0f90
mov r14, qword [rbx + 0x10]
test r14, r14
je 0x1400e188e
mov rbp, qword [r14]
lea rdx, [rsp + 0x78]
xor ecx, ecx
mov dword [rsp + 0x70], ecx
mov r12d, dword [r14 + 8]
mov dword [rsp + 0x74], ecx
mov ecx, dword [r14 + 0xc]
mov rdi, rcx
add rcx, rbp
call fcn.14011e770
mov edx, dword [rsp + 0x78]
cmp r12d, edx
mov dword [rsp + 0x6c], edx
jb 0x1400e16ed
add edi, eax
xor r8d, r8d
lea rax, [rsp + 0x74]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
jmp 0x1400e1644
lea eax, [r8 + 1]
mov ecx, r8d
add rcx, rbp
mov dword [rsp + 0x6c], eax
movzx edx, byte [rcx]
test dl, dl
mov dword [rsp + 0x70], edx
js 0x1400e173c
mov r8d, r15d
mov ecx, dword [rsp + 0x6c]
lea eax, [rcx + 1]
mov r15, rcx
add rcx, rbp
movzx edx, byte [rcx]
mov dword [rsp + 0x6c], eax
test dl, dl
mov dword [rsp + 0x74], edx
jns 0x1400e167b
mov rdx, qword [rsp + 0x58]
mov dword [rsp + 0x54], r8d
call fcn.14011e770
mov r8d, dword [rsp + 0x54]
add eax, r15d
mov dword [rsp + 0x6c], eax
cmp dword [rsp + 0x70], r8d
jb 0x1400e1a7f
mov r15d, r8d
jne 0x1400e16bb
mov ecx, dword [rsp + 0x40]
mov edx, dword [rsp + 0x74]
mov r10d, dword [rsp + 0x6c]
sub ecx, r8d
cmp ecx, edx
cmova ecx, edx
xor eax, eax
mov dword [rsp + 0x54], ecx
cmp dword [rsp + 0x54], eax
lea r15d, [r8 + rax]
jne 0x1400e16f9
cmp dword [rsp + 0x40], r15d
je 0x1400e1714
cmp eax, edx
jb 0x1400e1721
cmp edi, r12d
jae 0x1400e175c
mov rdx, qword [rsp + 0x48]
mov ecx, edi
add rcx, rbp
call fcn.14011e770
mov r8d, dword [rsp + 0x70]
add r8d, dword [rsp + 0x78]
add edi, eax
cmp r8d, r12d
mov dword [rsp + 0x78], r8d
jb 0x1400e1624
mov dword [rsi + 0x3c], 0x10b
jmp 0x1400e188e
mov rcx, qword [rsp + 0x38]
lea r9d, [r10 + rax]
mov r11d, r15d
mov cl, byte [rcx + r11]
cmp byte [rbp + r9], cl
jne 0x1400e16b0
inc eax
jmp 0x1400e16a6
cmp edx, eax
jne 0x1400e1a7f
jmp 0x1400e17dc
mov rcx, qword [rsp + 0x38]
add eax, r10d
mov edx, r15d
mov eax, eax
mov al, byte [rbp + rax]
cmp byte [rcx + rdx], al
jae 0x1400e16bb
jmp 0x1400e1a7f
mov rdx, qword [rsp + 0x48]
mov dword [rsp + 0x54], r8d
call fcn.14011e770
mov r8d, dword [rsp + 0x54]
add eax, r8d
mov dword [rsp + 0x6c], eax
jmp 0x1400e1641
cmp dword [rsp + 0x34], 0
je 0x1400e1a8a
mov rdx, rbx
mov rcx, rsi
call fcn.1400e0f90
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x1400e188e
mov edi, dword [rax + 0xc]
mov r12d, dword [rax + 8]
mov rbp, qword [rax]
cmp edi, r12d
jge 0x1400e1767
lea rdx, [rsp + 0x6c]
mov ecx, edi
add rcx, rbp
call fcn.14011e770
mov r14d, dword [rsp + 0x6c]
cmp r14d, 3
jbe 0x1400e16ed
mov ecx, r14d
movsxd rdx, edi
cmp rcx, rdx
jge 0x1400e16ed
lea rdx, [rsp + 0x74]
add edi, eax
add rcx, rbp
mov dword [rsp + 0x78], r14d
xor eax, eax
mov dword [rsp + 0x70], eax
call fcn.14011e770
add eax, r14d
mov dword [rsp + 0x6c], eax
mov ecx, dword [rsp + 0x74]
mov r8d, r12d
mov r14d, dword [rsp + 0x6c]
mov r15, rcx
add rcx, r14
cmp rcx, r8
jg 0x1400e16ed
test r15d, r15d
je 0x1400e16ed
mov edx, dword [rbx + 0xc]
lea eax, [r14 + r15]
mov r9, qword [rsp + 0x38]
lea rcx, [rsi + 0x3c]
mov qword [rbx + 0x20], rax
mov r8d, dword [rsp + 0x70]
mov dword [rbx + 0x3c], eax
mov qword [rsp + 0x38], rcx
mov dword [rbx + 0x38], edx
lea rdx, [rbx + 0x60]
mov qword [rsp + 0x40], rdx
call fcn.14011d410
mov rdx, qword [rsp + 0x40]
lea r9, [rbp + r14]
mov r8d, r15d
mov rcx, qword [rsp + 0x38]
call fcn.14011d2e0
cmp edi, r12d
jb 0x1400e1859
mov rax, qword [rbx + 0x10]
mov eax, dword [rax + 8]
inc eax
jmp 0x1400e1872
lea rdx, [rsp + 0x7c]
mov ecx, edi
add rcx, rbp
call fcn.14011e770
add edi, eax
mov eax, dword [rsp + 0x7c]
add eax, dword [rsp + 0x78]
mov rdx, rbx
mov rcx, rsi
mov dword [rbx + 0x44], eax
mov dword [rbx + 0x40], edi
call fcn.1400e0b60
mov rdx, rbx
mov rcx, rsi
call fcn.1400e0ab0
mov ebp, dword [rsi + 0x3c]
mov r12d, dword [rsp + 0x50]
and r12d, 0x100
test ebp, ebp
jne 0x1400e1a54
cmp dword [rsp + 0x34], 0
je 0x1400e18b5
test r12d, r12d
je 0x1400e1a54
mov eax, dword [rbx + 8]
mov edx, eax
or edx, 1
cmp qword [rbx + 0x10], 0
mov dword [rbx + 8], edx
je 0x1400e1a54
mov edi, dword [rsp + 0x50]
and edi, 2
je 0x1400e18ea
or eax, 3
test r13d, r13d
mov dword [rbx + 8], eax
jne 0x1400e18f3
mov rax, qword [rbx + 0x58]
test rax, rax
jne 0x1400e1908
jmp 0x1400e1937
test r13d, r13d
je 0x1400e1a54
mov rdx, rbx
mov rcx, rsi
call fcn.1400e0a70
test edi, edi
je 0x1400e1a54
jmp 0x1400e18df
mov rdx, qword [rsi]
cmp dword [rdx + 0x88], 4
jne 0x1400e1937
mov ebp, dword [rax + 0x1c]
mov rcx, rsi
mov rax, qword [rbx]
movsxd rdx, dword [rax]
movsxd rax, ebp
shl rdx, 0x25
add rdx, rax
call fcn.1400dd650
mov r15, rax
jmp 0x1400e19e7
mov edi, dword [rbx + 0xc]
mov eax, 4
cmp dword [rbx + 0x38], edi
mov r8, qword [rbx + 0x10]
jne 0x1400e194b
mov eax, dword [rbx + 0x3c]
mov r11, qword [r8]
lea r10d, [rax + 9]
inc eax
cdqe
mov cl, byte [r11 + rax - 1]
mov rdx, rax
shr cl, 7
cmp r10d, eax
setg r9b
inc rax
test cl, r9b
jne 0x1400e1956
movsxd rax, edx
mov qword [rbx + 0x20], rax
mov eax, dword [r8 + 0xc]
cmp dword [rbx + 0x44], eax
jl 0x1400e1a49
mov r14, qword [rbx]
inc edi
xor r15d, r15d
movsxd r13, edi
cmp dword [rsi + 0x3c], 0
jne 0x1400e19e7
cmp edi, dword [r14 + 8]
jg 0x1400e19e7
movsxd rdx, dword [r14]
mov rcx, rsi
shl rdx, 0x25
add rdx, r13
call fcn.1400dd650
test rax, rax
mov rcx, rax
je 0x1400e19e0
mov rdx, qword [rcx]
mov eax, dword [rax + 0xc]
cmp word [rdx], 0
mov dword [rsp + 0x34], eax
mov eax, dword [rcx + 8]
je 0x1400e19cd
mov ebp, edi
xchg r15, rcx
mov dword [rsp + 0x38], eax
call fcn.140150f20
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x34], eax
jl 0x1400e19e7
inc edi
inc r13
jmp 0x1400e198f
test r15, r15
je 0x1400e1a49
mov rcx, qword [rbx + 0x10]
call fcn.140150f20
mov rcx, qword [r15]
mov dword [rbx + 0xc], ebp
mov qword [rbx + 0x10], r15
mov edi, dword [r15 + 0xc]
mov ax, word [rcx]
xchg al, ah
movzx ebp, ax
cmp ebp, edi
jle 0x1400e1a18
mov dword [rsi + 0x3c], 0x10b
jmp 0x1400e1a54
lea rdx, [rbx + 0x70]
movzx eax, ax
add rcx, rax
call fcn.14011e5d0
movzx eax, al
add eax, ebp
cdqe
mov qword [rbx + 0x20], rax
mov eax, dword [r15 + 8]
cmp edi, eax
jl 0x1400e1a3e
inc eax
jmp 0x1400e1a46
mov rcx, r15
call fcn.1400dd620
mov dword [rbx + 0x44], eax
mov rdx, rbx
mov rcx, rsi
call fcn.1400e1250
mov rdx, rbx
mov rcx, rsi
call fcn.1400e1ac0
test r12d, r12d
jne 0x1400e1a9d
mov rcx, rsi
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.1400e0990
cmp dword [rsp + 0x34], 0
jne 0x1400e17dc
mov rcx, r14
call fcn.140150f20
xor edx, edx
mov qword [rbx + 0x10], rdx
jmp 0x1400e188e
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret