Function at 0x14018b0e0
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, 0xb8
xor ebx, ebx
mov rax, qword [rsp + 0x120]
cmp dword [rcx + 0x34], 0
movsxd rsi, dword [rsp + 0x130]
mov qword [rsp + 0x30], rax
mov rbp, rdx
mov r12, rcx
mov rdi, r9
mov eax, dword [rsp + 0x128]
mov dword [rsp + 0x44], r8d
mov edx, dword [rsp + 0x138]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x140]
mov qword [rsp + 0x70], rax
jne 0x14018b166
test esi, esi
jns 0x14018b150
xor ebx, ebx
cmp qword [rcx + 0x18], 0
setne bl
add ebx, dword [rbp + 0x10]
jmp 0x14018b166
movsxd rax, esi
mov ebx, edx
inc rax
shl rax, 4
add rax, rbp
cmp dword [rax + 0xc], edx
cmovle ebx, dword [rax + 0xc]
mov edx, ebx
mov rcx, r12
call fcn.14018ae80
mov r13, rax
mov rax, qword [rsp + 0x70]
mov qword [rax], r13
test r13, r13
je 0x14018bc8e
mov eax, dword [rsp + 0x44]
mov qword [r13 + 0x30], rdi
and eax, 2
mov dword [rsp + 0x58], eax
setne al
movzx eax, al
mov dword [r13 + 0x44], eax
mov eax, dword [rsp + 0x44]
shr eax, 4
and eax, 1
mov byte [r13 + 0x48], al
test byte [rsp + 0x44], 0x20
jne 0x14018b1bf
lea rcx, [r12 + 0x34]
mov rdx, r13
call fcn.14018a140
mov eax, dword [r12 + 0x34]
mov dword [rsp + 0x38], eax
test eax, eax
jne 0x14018bc42
test esi, esi
jns 0x14018bb2b
movsxd rax, dword [rbp + 0x14]
mov r10, qword [r12 + 0x18]
shl rax, 4
lea rax, [rbp + rax + 0x18]
mov qword [rsp + 0x80], rax
test r10, r10
je 0x14018b471
cmp qword [rsp + 0x30], 0
lea r15, [r13 + 0x60]
mov dword [rsp + 0x9c], 0
mov qword [rsp + 0xa0], 0
je 0x14018b22b
mov esi, dword [rsp + 0x44]
and esi, 8
je 0x14018b2c4
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x30]
lea r9, [r10 + 0x18]
mov rcx, r10
mov qword [rsp + 0xa8], 0
call fcn.140188480
mov rcx, qword [r12 + 0x18]
lea rdx, [rsp + 0xa0]
lea r9, [rsp + 0x9c]
mov dword [r12 + 0x34], eax
lea r8, [rsp + 0xa8]
call fcn.1401c6d00
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x14018b28a
call sub.msvcrt.dll_strlen
mov dword [rsp + 0x38], eax
cmp qword [rsp + 0xa8], 0
je 0x14018b45e
lea rcx, [r12 + 0x34]
mov edx, 0x10
call fcn.1401c80d0
mov rbx, rax
test rax, rax
je 0x14018b45e
mov rax, qword [rsp + 0xa8]
mov qword [rbx], rax
jmp 0x14018b3e3
mov eax, dword [rsp + 0x40]
mov r8d, dword [r10 + 0x14]
lea edx, [rax - 1]
mov eax, 0xd
movsxd rdx, edx
test edx, edx
js 0x14018b2f6
mov rdi, qword [rsp + 0x30]
lea ecx, [rax*8]
movzx r9d, byte [rdi + rdx]
dec rdx
xor ecx, r9d
xor eax, ecx
jmp 0x14018b2d7
xor edx, edx
movsxd rdi, dword [rsp + 0x40]
div r8d
mov rax, qword [r10 + 0x20]
mov r14, qword [rax + rdx*8]
test r14, r14
je 0x14018b33e
mov ebx, dword [r14 + 0x1c]
lea eax, [rbx + 1]
cmp dword [rsp + 0x40], eax
jne 0x14018b339
mov rdx, qword [rsp + 0x30]
lea rcx, [r14 + 0x30]
mov r8, rdi
mov qword [rsp + 0x38], r10
call sub.msvcrt.dll_memcmp
mov r10, qword [rsp + 0x38]
test eax, eax
je 0x14018b342
mov r14, qword [r14]
jmp 0x14018b308
xor ebx, ebx
jmp 0x14018b3b8
mov eax, dword [r14 + 0x18]
lea edx, [rbx + 0x32]
mov qword [rsp + 0x50], r10
mov dword [rsp + 0x48], edx
sub eax, edx
lea ecx, [rax + 0x1a]
mov dword [rsp + 0x38], eax
movsxd rcx, ecx
call fcn.1401fae60
mov edx, dword [rsp + 0x48]
mov r10, qword [rsp + 0x50]
test rax, rax
mov rbx, rax
je 0x14018bc79
lea rax, [rbx + 0x10]
movsxd rsi, edx
movsxd rcx, dword [rsp + 0x38]
mov r8d, 0x10
add rsi, r14
mov rdi, rax
sub r8d, edx
mov rdx, r14
rep movsb byte [rdi], byte [rsi]
movsxd r8, r8d
mov rcx, r10
xor esi, esi
add r8, rbx
call fcn.140188310
mov edi, dword [rsp + 0x38]
lea r14d, [rdi + rax]
mov dword [rsp + 0x9c], r14d
mov dword [r12 + 0x34], esi
test rbx, rbx
je 0x14018b3c9
lea rax, [rbx + 0x10]
mov qword [rbx], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0xa0], rax
mov eax, dword [rsp + 0x40]
or dword [r13 + 0x68], 1
mov dword [rsp + 0x38], eax
test rbx, rbx
je 0x14018b45e
mov r9, qword [rsp + 0xa0]
mov r8d, dword [rsp + 0x38]
lea rcx, [r12 + 0x34]
lea rdx, [r13 + 0xb8]
call fcn.1401c58f0
mov eax, dword [rsp + 0x9c]
mov rcx, qword [rbx]
lea rdx, [r13 + 0xc8]
mov dword [rbx + 0xc], eax
mov dword [rbx + 8], eax
mov qword [r13 + 0x70], rbx
call fcn.1401c6aa0
cmp dword [rsp + 0x58], 0
movzx eax, al
mov qword [r13 + 0x80], rax
mov eax, dword [rbx + 8]
mov dword [r13 + 0x9c], eax
je 0x14018b453
or dword [r13 + 0x68], 2
mov rdx, r15
mov rcx, r12
call fcn.14018e460
jmp 0x14018b45e
mov rdx, r15
mov rcx, r12
call fcn.14018dc60
mov rdx, r15
mov rcx, r12
call fcn.14018e6e0
mov dword [rsp + 0x38], 1
lea rax, [rbp + 0x18]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x98]
mov qword [rsp + 0x78], rax
mov rdi, qword [rsp + 0x80]
cmp qword [rsp + 0x48], rdi
jae 0x14018bb43
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 4]
mov dword [rsp + 0x5c], eax
dec eax
mov dword [rsp + 0x60], eax
movsxd rax, dword [rsp + 0x38]
imul rax, rax, 0x78
lea rbp, [r13 + rax + 0x60]
movsxd rax, dword [rsp + 0x60]
imul rax, rax, 0xc
mov qword [rsp + 0x68], rax
cmp dword [rsp + 0x60], 0
js 0x14018bb0d
mov rax, qword [rsp + 0x48]
mov r14, qword [rsp + 0x68]
add r14, qword [rax + 8]
cmp qword [rsp + 0x30], 0
jne 0x14018b507
cmp dword [r14 + 4], 0
je 0x14018bafa
mov r8, rbp
mov rdx, r14
mov rcx, r12
call fcn.14018dbd0
jmp 0x14018bafa
lea rdx, [rbp + 8]
xor eax, eax
mov ecx, 0x1c
mov rdi, rdx
rep stosd dword [rdi], eax
mov qword [rbp], r14
cmp qword [r12 + 0x60], 0
jne 0x14018b54b
mov rax, qword [r12]
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.1401faf00
lea rdx, [r12 + 0x60]
mov rcx, r12
mov r8, rax
call fcn.1401893f0
cmp dword [r12 + 0x34], 0
jne 0x14018bafa
mov r15, qword [r12 + 0x60]
mov r8d, dword [r14]
mov edx, 1
mov rcx, r15
call fcn.1401f6d80
mov r9d, dword [rsp + 0x40]
mov r8, qword [rsp + 0x30]
mov qword [rsp + 0x20], 0
mov rcx, r15
mov edx, 2
call fcn.1401f6ca0
mov rcx, r15
call fcn.1401fc730
cmp eax, 0x64
jne 0x14018b5b2
xor edx, edx
mov rcx, r15
call fcn.1401f7c30
movsxd rbx, eax
and eax, 1
mov dword [rsp + 0x50], eax
sar rbx, 1
jmp 0x14018b5bf
mov dword [rsp + 0x50], 0
mov ebx, 1
mov rcx, r15
call fcn.1401fb9b0
mov edx, 2
mov rcx, r15
mov dword [r12 + 0x34], eax
call fcn.1401f6df0
mov eax, dword [r14 + 4]
cmp eax, ebx
jle 0x14018b5eb
mov dword [rsp + 0x50], 0
mov ebx, eax
dec ebx
mov eax, dword [rsp + 0x44]
mov rdx, rbp
mov rcx, r12
mov dword [rbp + 0xc], ebx
and eax, 8
mov dword [rsp + 0x64], eax
call fcn.14018e170
mov rax, qword [rbp + 0x10]
test rax, rax
je 0x14018b919
mov rsi, qword [rax]
mov edi, dword [rax + 8]
lea rdx, [rsp + 0xa0]
mov dword [rsp + 0x9c], 0
mov dword [rsp + 0x98], 0
mov ecx, dword [rax + 0xc]
mov rbx, rcx
add rcx, rsi
call fcn.1401c6c30
mov edx, dword [rsp + 0xa0]
mov dword [rsp + 0x94], edx
cmp edi, edx
jb 0x14018b755
add ebx, eax
lea rax, [rsp + 0x9c]
xor r15d, r15d
mov qword [rsp + 0x88], rax
jmp 0x14018b699
mov ecx, eax
lea edx, [rax + 1]
add rcx, rsi
mov dword [rsp + 0x94], edx
movzx r8d, byte [rcx]
mov dword [rsp + 0x98], r8d
test r8b, r8b
js 0x14018b7a3
mov r15d, r14d
mov ecx, dword [rsp + 0x94]
lea edx, [rcx + 1]
mov rax, rcx
add rcx, rsi
mov dword [rsp + 0x94], edx
movzx r8d, byte [rcx]
mov dword [rsp + 0x9c], r8d
test r8b, r8b
jns 0x14018b6dc
mov rdx, qword [rsp + 0x88]
mov dword [rsp + 0x94], eax
call fcn.1401c6c30
add dword [rsp + 0x94], eax
cmp dword [rsp + 0x98], r15d
jb 0x14018bc58
mov r14d, r15d
jne 0x14018b71f
mov ecx, dword [rsp + 0x40]
mov edx, dword [rsp + 0x9c]
mov r9d, dword [rsp + 0x94]
sub ecx, r15d
cmp ecx, edx
cmova ecx, edx
xor eax, eax
lea r14d, [r15 + rax]
cmp ecx, eax
jne 0x14018b763
cmp dword [rsp + 0x40], r14d
je 0x14018b77d
cmp edx, eax
ja 0x14018b78a
cmp edi, ebx
jbe 0x14018b7c0
mov ecx, ebx
mov rdx, qword [rsp + 0x78]
add rcx, rsi
call fcn.1401c6c30
add ebx, eax
mov eax, dword [rsp + 0x98]
add eax, dword [rsp + 0xa0]
mov dword [rsp + 0xa0], eax
cmp edi, eax
ja 0x14018b672
mov dword [r12 + 0x34], 0x10b
jmp 0x14018b919
mov r10, qword [rsp + 0x30]
mov r11d, r14d
lea r8d, [r9 + rax]
mov r11b, byte [r10 + r11]
cmp byte [rsi + r8], r11b
jne 0x14018b714
inc eax
jmp 0x14018b70c
cmp edx, eax
jne 0x14018bc58
jmp 0x14018b852
mov rcx, qword [rsp + 0x30]
lea edx, [r9 + rax]
mov eax, r14d
mov al, byte [rcx + rax]
cmp byte [rsi + rdx], al
jbe 0x14018b71f
jmp 0x14018bc58
mov rdx, qword [rsp + 0x78]
mov dword [rsp + 0x94], eax
call fcn.1401c6c30
add dword [rsp + 0x94], eax
jmp 0x14018b696
cmp dword [rsp + 0x64], 0
je 0x14018bc63
mov rdx, rbp
mov rcx, r12
call fcn.14018e170
mov rax, qword [rbp + 0x10]
test rax, rax
je 0x14018b919
mov ebx, dword [rax + 0xc]
cmp ebx, dword [rax + 8]
jge 0x14018b7cb
mov rsi, qword [rax]
mov ecx, ebx
lea rdx, [rsp + 0x94]
add rcx, rsi
call fcn.1401c6c30
mov edx, dword [rsp + 0x94]
cmp edx, 3
jbe 0x14018b755
mov r8, qword [rbp + 0x10]
mov ecx, edx
movsxd r9, dword [r8 + 0xc]
cmp rcx, r9
jge 0x14018b755
mov dword [rsp + 0xa0], edx
add rcx, rsi
lea rdx, [rsp + 0x9c]
add ebx, eax
mov dword [rsp + 0x98], 0
mov edi, dword [r8 + 8]
call fcn.1401c6c30
add dword [rsp + 0x94], eax
mov r8d, dword [rsp + 0x9c]
mov ecx, dword [rsp + 0x94]
mov rdx, r8
mov rax, rcx
add rcx, r8
mov r8d, edi
cmp rcx, r8
jg 0x14018b755
test edx, edx
je 0x14018b755
add edx, eax
mov eax, dword [rbp + 0xc]
mov r9, qword [rsp + 0x30]
lea r15, [rbp + 0x58]
mov dword [rbp + 0x34], edx
mov r8d, dword [rsp + 0x98]
lea r14, [r12 + 0x34]
mov qword [rbp + 0x20], rdx
mov rcx, r14
mov rdx, r15
mov dword [rbp + 0x30], eax
call fcn.1401c58f0
mov eax, dword [rsp + 0x94]
mov rdx, r15
mov rcx, r14
mov r8d, dword [rsp + 0x9c]
lea r9, [rsi + rax]
call fcn.1401c57c0
cmp edi, ebx
ja 0x14018b8db
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 8]
inc eax
jmp 0x14018b8fd
mov ecx, ebx
lea rdx, [rsp + 0xa8]
add rcx, rsi
call fcn.1401c6c30
add ebx, eax
mov eax, dword [rsp + 0xa8]
add eax, dword [rsp + 0xa0]
mov dword [rbp + 0x3c], eax
mov rdx, rbp
mov rcx, r12
mov dword [rbp + 0x38], ebx
call fcn.14018dd10
mov rdx, rbp
mov rcx, r12
call fcn.14018dc60
mov esi, dword [rsp + 0x64]
or esi, dword [r12 + 0x34]
jne 0x14018baef
mov eax, dword [rbp + 8]
mov rcx, qword [rbp + 0x10]
mov edx, eax
or edx, 1
mov dword [rbp + 8], edx
test rcx, rcx
je 0x14018baef
cmp dword [rsp + 0x58], 0
je 0x14018b982
or eax, 3
cmp dword [rsp + 0x50], 0
mov dword [rbp + 8], eax
jne 0x14018b98d
mov r14, qword [rbp + 0x50]
test r14, r14
je 0x14018b9c5
mov rax, qword [rbp]
mov esi, dword [r14 + 0x1c]
mov rcx, r12
movsxd rdx, dword [rax]
movsxd rax, esi
shl rdx, 0x25
add rdx, rax
call fcn.14018a4d0
mov r14, rax
jmp 0x14018ba79
cmp dword [rsp + 0x50], 0
je 0x14018baef
mov rax, qword [rbp]
mov edx, dword [rbp + 8]
mov r9d, dword [rbp + 0x30]
mov r8d, dword [rax]
and edx, 2
cmp r9d, dword [rbp + 0xc]
jne 0x14018b9ac
mov eax, dword [rcx + 0xc]
cmp dword [rbp + 0x3c], eax
jl 0x14018b9b8
mov rcx, r12
call fcn.140185730
mov qword [rbp + 0x50], rax
cmp dword [rsp + 0x58], 0
je 0x14018baef
jmp 0x14018b954
mov r9, qword [rbp + 0x10]
mov ebx, dword [rbp + 0xc]
mov eax, 4
cmp dword [rbp + 0x30], ebx
jne 0x14018b9d9
mov eax, dword [rbp + 0x34]
lea edi, [rax + 9]
mov r8, qword [r9]
inc eax
cdqe
mov cl, byte [r8 + rax - 1]
movsxd rdx, eax
shr cl, 7
cmp edi, eax
setg r11b
inc rax
test cl, r11b
jne 0x14018b9e3
mov qword [rbp + 0x20], rdx
mov eax, dword [r9 + 0xc]
cmp dword [rbp + 0x3c], eax
jl 0x14018bae4
inc ebx
mov r15, qword [rbp]
movsxd rdi, ebx
cmp dword [r12 + 0x34], 0
jne 0x14018ba79
cmp ebx, dword [r15 + 8]
jg 0x14018ba79
movsxd rdx, dword [r15]
mov rcx, r12
shl rdx, 0x25
add rdx, rdi
call fcn.14018a4d0
mov rcx, rax
test rax, rax
je 0x14018ba72
mov rdx, qword [rax]
mov eax, dword [rax + 0xc]
mov dword [rsp + 0x50], eax
mov eax, dword [rcx + 8]
mov dword [rsp + 0x64], eax
movzx eax, byte [rdx]
movzx edx, byte [rdx + 1]
shl eax, 8
add ax, dx
je 0x14018ba63
mov esi, ebx
xchg r14, rcx
call fcn.1401f9f40
mov edx, dword [rsp + 0x64]
cmp dword [rsp + 0x50], edx
jl 0x14018ba79
inc ebx
inc rdi
jmp 0x14018ba16
test r14, r14
je 0x14018bae4
mov rcx, qword [rbp + 0x10]
call fcn.1401f9f40
mov rax, qword [r14]
mov qword [rbp + 0x10], r14
mov dword [rbp + 0xc], esi
movzx ecx, byte [rax]
movzx edx, byte [rax + 1]
shl ecx, 8
add ecx, edx
movzx ebx, cx
cmp ebx, dword [r14 + 0xc]
jle 0x14018bab1
mov dword [r12 + 0x34], 0x10b
jmp 0x14018baef
movzx ecx, cx
lea rdx, [rbp + 0x68]
add rcx, rax
call fcn.1401c6aa0
movzx eax, al
add eax, ebx
cdqe
mov qword [rbp + 0x20], rax
mov eax, dword [r14 + 8]
cmp dword [r14 + 0xc], eax
jl 0x14018bad9
inc eax
jmp 0x14018bae1
mov rcx, r14
call fcn.14018a4a0
mov dword [rbp + 0x3c], eax
mov rdx, rbp
mov rcx, r12
call fcn.14018e460
mov rdx, rbp
mov rcx, r12
call fcn.14018e6e0
dec dword [rsp + 0x60]
add rbp, 0x78
sub qword [rsp + 0x68], 0xc
jmp 0x14018b4c8
cmp dword [rsp + 0x5c], 0
mov eax, 0
cmovns eax, dword [rsp + 0x5c]
add qword [rsp + 0x48], 0x10
add dword [rsp + 0x38], eax
jmp 0x14018b487
dec ebx
inc rsi
lea r14, [r13 + 0x60]
movsxd rdi, ebx
shl rsi, 4
imul rdi, rdi, 0xc
test ebx, ebx
jns 0x14018bb58
cmp dword [r12 + 0x34], 0
jne 0x14018bc42
mov eax, dword [r13 + 0x40]
lea ebx, [rax - 1]
jmp 0x14018bb8f
mov rdx, qword [rbp + rsi + 0x10]
add rdx, rdi
cmp dword [rdx + 4], 0
je 0x14018bb71
mov r8, r14
mov rcx, r12
call fcn.14018dbd0
dec ebx
add r14, 0x78
sub rdi, 0xc
jmp 0x14018bb3f
mov edx, ebx
mov rcx, r13
call fcn.14018aef0
mov esi, eax
test eax, eax
jne 0x14018bb95
dec ebx
test ebx, ebx
jg 0x14018bb7d
jmp 0x14018bbc9
cmp dword [r12 + 0x34], 0
jne 0x14018bbb6
cdqe
xor r8d, r8d
mov rcx, r12
imul rax, rax, 0x78
lea rdx, [r13 + rax + 0x60]
call qword [r13 + rax + 0x88]
mov r9d, ebx
mov r8d, esi
mov rdx, r13
mov rcx, r12
call fcn.14018ae00
jmp 0x14018bb8d
mov rcx, r13
call fcn.14018c040
cmp byte [r13 + 0x48], 0
je 0x14018bc0d
mov ecx, dword [r12 + 0x34]
mov rdx, r13
call fcn.14018b0b0
test eax, eax
je 0x14018bc0d
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
mov rcx, r12
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.14018bcb0
cmp byte [r13 + 0x14], 0
jne 0x14018bc8e
mov rax, qword [r13 + 0x58]
mov rcx, r13
movzx eax, word [rax + 4]
imul rax, rax, 0x78
lea rdx, [r13 + rax + 0x60]
mov rax, qword [r13 + 0x38]
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp rax
mov rcx, r13
call fcn.14018b020
mov rax, qword [rsp + 0x70]
mov qword [rax], 0
jmp 0x14018bc8e
cmp dword [rsp + 0x64], 0
jne 0x14018b852
mov rcx, qword [rbp + 0x10]
call fcn.1401f9f40
mov qword [rbp + 0x10], 0
jmp 0x14018b919
mov dword [rsp + 0x9c], 0
mov esi, 7
jmp 0x14018b3b8
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret