Function at 0x180122c70
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rdi
push r13
push r14
push r15
sub rsp, 0x78
mov r14, rdx
xor ebp, ebp
mov rdx, qword [rcx]
mov rdi, rcx
mov r15d, ebp
mov qword [rsp + 0xc8], rbp
mov eax, dword [r14 + 4]
mov ebx, dword [r14 + 8]
lea r13d, [rax - 1]
test eax, eax
je 0x18012312a
mov r8, qword [rdx + 0x10]
lea rcx, str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d_ORDER_BY_1__2
mov rdx, qword [rdx + 8]
mov r9d, dword [r14]
mov qword [rsp + 0x70], rsi
call fcn.18002b780
mov rsi, rax
cmp dword [rdi + 0x34], ebp
jne 0x180122d18
test rax, rax
je 0x180122d11
mov rcx, qword [rdi]
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x30], rbp
lea r8d, [rbp - 1]
mov qword [rsp + 0x28], rax
mov r9d, 0x85
mov rdx, rsi
mov qword [rsp + 0x20], rbp
mov rcx, qword [rcx]
call fcn.1800a6360
mov r15, qword [rsp + 0xc8]
mov dword [rdi + 0x34], eax
jmp 0x180122d18
mov dword [rdi + 0x34], 7
mov rcx, rsi
call fcn.180028850
cmp dword [rdi + 0x34], ebp
jne 0x18012310f
mov qword [rsp + 0x68], r12
nop
mov rcx, r15
call fcn.1800567d0
cmp eax, 0x64
jne 0x18012310a
lea edx, [rax - 0x63]
mov rcx, r15
call fcn.180057280
mov edx, 1
mov qword [rsp + 0x50], rax
mov rcx, r15
call fcn.180057350
mov edx, 2
mov rcx, r15
mov r12d, eax
call fcn.180057530
movsxd rbp, eax
mov edx, 3
mov rcx, r15
mov dword [rsp + 0xb0], ebp
call fcn.180057530
mov r15d, eax
mov dword [rsp + 0xc0], eax
cmp ebp, dword [r14 + 4]
jl 0x1801230e8
movsxd rdx, dword [r14]
mov rcx, rdi
shl rdx, 0x25
add rdx, rbp
call fcn.1801199a0
mov r14, rax
test rax, rax
je 0x18012310a
mov ecx, dword [rax + 8]
cmp ecx, 4
jl 0x1801230fb
movsxd rsi, dword [rax + 0xc]
cmp esi, ecx
jg 0x1801230fb
jl 0x180122ddd
mov dword [rdi + 0x34], 0x10b
jmp 0x180122f13
mov r15, qword [rax]
movzx ebp, byte [r15 + rsi]
lea r8, [r15 + rsi]
test bpl, bpl
jns 0x180122e36
movzx edx, byte [r8 + 1]
test dl, dl
js 0x180122e01
and ebp, 0x7f
shl ebp, 7
or ebp, edx
jmp 0x180122e36
movzx ecx, byte [r8 + 2]
shl ebp, 0xe
or ecx, ebp
test cl, cl
js 0x180122e21
mov ebp, edx
and ecx, 0x1fc07f
and ebp, 0x7f
shl ebp, 7
or ebp, ecx
jmp 0x180122e36
lea rdx, [rsp + 0x40]
mov rcx, r8
call fcn.18012d860
mov ebp, dword [rsp + 0x40]
btr ebp, 0x1f
movzx ecx, byte [r15]
movzx eax, byte [r15 + 1]
shl ecx, 8
add ecx, eax
cmp ecx, ebp
jae 0x180122ef2
cmp ebp, esi
jge 0x180122ef2
mov r8d, ebp
add r8, r15
movzx esi, byte [r8]
test sil, sil
js 0x180122e6a
mov ecx, 1
jmp 0x180122ebf
movzx edx, byte [r8 + 1]
test dl, dl
js 0x180122e82
and esi, 0x7f
mov ecx, 2
shl esi, 7
or esi, edx
jmp 0x180122ebf
movzx ecx, byte [r8 + 2]
shl esi, 0xe
or ecx, esi
test cl, cl
js 0x180122ea7
and ecx, 0x1fc07f
mov esi, edx
and esi, 0x7f
shl esi, 7
or esi, ecx
mov ecx, 3
jmp 0x180122ebf
lea rdx, [rsp + 0x48]
mov rcx, r8
call fcn.18012d860
mov esi, dword [rsp + 0x48]
btr esi, 0x1f
movzx ecx, al
cmp esi, r12d
mov eax, r12d
cmovl eax, esi
test eax, eax
jg 0x180122ed0
xor eax, eax
jmp 0x180122ee6
mov rdx, qword [rsp + 0x50]
movsxd r8, eax
lea eax, [rcx + rbp]
movsxd rcx, eax
add rcx, r15
call fcn.1801468d0
sub esi, r12d
test eax, eax
cmovne esi, eax
test esi, esi
jns 0x180122ef9
mov dword [rdi + 0x34], 0x10b
mov rdx, r14
mov rcx, rdi
call fcn.1801228b0
mov r15d, dword [rsp + 0xc0]
mov ebp, dword [rsp + 0xb0]
mov rcx, r14
call fcn.180028850
cmp dword [rdi + 0x34], 0
jne 0x18012310a
mov r14, qword [rsp + 0xb8]
lea esi, [r13 + 1]
dec ebp
cmp esi, ebp
jg 0x180122fa6
movsxd rdx, dword [r14]
mov rcx, rdi
shl rdx, 0x25
movsxd rax, esi
add rdx, rax
call fcn.1801199a0
mov r9, rax
test rax, rax
je 0x180122f91
mov ecx, dword [rax + 8]
cmp dword [rax + 0xc], ecx
jge 0x180122f63
mov dword [rdi + 0x34], 0x10b
lea ecx, [rbx + 1]
cmp esi, ecx
jl 0x180122f91
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 0x180122f91
mov dword [rdi + 0x34], 0x10b
mov rcx, r9
call fcn.180028850
inc esi
cmp dword [rdi + 0x34], 0
je 0x180122f33
jmp 0x18012310a
mov r13d, dword [rsp + 0xb0]
test r15d, r15d
je 0x1801230e4
movsxd rbp, dword [r14]
xor eax, eax
mov r8d, ebp
mov r9d, r13d
xor edx, edx
mov rcx, rdi
mov esi, r13d
mov ebx, eax
call fcn.18011b260
mov rdx, rax
mov rcx, rdi
mov r15, rax
call fcn.18011aff0
test eax, eax
jne 0x1801230da
mov r12, rbp
mov r13d, pe_nt_image_headers64
lea ebx, [rsi + 1]
mov esi, dword [r15 + 0x1c]
cmp ebx, esi
jge 0x180123047
mov rbp, r12
shl rbp, 0x25
movsxd rdx, ebx
mov rcx, rdi
add rdx, rbp
call fcn.1801199a0
test rax, rax
je 0x18012303a
mov r9, qword [rax]
movzx r8d, byte [r9]
movzx ecx, byte [r9 + 1]
imul r8d, r13d
add r8w, cx
je 0x180123032
mov dword [rdi + 0x34], 0x10b
mov rcx, rax
call fcn.180028850
mov esi, dword [r15 + 0x1c]
inc ebx
cmp ebx, esi
jl 0x180123002
mov rbp, r12
movsxd rax, esi
mov rdx, rbp
shl rdx, 0x25
mov rcx, rdi
add rdx, rax
call fcn.1801199a0
mov r14, rax
test rax, rax
je 0x1801230a9
mov rax, qword [rax]
movzx r8d, byte [rax]
movzx ecx, byte [rax + 1]
shl r8d, 8
add r8d, ecx
cmp r8d, dword [r14 + 0xc]
jge 0x180123097
mov ecx, r8d
lea rdx, [rsp + 0x58]
add rcx, rax
call fcn.18012d860
mov rax, qword [r15 + 0x20]
cmp qword [rsp + 0x58], rax
je 0x18012309e
mov dword [rdi + 0x34], 0x10b
mov rcx, r14
call fcn.180028850
mov rbp, r12
xor r8d, r8d
mov rdx, r15
mov rcx, rdi
call fcn.18011af30
mov rdx, r15
mov rcx, rdi
call fcn.18011aff0
test eax, eax
je 0x180122ff0
mov r14, qword [rsp + 0xb8]
mov r13d, dword [rsp + 0xb0]
mov rcx, r15
call fcn.18011b1b0
jmp 0x1801230e8
mov ebx, dword [r14 + 8]
cmp dword [rdi + 0x34], 0
jne 0x18012310a
mov r15, qword [rsp + 0xc8]
jmp 0x180122d30
mov rcx, r14
mov dword [rdi + 0x34], 0x10b
call fcn.180028850
mov r12, qword [rsp + 0x68]
mov rcx, qword [rsp + 0xc8]
call fcn.180055800
cmp dword [rdi + 0x34], 0
mov rsi, qword [rsp + 0x70]
jne 0x18012312a
mov dword [rdi + 0x34], eax
add rsp, 0x78
pop r15
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret