Function at 0x140255000
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 0x140255075
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.1402c5500
lea rdx, [rsi + 0x70]
mov rcx, rsi
mov r8, rax
call fcn.14024fc40
mov r13d, dword [rsi + 0x3c]
mov rdi, qword [rsi + 0x70]
test r13d, r13d
jne 0x1402555fd
mov r8d, dword [rbp]
mov edx, 1
mov rcx, rdi
call fcn.1402c13c0
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.1402c12f0
mov rcx, rdi
call fcn.1402c6e70
cmp eax, 0x64
jne 0x1402550dc
xor edx, edx
mov rcx, rdi
call fcn.1402c2210
movsxd r12, eax
mov r14, r12
sar r12, 1
and r14d, 1
jmp 0x1402550e5
xor r14d, r14d
mov r12d, 1
mov rcx, rdi
call fcn.1402c5f30
mov edx, 2
mov rcx, rdi
mov dword [rsi + 0x3c], eax
call fcn.1402c1420
mov eax, dword [rbp + 4]
cmp eax, r12d
jg 0x14025510b
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.140254af0
mov r14, qword [rbx + 0x10]
test r14, r14
je 0x1402553ee
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.140292f70
mov edx, dword [rsp + 0x78]
cmp r12d, edx
mov dword [rsp + 0x6c], edx
jb 0x14025524d
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 0x1402551a4
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 0x14025529c
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 0x1402551db
mov rdx, qword [rsp + 0x58]
mov dword [rsp + 0x54], r8d
call fcn.140292f70
mov r8d, dword [rsp + 0x54]
add eax, r15d
mov dword [rsp + 0x6c], eax
cmp dword [rsp + 0x70], r8d
jb 0x1402555df
mov r15d, r8d
jne 0x14025521b
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 0x140255259
cmp dword [rsp + 0x40], r15d
je 0x140255274
cmp eax, edx
jb 0x140255281
cmp edi, r12d
jae 0x1402552bc
mov rdx, qword [rsp + 0x48]
mov ecx, edi
add rcx, rbp
call fcn.140292f70
mov r8d, dword [rsp + 0x70]
add r8d, dword [rsp + 0x78]
add edi, eax
cmp r8d, r12d
mov dword [rsp + 0x78], r8d
jb 0x140255184
mov dword [rsi + 0x3c], 0x10b
jmp 0x1402553ee
mov rcx, qword [rsp + 0x38]
lea r9d, [r10 + rax]
mov r11d, r15d
mov cl, byte [rcx + r11]
cmp byte [rbp + r9], cl
jne 0x140255210
inc eax
jmp 0x140255206
cmp edx, eax
jne 0x1402555df
jmp 0x14025533c
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 0x14025521b
jmp 0x1402555df
mov rdx, qword [rsp + 0x48]
mov dword [rsp + 0x54], r8d
call fcn.140292f70
mov r8d, dword [rsp + 0x54]
add eax, r8d
mov dword [rsp + 0x6c], eax
jmp 0x1402551a1
cmp dword [rsp + 0x34], 0
je 0x1402555ea
mov rdx, rbx
mov rcx, rsi
call fcn.140254af0
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x1402553ee
mov edi, dword [rax + 0xc]
mov r12d, dword [rax + 8]
mov rbp, qword [rax]
cmp edi, r12d
jge 0x1402552c7
lea rdx, [rsp + 0x6c]
mov ecx, edi
add rcx, rbp
call fcn.140292f70
mov r14d, dword [rsp + 0x6c]
cmp r14d, 3
jbe 0x14025524d
mov ecx, r14d
movsxd rdx, edi
cmp rcx, rdx
jge 0x14025524d
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.140292f70
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 0x14025524d
test r15d, r15d
je 0x14025524d
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.140291bf0
mov rdx, qword [rsp + 0x40]
lea r9, [rbp + r14]
mov r8d, r15d
mov rcx, qword [rsp + 0x38]
call fcn.140291ac0
cmp edi, r12d
jb 0x1402553b9
mov rax, qword [rbx + 0x10]
mov eax, dword [rax + 8]
inc eax
jmp 0x1402553d2
lea rdx, [rsp + 0x7c]
mov ecx, edi
add rcx, rbp
call fcn.140292f70
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.1402546c0
mov rdx, rbx
mov rcx, rsi
call fcn.140254610
mov ebp, dword [rsi + 0x3c]
mov r12d, dword [rsp + 0x50]
and r12d, 0x100
test ebp, ebp
jne 0x1402555b4
cmp dword [rsp + 0x34], 0
je 0x140255415
test r12d, r12d
je 0x1402555b4
mov eax, dword [rbx + 8]
mov edx, eax
or edx, 1
cmp qword [rbx + 0x10], 0
mov dword [rbx + 8], edx
je 0x1402555b4
mov edi, dword [rsp + 0x50]
and edi, 2
je 0x14025544a
or eax, 3
test r13d, r13d
mov dword [rbx + 8], eax
jne 0x140255453
mov rax, qword [rbx + 0x58]
test rax, rax
jne 0x140255468
jmp 0x140255497
test r13d, r13d
je 0x1402555b4
mov rdx, rbx
mov rcx, rsi
call fcn.1402545d0
test edi, edi
je 0x1402555b4
jmp 0x14025543f
mov rdx, qword [rsi]
cmp dword [rdx + 0x88], 4
jne 0x140255497
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.1402511b0
mov r15, rax
jmp 0x140255547
mov edi, dword [rbx + 0xc]
mov eax, 4
cmp dword [rbx + 0x38], edi
mov r8, qword [rbx + 0x10]
jne 0x1402554ab
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 0x1402554b6
movsxd rax, edx
mov qword [rbx + 0x20], rax
mov eax, dword [r8 + 0xc]
cmp dword [rbx + 0x44], eax
jl 0x1402555a9
mov r14, qword [rbx]
inc edi
xor r15d, r15d
movsxd r13, edi
cmp dword [rsi + 0x3c], 0
jne 0x140255547
cmp edi, dword [r14 + 8]
jg 0x140255547
movsxd rdx, dword [r14]
mov rcx, rsi
shl rdx, 0x25
add rdx, r13
call fcn.1402511b0
test rax, rax
mov rcx, rax
je 0x140255540
mov rdx, qword [rcx]
mov eax, dword [rax + 0xc]
cmp word [rdx], 0
mov dword [rsp + 0x34], eax
mov eax, dword [rcx + 8]
je 0x14025552d
mov ebp, edi
xchg r15, rcx
mov dword [rsp + 0x38], eax
call fcn.1402c4500
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x34], eax
jl 0x140255547
inc edi
inc r13
jmp 0x1402554ef
test r15, r15
je 0x1402555a9
mov rcx, qword [rbx + 0x10]
call fcn.1402c4500
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 0x140255578
mov dword [rsi + 0x3c], 0x10b
jmp 0x1402555b4
lea rdx, [rbx + 0x70]
movzx eax, ax
add rcx, rax
call fcn.140292dd0
movzx eax, al
add eax, ebp
cdqe
mov qword [rbx + 0x20], rax
mov eax, dword [r15 + 8]
cmp edi, eax
jl 0x14025559e
inc eax
jmp 0x1402555a6
mov rcx, r15
call fcn.140251180
mov dword [rbx + 0x44], eax
mov rdx, rbx
mov rcx, rsi
call fcn.140254db0
mov rdx, rbx
mov rcx, rsi
call fcn.140255620
test r12d, r12d
jne 0x1402555fd
mov rcx, rsi
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.1402544f0
cmp dword [rsp + 0x34], 0
jne 0x14025533c
mov rcx, r14
call fcn.1402c4500
xor edx, edx
mov qword [rbx + 0x10], rdx
jmp 0x1402553ee
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret