Function at 0x18012ea70
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push r12
push r14
push r15
sub rsp, 0x88
mov ebx, dword [rdx + 8]
xor r12d, r12d
mov rsi, rcx
mov qword [rsp + 0x48], r12
mov rcx, qword [rcx]
mov r14, rdx
mov qword [rsp + 0x50], rcx
mov r15d, r12d
mov eax, dword [rcx + 0x80]
mov dword [rsp + 0x40], eax
mov eax, dword [rdx + 4]
lea ebp, [rax - 1]
mov dword [rsp + 0xd0], ebp
test eax, eax
je 0x18012efa7
mov r9d, dword [rdx]
mov rdx, qword [rcx + 8]
mov r8, qword [rcx + 0x10]
lea rcx, str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d_ORDER_BY_1__2
mov qword [rsp + 0x80], rdi
call fcn.18002d2d0
mov rdi, rax
cmp dword [rsi + 0x3c], r12d
jne 0x18012eb2b
test rax, rax
je 0x18012eb24
mov rcx, qword [rsi]
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], r12
lea r8d, [r12 - 1]
mov qword [rsp + 0x28], rax
mov r9d, 0x85
mov rdx, rdi
mov qword [rsp + 0x20], r12
mov rcx, qword [rcx]
call fcn.1800aba20
mov r15, qword [rsp + 0x48]
mov dword [rsi + 0x3c], eax
jmp 0x18012eb2b
mov dword [rsi + 0x3c], 7
mov rcx, rdi
call fcn.18002a420
cmp dword [rsi + 0x3c], r12d
jne 0x18012ef8c
mov qword [rsp + 0x78], r13
mov rcx, r15
call fcn.18005aa50
cmp eax, 0x64
jne 0x18012ef87
lea edx, [rax - 0x63]
mov rcx, r15
call fcn.18005b290
mov edx, 1
mov rcx, r15
mov r13, rax
call fcn.18005b360
mov edx, 2
mov rcx, r15
mov r12d, eax
call fcn.18005b540
movsxd rdi, eax
mov edx, 3
mov rcx, r15
mov dword [rsp + 0xc0], edi
call fcn.18005b540
mov r15d, eax
mov dword [rsp + 0xd8], eax
cmp edi, dword [r14 + 4]
jl 0x18012ef68
movsxd rdx, dword [r14]
mov rcx, rsi
shl rdx, 0x25
add rdx, rdi
call fcn.1801230d0
mov r14, rax
test rax, rax
je 0x18012ef87
mov ecx, dword [rax + 8]
cmp ecx, 4
jl 0x18012ef78
movsxd rdi, dword [rax + 0xc]
cmp edi, ecx
jg 0x18012ef78
jl 0x18012ec0d
test r12d, r12d
jne 0x18012ec01
mov rax, qword [rsp + 0x50]
cmp dword [rax + 0x80], 5
jne 0x18012ec01
cmp ecx, edi
jne 0x18012ec01
cmp ecx, 4
je 0x18012ed41
mov dword [rsi + 0x3c], 0x10b
jmp 0x18012ed41
mov r15, qword [rax]
movzx ebp, byte [r15 + rdi]
lea r8, [r15 + rdi]
test bpl, bpl
jns 0x18012ec66
movzx edx, byte [r8 + 1]
test dl, dl
js 0x18012ec31
and ebp, 0x7f
shl ebp, 7
or ebp, edx
jmp 0x18012ec66
movzx ecx, byte [r8 + 2]
shl ebp, 0xe
or ecx, ebp
test cl, cl
js 0x18012ec51
mov ebp, edx
and ecx, 0x1fc07f
and ebp, 0x7f
shl ebp, 7
or ebp, ecx
jmp 0x18012ec66
lea rdx, [rsp + 0x58]
mov rcx, r8
call fcn.180139f70
mov ebp, dword [rsp + 0x58]
btr ebp, 0x1f
movzx ecx, byte [r15]
movzx eax, byte [r15 + 1]
shl ecx, 8
add ecx, eax
cmp ecx, ebp
jae 0x18012ed20
cmp ebp, edi
jge 0x18012ed20
mov r8d, ebp
add r8, r15
movzx edi, byte [r8]
test dil, dil
js 0x18012ec9a
mov ecx, 1
jmp 0x18012ecef
movzx edx, byte [r8 + 1]
test dl, dl
js 0x18012ecb2
and edi, 0x7f
mov ecx, 2
shl edi, 7
or edi, edx
jmp 0x18012ecef
movzx ecx, byte [r8 + 2]
shl edi, 0xe
or ecx, edi
test cl, cl
js 0x18012ecd7
and ecx, 0x1fc07f
mov edi, edx
and edi, 0x7f
shl edi, 7
or edi, ecx
mov ecx, 3
jmp 0x18012ecef
lea rdx, [rsp + 0x60]
mov rcx, r8
call fcn.180139f70
mov edi, dword [rsp + 0x60]
btr edi, 0x1f
movzx ecx, al
cmp edi, r12d
mov eax, r12d
cmovl eax, edi
test eax, eax
jg 0x18012ed00
xor eax, eax
jmp 0x18012ed14
movsxd r8, eax
mov rdx, r13
lea eax, [rcx + rbp]
movsxd rcx, eax
add rcx, r15
call fcn.180153490
sub edi, r12d
test eax, eax
cmovne edi, eax
test edi, edi
jns 0x18012ed27
mov dword [rsi + 0x3c], 0x10b
mov rdx, r14
mov rcx, rsi
call fcn.18012e6b0
mov ebp, dword [rsp + 0xd0]
mov r15d, dword [rsp + 0xd8]
mov rcx, r14
call fcn.18002a420
cmp dword [rsi + 0x3c], 0
jne 0x18012ef87
mov r13d, dword [rsp + 0xc0]
lea edi, [rbp + 1]
mov r14, qword [rsp + 0xc8]
lea ebp, [r13 - 1]
nop word [rax + rax]
cmp edi, ebp
jg 0x18012ede3
movsxd rdx, dword [r14]
mov rcx, rsi
shl rdx, 0x25
movsxd rax, edi
add rdx, rax
call fcn.1801230d0
mov r9, rax
test rax, rax
je 0x18012edce
mov ecx, dword [rax + 8]
cmp dword [rax + 0xc], ecx
jge 0x18012eda0
mov dword [rsi + 0x3c], 0x10b
lea ecx, [rbx + 1]
cmp edi, ecx
jl 0x18012edce
mov rdx, qword [rax]
mov ecx, pe_nt_image_headers64
movzx eax, byte [rdx + 1]
movzx r8d, byte [rdx]
imul r8d, ecx
add r8w, ax
xor eax, eax
cmp ax, r8w
je 0x18012edce
mov dword [rsi + 0x3c], 0x10b
mov rcx, r9
call fcn.18002a420
inc edi
cmp dword [rsi + 0x3c], 0
je 0x18012ed70
jmp 0x18012ef87
test r15d, r15d
je 0x18012ef59
movsxd rbp, dword [r14]
xor eax, eax
mov r8d, ebp
mov r9d, r13d
xor edx, edx
mov rcx, rsi
mov edi, r13d
mov ebx, eax
call fcn.180124c20
mov rdx, rax
mov rcx, rsi
mov r15, rax
call fcn.1801249f0
test eax, eax
jne 0x18012ef4f
mov r12, rbp
mov qword [rsp + 0xd0], rbp
nop word [rax + rax]
lea ebx, [rdi + 1]
mov edi, dword [r15 + 0x1c]
cmp ebx, edi
jge 0x18012ee9d
mov rbp, r12
mov r12d, pe_nt_image_headers64
shl rbp, 0x25
nop dword [rax + rax]
movsxd rdx, ebx
mov rcx, rsi
add rdx, rbp
call fcn.1801230d0
test rax, rax
je 0x18012ee88
mov r9, qword [rax]
movzx r8d, byte [r9]
movzx ecx, byte [r9 + 1]
imul r8d, r12d
add r8w, cx
je 0x18012ee80
mov dword [rsi + 0x3c], 0x10b
mov rcx, rax
call fcn.18002a420
mov edi, dword [r15 + 0x1c]
inc ebx
cmp ebx, edi
jl 0x18012ee50
mov r12, qword [rsp + 0xd0]
mov rbp, r12
movsxd rax, edi
mov rdx, rbp
shl rdx, 0x25
mov rcx, rsi
add rdx, rax
call fcn.1801230d0
mov r14, rax
test rax, rax
je 0x18012ef1e
mov r9, qword [rax]
movzx r8d, byte [r9]
movzx ecx, byte [r9 + 1]
shl r8d, 8
add r8d, ecx
cmp r8d, dword [rax + 0xc]
jge 0x18012ef0c
mov r13d, dword [rsp + 0x40]
cmp r13d, 5
jne 0x18012eee3
test r8d, r8d
je 0x18012ef13
mov rbp, qword [r15 + 0x20]
lea rdx, [rsp + 0x68]
mov ecx, r8d
add rcx, r9
call fcn.180139f70
mov rax, qword [rsp + 0x68]
cmp rax, rbp
jl 0x18012ef0c
cmp r13d, 5
je 0x18012ef13
cmp rax, rbp
je 0x18012ef13
mov dword [rsi + 0x3c], 0x10b
mov rcx, r14
call fcn.18002a420
mov rbp, r12
xor r8d, r8d
mov rdx, r15
mov rcx, rsi
call fcn.180124930
mov rdx, r15
mov rcx, rsi
call fcn.1801249f0
test eax, eax
je 0x18012ee30
mov r14, qword [rsp + 0xc8]
mov r13d, dword [rsp + 0xc0]
mov rcx, r15
call fcn.180124b70
jmp 0x18012ef5d
mov ebx, dword [r14 + 8]
mov ebp, r13d
mov dword [rsp + 0xd0], r13d
cmp dword [rsi + 0x3c], 0
jne 0x18012ef87
mov r15, qword [rsp + 0x48]
jmp 0x18012eb42
mov rcx, r14
mov dword [rsi + 0x3c], 0x10b
call fcn.18002a420
mov r13, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x48]
call fcn.180059a80
cmp dword [rsi + 0x3c], 0
mov rdi, qword [rsp + 0x80]
jne 0x18012efa7
mov dword [rsi + 0x3c], eax
add rsp, 0x88
pop r15
pop r14
pop r12
pop rsi
pop rbp
pop rbx
ret