Function at 0x1401fb610
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
xor esi, esi
mov rax, qword [rsp + 0x130]
movsxd rdi, dword [rsp + 0x140]
mov qword [rsp + 0x30], rax
mov r13, rdx
mov rbx, rcx
mov r12, r9
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x3c], r8d
mov edx, dword [rsp + 0x148]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x150]
mov qword [rsp + 0x70], rax
mov eax, dword [rcx + 0x3c]
test eax, eax
jne 0x1401fb69b
test edi, edi
jns 0x1401fb68a
cmp qword [rcx + 0x18], 0
mov esi, dword [r13 + 0x18]
je 0x1401fb686
xor eax, eax
and r8b, 0x40
sete al
add esi, eax
jmp 0x1401fb69b
movsxd rax, edi
shl rax, 4
mov esi, dword [rax + r13 + 0x24]
cmp edx, esi
cmovle esi, edx
mov edx, esi
mov rcx, rbx
call fcn.1401fb230
mov rbp, rax
mov rax, qword [rsp + 0x70]
mov qword [rax], rbp
test rbp, rbp
je 0x1401fc214
mov eax, dword [rsp + 0x3c]
mov qword [rbp + 0x30], r12
and eax, 2
mov dword [rsp + 0x5c], eax
setne al
movzx eax, al
mov dword [rbp + 0x44], eax
mov eax, dword [rsp + 0x3c]
shr eax, 4
and eax, 1
mov byte [rbp + 0x48], al
test byte [rsp + 0x3c], 0x20
jne 0x1401fb6f1
lea rcx, [rbx + 0x3c]
mov rdx, rbp
call fcn.1401fa500
mov eax, dword [rbx + 0x3c]
mov dword [rsp + 0x40], eax
test eax, eax
jne 0x1401fc1a9
test edi, edi
jns 0x1401fc082
movsxd rax, dword [r13 + 0x1c]
mov r10, qword [rbx + 0x18]
add rax, 2
shl rax, 4
add rax, r13
mov qword [rsp + 0x80], rax
test r10, r10
je 0x1401fb968
mov esi, dword [rsp + 0x3c]
and esi, 0x40
jne 0x1401fb968
lea rax, [rbp + 0x60]
mov qword [rsp + 0x40], rax
xor eax, eax
mov dword [rsp + 0xac], eax
xor eax, eax
cmp qword [rsp + 0x30], 0
mov qword [rsp + 0xb0], rax
je 0x1401fb768
test byte [rsp + 0x3c], 8
je 0x1401fb7f3
mov r8d, dword [rsp + 0x38]
mov rdx, qword [rsp + 0x30]
lea r9, [r10 + 0x18]
xor eax, eax
mov rcx, r10
mov qword [rsp + 0xb8], rax
call fcn.1401f7d70
mov rcx, qword [rbx + 0x18]
lea rdx, [rsp + 0xb0]
lea r9, [rsp + 0xac]
mov dword [rbx + 0x3c], eax
lea r8, [rsp + 0xb8]
call fcn.14023a580
mov rcx, qword [rsp + 0xb0]
test rcx, rcx
je 0x1401fb7c0
call sub.msvcrt.dll_strlen
mov esi, eax
mov rdi, qword [rsp + 0xb8]
test rdi, rdi
je 0x1401fb953
lea rcx, [rbx + 0x3c]
mov edx, 0x10
call fcn.14023b880
mov r12, rax
test rax, rax
je 0x1401fb953
mov qword [rax], rdi
jmp 0x1401fb8dc
mov eax, dword [rsp + 0x38]
mov r8d, dword [r10 + 0x14]
lea edx, [rax - 1]
mov eax, 0xd
movsxd rdx, edx
test edx, edx
js 0x1401fb825
mov rdi, qword [rsp + 0x30]
lea ecx, [rax*8]
movzx r9d, byte [rdi + rdx]
dec rdx
xor ecx, r9d
xor eax, ecx
jmp 0x1401fb806
xor edx, edx
movsxd rdi, dword [rsp + 0x38]
div r8d
mov rax, qword [r10 + 0x20]
mov r14, qword [rax + rdx*8]
test r14, r14
je 0x1401fc1cd
mov r15d, dword [r14 + 0x1c]
lea eax, [r15 + 1]
cmp dword [rsp + 0x38], eax
jne 0x1401fb871
mov rdx, qword [rsp + 0x30]
lea rcx, [r14 + 0x30]
mov r8, rdi
mov qword [rsp + 0x48], r10
call sub.msvcrt.dll_memcmp
mov r10, qword [rsp + 0x48]
test eax, eax
je 0x1401fc1db
mov r14, qword [r14]
jmp 0x1401fb837
lea r11, [r12 + 0x10]
movsxd rsi, r15d
movsxd rcx, dword [rsp + 0x48]
mov rdx, r14
mov rdi, r11
add rsi, r14
mov r8d, 0x10
mov qword [rsp + 0x50], r11
rep movsb byte [rdi], byte [rsi]
sub r8d, r15d
mov rcx, r10
xor r15d, r15d
movsxd r8, r8d
add r8, r12
call fcn.1401f7be0
mov edi, dword [rsp + 0x48]
mov r11, qword [rsp + 0x50]
mov dword [rbx + 0x3c], r15d
mov esi, dword [rsp + 0x38]
add eax, edi
mov qword [r12], r11
mov dword [rsp + 0xac], eax
mov rax, qword [rsp + 0x30]
or dword [rbp + 0x68], 1
mov qword [rsp + 0xb0], rax
mov r9, qword [rsp + 0xb0]
mov r8d, esi
lea rdx, [rbp + 0xc8]
lea rcx, [rbx + 0x3c]
call fcn.140239140
mov esi, dword [rsp + 0xac]
mov rcx, qword [r12]
lea rdx, [rbp + 0xd8]
mov dword [r12 + 0xc], esi
mov dword [r12 + 8], esi
mov qword [rbp + 0x70], r12
call fcn.14023a310
cmp dword [rsp + 0x5c], 0
mov dword [rbp + 0xac], esi
movzx eax, al
mov qword [rbp + 0x80], rax
je 0x1401fb946
or dword [rbp + 0x68], 2
mov rdx, qword [rsp + 0x40]
mov rcx, rbx
call fcn.1401fecb0
jmp 0x1401fb953
mov rdx, qword [rsp + 0x40]
mov rcx, rbx
call fcn.1401fe4e0
mov rdx, qword [rsp + 0x40]
mov rcx, rbx
call fcn.1401fef00
mov dword [rsp + 0x40], 1
lea rax, [r13 + 0x20]
mov qword [rsp + 0x48], rax
mov rdi, qword [rsp + 0x80]
cmp qword [rsp + 0x48], rdi
jae 0x1401fc09b
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 4]
mov dword [rsp + 0x60], eax
dec eax
mov dword [rsp + 0x64], eax
movsxd rax, dword [rsp + 0x40]
imul rax, rax, 0x88
lea rsi, [rbp + rax + 0x60]
movsxd rax, dword [rsp + 0x64]
imul rax, rax, 0x38
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x3c]
and eax, 8
mov dword [rsp + 0x58], eax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x98], rax
cmp dword [rsp + 0x64], 0
js 0x1401fc067
mov rax, qword [rsp + 0x48]
mov r12, qword [rsp + 0x68]
add r12, qword [rax + 8]
cmp qword [rsp + 0x30], 0
jne 0x1401fba10
cmp dword [r12 + 4], 0
je 0x1401fc051
mov r8, rsi
mov rdx, r12
mov rcx, rbx
call fcn.1401fe440
jmp 0x1401fc051
lea rdx, [rsi + 8]
xor eax, eax
mov ecx, 0x20
mov rdi, rdx
rep stosd dword [rdi], eax
mov qword [rsi], r12
cmp qword [rbx + 0x68], 0
jne 0x1401fba50
mov rax, qword [rbx]
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.14026cbb0
lea rdx, [rbx + 0x68]
mov rcx, rbx
mov r8, rax
call fcn.1401f95e0
cmp dword [rbx + 0x3c], 0
mov rdi, qword [rbx + 0x68]
jne 0x1401fc051
mov r8d, dword [r12]
mov edx, 1
mov rcx, rdi
xor r14d, r14d
call fcn.140268a50
mov qword [rsp + 0x20], r14
mov r9d, dword [rsp + 0x38]
mov rcx, rdi
mov r8, qword [rsp + 0x30]
mov edx, 2
call fcn.140268980
mov rcx, rdi
call fcn.14026e550
cmp eax, 0x64
jne 0x1401fbab4
xor edx, edx
mov rcx, rdi
call fcn.140269880
movsxd r13, eax
and eax, 1
mov dword [rsp + 0x50], eax
sar r13, 1
jmp 0x1401fbac2
xor r13d, r13d
mov dword [rsp + 0x50], r13d
mov r13d, 1
mov rcx, rdi
call fcn.14026d600
mov edx, 2
mov rcx, rdi
mov dword [rbx + 0x3c], eax
call fcn.140268ab0
mov eax, dword [r12 + 4]
cmp eax, r13d
jle 0x1401fbaef
xor r11d, r11d
mov r13d, eax
mov dword [rsp + 0x50], r11d
dec r13d
mov rdx, rsi
mov rcx, rbx
mov dword [rsi + 0xc], r13d
call fcn.1401fe9f0
mov r14, qword [rsi + 0x10]
test r14, r14
je 0x1401fbe64
mov ecx, dword [r14 + 0xc]
mov r12, qword [r14]
xor r10d, r10d
mov rdx, qword [rsp + 0x98]
mov r13d, dword [r14 + 8]
mov dword [rsp + 0xa8], r10d
mov rdi, rcx
add rcx, r12
mov dword [rsp + 0xac], r10d
call fcn.14023a4b0
mov edx, dword [rsp + 0xb0]
mov dword [rsp + 0xa4], edx
cmp r13d, edx
jb 0x1401fbc7a
add edi, eax
lea rax, [rsp + 0xac]
xor r8d, r8d
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x78], rax
jmp 0x1401fbba0
mov ecx, r8d
lea eax, [r8 + 1]
add rcx, r12
mov dword [rsp + 0xa4], eax
movzx edx, byte [rcx]
mov dword [rsp + 0xa8], edx
test dl, dl
js 0x1401fbcbb
mov r8d, r15d
mov ecx, dword [rsp + 0xa4]
lea eax, [rcx + 1]
mov r15, rcx
add rcx, r12
movzx edx, byte [rcx]
mov dword [rsp + 0xa4], eax
mov dword [rsp + 0xac], edx
test dl, dl
jns 0x1401fbbec
mov rdx, qword [rsp + 0x90]
mov dword [rsp + 0x88], r8d
call fcn.14023a4b0
mov r8d, dword [rsp + 0x88]
add eax, r15d
mov dword [rsp + 0xa4], eax
cmp dword [rsp + 0xa8], r8d
jb 0x1401fc1bd
mov r15d, r8d
jne 0x1401fbc3f
mov ecx, dword [rsp + 0x38]
mov edx, dword [rsp + 0xac]
mov r10d, dword [rsp + 0xa4]
sub ecx, r8d
cmp ecx, edx
cmova ecx, edx
xor eax, eax
mov dword [rsp + 0x88], ecx
lea r15d, [r8 + rax]
cmp dword [rsp + 0x88], eax
jne 0x1401fbc86
cmp dword [rsp + 0x38], r15d
je 0x1401fbce4
cmp eax, edx
jb 0x1401fbca0
cmp edi, r13d
jae 0x1401fbd0b
mov ecx, edi
mov rdx, qword [rsp + 0x78]
add rcx, r12
call fcn.14023a4b0
mov r8d, dword [rsp + 0xa8]
add r8d, dword [rsp + 0xb0]
mov dword [rsp + 0xb0], r8d
add edi, eax
cmp r8d, r13d
jb 0x1401fbb7a
mov dword [rbx + 0x3c], 0x10b
jmp 0x1401fbe64
mov rcx, qword [rsp + 0x30]
mov r11d, r15d
lea r9d, [r10 + rax]
mov cl, byte [rcx + r11]
cmp byte [r12 + r9], cl
jne 0x1401fbc30
inc eax
jmp 0x1401fbc23
add eax, r10d
mov rcx, qword [rsp + 0x30]
mov edx, r15d
mov eax, eax
mov al, byte [r12 + rax]
cmp byte [rcx + rdx], al
jae 0x1401fbc3f
jmp 0x1401fc1bd
mov rdx, qword [rsp + 0x78]
mov dword [rsp + 0x88], r8d
call fcn.14023a4b0
mov r8d, dword [rsp + 0x88]
add eax, r8d
mov dword [rsp + 0xa4], eax
jmp 0x1401fbb9d
cmp dword [rsp + 0x58], 0
jne 0x1401fbd9b
cmp edx, eax
je 0x1401fbd9b
mov rcx, r14
call fcn.14026bb70
xor r9d, r9d
mov qword [rsi + 0x10], r9
jmp 0x1401fbe64
cmp dword [rsp + 0x58], 0
je 0x1401fbcf7
mov rdx, rsi
mov rcx, rbx
call fcn.1401fe9f0
mov rax, qword [rsi + 0x10]
test rax, rax
je 0x1401fc03e
mov edi, dword [rax + 0xc]
mov r13d, dword [rax + 8]
mov r12, qword [rax]
cmp edi, r13d
jge 0x1401fbd12
mov ecx, edi
lea rdx, [rsp + 0xa4]
add rcx, r12
call fcn.14023a4b0
mov r14d, dword [rsp + 0xa4]
cmp r14d, 3
jbe 0x1401fbff8
mov ecx, r14d
movsxd rdx, edi
cmp rcx, rdx
jge 0x1401fbff8
xor r8d, r8d
lea rdx, [rsp + 0xac]
add rcx, r12
add edi, eax
mov dword [rsp + 0xa8], r8d
mov dword [rsp + 0xb0], r14d
call fcn.14023a4b0
add eax, r14d
mov dword [rsp + 0xa4], eax
mov ecx, dword [rsp + 0xac]
mov r14d, dword [rsp + 0xa4]
mov r8d, r13d
mov r15, rcx
add rcx, r14
cmp rcx, r8
jg 0x1401fbc7a
test r15d, r15d
je 0x1401fbc7a
mov edx, dword [rsi + 0xc]
lea eax, [r14 + r15]
mov r9, qword [rsp + 0x30]
lea rcx, [rbx + 0x3c]
mov qword [rsi + 0x20], rax
mov r8d, dword [rsp + 0xa8]
mov dword [rsi + 0x40], edx
lea rdx, [rsi + 0x68]
mov dword [rsi + 0x44], eax
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0x78], rcx
call fcn.140239140
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x78]
mov r8d, r15d
lea r9, [r12 + r14]
call fcn.140239020
cmp edi, r13d
jb 0x1401fbe26
mov rax, qword [rsi + 0x10]
mov eax, dword [rax + 8]
inc eax
jmp 0x1401fbe48
mov ecx, edi
lea rdx, [rsp + 0xb8]
add rcx, r12
call fcn.14023a4b0
add edi, eax
mov eax, dword [rsp + 0xb8]
add eax, dword [rsp + 0xb0]
mov dword [rsi + 0x4c], eax
mov rdx, rsi
mov rcx, rbx
mov dword [rsi + 0x48], edi
call fcn.1401fe5a0
mov rdx, rsi
mov rcx, rbx
call fcn.1401fe4e0
mov r12d, dword [rsp + 0x58]
or r12d, dword [rbx + 0x3c]
jne 0x1401fc03e
mov eax, dword [rsi + 8]
mov rcx, qword [rsi + 0x10]
mov edx, eax
or edx, 1
mov dword [rsi + 8], edx
test rcx, rcx
je 0x1401fc03e
cmp dword [rsp + 0x5c], 0
je 0x1401fbeaa
or eax, 3
cmp dword [rsp + 0x50], 0
mov dword [rsi + 8], eax
jne 0x1401fbeb5
mov rax, qword [rsi + 0x60]
test rax, rax
jne 0x1401fbeec
jmp 0x1401fbf1c
cmp dword [rsp + 0x50], 0
je 0x1401fc03e
mov rax, qword [rsi]
mov edx, dword [rsi + 8]
mov r9d, dword [rsi + 0x40]
mov r8d, dword [rax]
and edx, 2
cmp r9d, dword [rsi + 0xc]
jne 0x1401fbed3
mov eax, dword [rcx + 0xc]
cmp dword [rsi + 0x4c], eax
jl 0x1401fbedf
mov rcx, rbx
call fcn.1401f49c0
mov qword [rsi + 0x60], rax
cmp dword [rsp + 0x5c], 0
je 0x1401fc03e
jmp 0x1401fbe9f
mov rdx, qword [rbx]
cmp dword [rdx + 0x80], 4
jne 0x1401fbf1c
mov r12d, dword [rax + 0x1c]
mov rax, qword [rsi]
mov rcx, rbx
movsxd rdx, dword [rax]
movsxd rax, r12d
shl rdx, 0x25
add rdx, rax
call fcn.1401fa890
mov r15, rax
jmp 0x1401fbfcd
mov r8, qword [rsi + 0x10]
mov edi, dword [rsi + 0xc]
mov eax, 4
cmp dword [rsi + 0x40], edi
jne 0x1401fbf30
mov eax, dword [rsi + 0x44]
lea r10d, [rax + 9]
mov r11, qword [r8]
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 0x1401fbf3b
movsxd rdx, edx
mov eax, dword [r8 + 0xc]
mov qword [rsi + 0x20], rdx
cmp dword [rsi + 0x4c], eax
jl 0x1401fc033
inc edi
mov r14, qword [rsi]
xor r15d, r15d
movsxd r13, edi
cmp dword [rbx + 0x3c], 0
jne 0x1401fbfcd
cmp edi, dword [r14 + 8]
jg 0x1401fbfcd
movsxd rdx, dword [r14]
mov rcx, rbx
shl rdx, 0x25
add rdx, r13
call fcn.1401fa890
mov rcx, rax
test rax, rax
je 0x1401fbfc6
mov rdx, qword [rcx]
mov eax, dword [rax + 0xc]
cmp word [rdx], 0
mov dword [rsp + 0x50], eax
mov eax, dword [rcx + 8]
je 0x1401fbfb3
mov r12d, edi
xchg r15, rcx
mov dword [rsp + 0x78], eax
call fcn.14026bb70
mov eax, dword [rsp + 0x78]
cmp dword [rsp + 0x50], eax
jl 0x1401fbfcd
inc edi
inc r13
jmp 0x1401fbf74
test r15, r15
je 0x1401fc033
mov rcx, qword [rsi + 0x10]
call fcn.14026bb70
mov rcx, qword [r15]
mov edi, dword [r15 + 0xc]
mov dword [rsi + 0xc], r12d
mov qword [rsi + 0x10], r15
mov ax, word [rcx]
xchg al, ah
movzx r12d, ax
cmp r12d, edi
jle 0x1401fc001
mov dword [rbx + 0x3c], 0x10b
jmp 0x1401fc03e
movzx eax, ax
lea rdx, [rsi + 0x78]
add rcx, rax
call fcn.14023a310
movzx eax, al
add eax, r12d
cdqe
mov qword [rsi + 0x20], rax
mov eax, dword [r15 + 8]
cmp edi, eax
jl 0x1401fc028
inc eax
jmp 0x1401fc030
mov rcx, r15
call fcn.1401fa860
mov dword [rsi + 0x4c], eax
mov rdx, rsi
mov rcx, rbx
call fcn.1401fecb0
mov rcx, rbx
mov rdx, rsi
call fcn.1401fef00
mov rcx, rbx
call fcn.1401fe400
dec dword [rsp + 0x64]
add rsi, 0x88
sub qword [rsp + 0x68], 0x38
jmp 0x1401fb9d0
xor eax, eax
cmp dword [rsp + 0x60], 0
cmovns eax, dword [rsp + 0x60]
add qword [rsp + 0x48], 0x10
add dword [rsp + 0x40], eax
jmp 0x1401fb971
dec esi
add rdi, 2
lea r14, [rbp + 0x60]
movsxd r12, esi
shl rdi, 4
imul r12, r12, 0x38
test esi, esi
jns 0x1401fc0ad
cmp dword [rbx + 0x3c], 0
jne 0x1401fc1a9
mov eax, dword [rbp + 0x40]
lea esi, [rax - 1]
jmp 0x1401fc0e7
mov rdx, qword [r13 + rdi + 8]
add rdx, r12
cmp dword [rdx + 4], 0
je 0x1401fc0c6
mov r8, r14
mov rcx, rbx
call fcn.1401fe440
dec esi
sub r12, 0x38
add r14, 0x88
jmp 0x1401fc097
mov edx, esi
mov rcx, rbp
call fcn.1401fb2a0
mov edi, eax
test eax, eax
jne 0x1401fc0ed
dec esi
test esi, esi
jg 0x1401fc0d5
jmp 0x1401fc121
cmp dword [rbx + 0x3c], 0
jne 0x1401fc10e
cdqe
xor r8d, r8d
mov rcx, rbx
imul rax, rax, 0x88
lea rdx, [rbp + rax + 0x60]
call qword [rbp + rax + 0x98]
mov r9d, esi
mov r8d, edi
mov rdx, rbp
mov rcx, rbx
call fcn.1401fb1b0
jmp 0x1401fc0e5
mov rcx, rbp
call fcn.1401fc6d0
cmp byte [rbp + 0x48], 0
je 0x1401fc162
mov ecx, dword [rbx + 0x3c]
mov rdx, rbp
call fcn.1401fb5e0
test eax, eax
je 0x1401fc162
xor r9d, r9d
xor r8d, r8d
mov rdx, rbp
mov rcx, rbx
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.1401fc230
mov rcx, rbp
call fcn.1401fb460
test eax, eax
jne 0x1401fc13e
cmp byte [rbp + 0x14], 0
jne 0x1401fc214
mov rax, qword [rbp + 0x58]
mov rcx, rbp
movzx eax, word [rax + 4]
imul rax, rax, 0x88
lea rdx, [rbp + rax + 0x60]
mov rax, qword [rbp + 0x38]
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp rax
mov rcx, rbp
call fcn.1401fb3b0
mov rax, qword [rsp + 0x70]
xor edx, edx
mov qword [rax], rdx
jmp 0x1401fc214
cmp dword [rsp + 0x58], 0
jne 0x1401fbd9b
jmp 0x1401fbcf7
xor eax, eax
mov dword [rbx + 0x3c], eax
or dword [rbp + 0x68], 1
jmp 0x1401fb953
mov eax, dword [r14 + 0x18]
add r15d, 0x32
mov qword [rsp + 0x50], r10
sub eax, r15d
lea ecx, [rax + 0x1a]
mov dword [rsp + 0x48], eax
movsxd rcx, ecx
call fcn.14026cb10
mov r10, qword [rsp + 0x50]
test rax, rax
mov r12, rax
jne 0x1401fb876
mov dword [rbx + 0x3c], 7
jmp 0x1401fc1d2
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret