Function at 0x1401eaf60
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 ebx, ebx
mov rax, qword [rsp + 0x130]
movsxd rsi, dword [rsp + 0x140]
mov qword [rsp + 0x30], rax
mov r13, rdx
mov rbp, rcx
mov rdi, r9
mov eax, dword [rsp + 0x138]
mov dword [rsp + 0x50], r8d
mov edx, dword [rsp + 0x148]
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x150]
mov qword [rsp + 0x70], rax
mov eax, dword [rcx + 0x3c]
test eax, eax
jne 0x1401eafeb
test esi, esi
jns 0x1401eafda
cmp qword [rcx + 0x18], 0
mov ebx, dword [r13 + 0x18]
je 0x1401eafd6
xor eax, eax
and r8d, 0x40
sete al
add ebx, eax
jmp 0x1401eafeb
movsxd rax, esi
shl rax, 4
mov ebx, dword [rax + r13 + 0x24]
cmp edx, ebx
cmovle ebx, edx
mov edx, ebx
mov rcx, rbp
call fcn.1401eab80
mov r12, rax
mov rax, qword [rsp + 0x70]
mov qword [rax], r12
test r12, r12
je 0x1401ebb3c
mov eax, dword [rsp + 0x50]
mov qword [r12 + 0x30], rdi
and eax, 2
mov dword [rsp + 0x5c], eax
setne al
movzx eax, al
mov dword [r12 + 0x44], eax
mov eax, dword [rsp + 0x50]
shr eax, 4
and eax, 1
mov byte [r12 + 0x48], al
test byte [rsp + 0x50], 0x20
jne 0x1401eb046
lea rcx, [rbp + 0x3c]
mov rdx, r12
call fcn.1401e9e40
mov eax, dword [rbp + 0x3c]
mov dword [rsp + 0x40], eax
test eax, eax
jne 0x1401ebb09
test esi, esi
jns 0x1401eb9dc
movsxd rax, dword [r13 + 0x1c]
mov r15, qword [rbp + 0x18]
add rax, 2
shl rax, 4
add rax, r13
mov qword [rsp + 0x80], rax
test r15, r15
je 0x1401eb2e9
mov esi, dword [rsp + 0x50]
and esi, 0x40
jne 0x1401eb2e9
xor edi, edi
xor r14d, r14d
lea rax, [r12 + 0x60]
cmp qword [rsp + 0x30], 0
mov qword [rsp + 0x40], rax
mov dword [rsp + 0xac], edi
mov qword [rsp + 0xb0], r14
je 0x1401eb0c1
mov edi, dword [rsp + 0x50]
and edi, 8
je 0x1401eb14c
mov r8d, dword [rsp + 0x3c]
mov rdx, qword [rsp + 0x30]
lea r9, [r15 + 0x18]
xor ebx, ebx
mov rcx, r15
mov qword [rsp + 0xb8], rbx
call fcn.1401e76e0
mov rcx, qword [rbp + 0x18]
lea rdx, [rsp + 0xb0]
lea r9, [rsp + 0xac]
mov dword [rbp + 0x3c], eax
lea r8, [rsp + 0xb8]
call fcn.140229410
mov rcx, qword [rsp + 0xb0]
test rcx, rcx
je 0x1401eb119
call sub.msvcrt.dll_strlen
mov esi, eax
mov rdi, qword [rsp + 0xb8]
test rdi, rdi
je 0x1401eb2d4
lea rcx, [rbp + 0x3c]
mov edx, 0x10
call fcn.14022a740
mov rbx, rax
test rax, rax
je 0x1401eb2d4
mov qword [rax], rdi
jmp 0x1401eb25a
mov eax, dword [rsp + 0x3c]
mov ecx, dword [r15 + 0x14]
lea edx, [rax - 1]
mov eax, 0xd
movsxd rdx, edx
test edx, edx
js 0x1401eb180
mov rsi, qword [rsp + 0x30]
lea r8d, [rax*8]
xor eax, r8d
movzx r8d, byte [rsi + rdx]
dec rdx
xor eax, r8d
jmp 0x1401eb15f
xor edx, edx
movsxd rsi, dword [rsp + 0x3c]
div ecx
mov rax, qword [r15 + 0x20]
mov r14, qword [rax + rdx*8]
test r14, r14
je 0x1401eb1bd
mov ebx, dword [r14 + 0x1c]
lea eax, [rbx + 1]
cmp dword [rsp + 0x3c], eax
jne 0x1401eb1b8
mov rdx, qword [rsp + 0x30]
lea rcx, [r14 + 0x30]
mov r8, rsi
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x1401eb1c1
mov r14, qword [r14]
jmp 0x1401eb191
xor ebx, ebx
jmp 0x1401eb22f
mov eax, dword [r14 + 0x18]
lea edx, [rbx + 0x32]
mov edi, 7
mov dword [rsp + 0x54], edx
sub eax, edx
lea ecx, [rax + 0x1a]
mov dword [rsp + 0x48], eax
movsxd rcx, ecx
call fcn.14025afe0
mov rbx, rax
test rax, rax
je 0x1401eb22f
movsxd rsi, dword [rsp + 0x54]
lea rax, [rax + 0x10]
movsxd rcx, dword [rsp + 0x48]
mov r8d, 0x10
mov rdi, rax
mov rdx, rsi
add rsi, r14
rep movsb byte [rdi], byte [rsi]
sub r8d, edx
mov rcx, r15
mov rdx, r14
movsxd r8, r8d
add r8, rbx
call fcn.1401e7560
mov edi, dword [rsp + 0x48]
lea r14d, [rdi + rax]
xor edi, edi
mov dword [rsp + 0xac], r14d
mov dword [rbp + 0x3c], edi
test rbx, rbx
je 0x1401eb23e
lea rax, [rbx + 0x10]
mov qword [rbx], rax
mov rax, qword [rsp + 0x30]
or dword [r12 + 0x68], 1
mov qword [rsp + 0xb0], rax
test rbx, rbx
je 0x1401eb2d4
mov esi, dword [rsp + 0x3c]
mov r9, qword [rsp + 0xb0]
mov r8d, esi
lea rdx, [r12 + 0xc8]
lea rcx, [rbp + 0x3c]
call fcn.140227fd0
mov esi, dword [rsp + 0xac]
mov rcx, qword [rbx]
lea rdx, [r12 + 0xd8]
mov dword [rbx + 0xc], esi
mov dword [rbx + 8], esi
mov qword [r12 + 0x70], rbx
call fcn.1402291a0
cmp dword [rsp + 0x5c], 0
mov dword [r12 + 0xac], esi
movzx eax, al
mov qword [r12 + 0x80], rax
je 0x1401eb2c7
or dword [r12 + 0x68], 2
mov rdx, qword [rsp + 0x40]
mov rcx, rbp
call fcn.1401ee490
jmp 0x1401eb2d4
mov rdx, qword [rsp + 0x40]
mov rcx, rbp
call fcn.1401edce0
mov rdx, qword [rsp + 0x40]
mov rcx, rbp
call fcn.1401ee6e0
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 0x1401eb9f6
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 rbx, [r12 + rax + 0x60]
movsxd rax, dword [rsp + 0x64]
imul rax, rax, 0x38
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x50]
and eax, 8
mov dword [rsp + 0x58], eax
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x98], rax
cmp dword [rsp + 0x64], 0
js 0x1401eb9c1
mov rax, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x68]
add rsi, qword [rax + 8]
cmp qword [rsp + 0x30], 0
jne 0x1401eb38f
cmp dword [rsi + 4], 0
je 0x1401eb9ab
mov r8, rbx
mov rdx, rsi
mov rcx, rbp
call fcn.1401edc40
jmp 0x1401eb9ab
lea rdx, [rbx + 8]
xor eax, eax
mov ecx, 0x20
mov rdi, rdx
rep stosd dword [rdi], eax
mov qword [rbx], rsi
cmp qword [rbp + 0x68], 0
jne 0x1401eb3d0
mov rax, qword [rbp]
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.14025b080
lea rdx, [rbp + 0x68]
mov rcx, rbp
mov r8, rax
call fcn.1401e8f30
mov eax, dword [rbp + 0x3c]
mov rdi, qword [rbp + 0x68]
mov dword [rsp + 0x54], eax
test eax, eax
jne 0x1401eb9ab
mov r8d, dword [rsi]
mov edx, 1
mov rcx, rdi
call fcn.140256f50
xor r11d, r11d
mov r9d, dword [rsp + 0x3c]
mov rcx, rdi
mov qword [rsp + 0x20], r11
mov r8, qword [rsp + 0x30]
mov edx, 2
call fcn.140256e80
mov rcx, rdi
call fcn.14025ca10
cmp eax, 0x64
jne 0x1401eb438
xor edx, edx
mov rcx, rdi
call fcn.140257d90
movsxd r13, eax
mov r14, r13
sar r13, 1
and r14d, 1
jmp 0x1401eb441
xor r14d, r14d
mov r13d, 1
mov rcx, rdi
call fcn.14025bad0
mov edx, 2
mov rcx, rdi
mov dword [rbp + 0x3c], eax
call fcn.140256fb0
mov eax, dword [rsi + 4]
cmp eax, r13d
jg 0x1401eb469
mov dword [rsp + 0x54], r14d
mov eax, r13d
dec eax
mov rdx, rbx
mov rcx, rbp
mov dword [rbx + 0xc], eax
call fcn.1401ee1d0
mov r14, qword [rbx + 0x10]
test r14, r14
je 0x1401eb7c5
mov ecx, dword [r14 + 0xc]
mov rdi, qword [r14]
xor r10d, r10d
mov rdx, qword [rsp + 0x98]
mov r13d, dword [r14 + 8]
mov dword [rsp + 0xa8], r10d
mov rsi, rcx
add rcx, rdi
mov dword [rsp + 0xac], r10d
call fcn.140229340
mov edx, dword [rsp + 0xb0]
mov dword [rsp + 0xa4], edx
cmp r13d, edx
jb 0x1401eb5ee
add esi, eax
lea rax, [rsp + 0xac]
xor r8d, r8d
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x78], rax
jmp 0x1401eb518
mov ecx, r8d
lea eax, [r8 + 1]
add rcx, rdi
mov dword [rsp + 0xa4], eax
movzx edx, byte [rcx]
mov dword [rsp + 0xa8], edx
test dl, dl
js 0x1401eb63f
mov r8d, r15d
mov ecx, dword [rsp + 0xa4]
lea eax, [rcx + 1]
mov r15, rcx
add rcx, rdi
movzx edx, byte [rcx]
mov dword [rsp + 0xa4], eax
mov dword [rsp + 0xac], edx
test dl, dl
jns 0x1401eb564
mov rdx, qword [rsp + 0x90]
mov dword [rsp + 0x88], r8d
call fcn.140229340
mov r8d, dword [rsp + 0x88]
add eax, r15d
mov dword [rsp + 0xa4], eax
cmp dword [rsp + 0xa8], r8d
jb 0x1401ebb1d
mov r15d, r8d
jne 0x1401eb5b3
mov ecx, dword [rsp + 0x3c]
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 0x1401eb5fa
cmp dword [rsp + 0x3c], r15d
je 0x1401eb614
cmp eax, edx
jb 0x1401eb621
cmp esi, r13d
jae 0x1401eb668
mov ecx, esi
mov rdx, qword [rsp + 0x78]
add rcx, rdi
call fcn.140229340
mov r8d, dword [rsp + 0xa8]
add r8d, dword [rsp + 0xb0]
mov dword [rsp + 0xb0], r8d
add esi, eax
cmp r8d, r13d
jb 0x1401eb4f2
mov dword [rbp + 0x3c], 0x10b
jmp 0x1401eb7c5
mov rcx, qword [rsp + 0x30]
mov r11d, r15d
lea r9d, [r10 + rax]
mov cl, byte [rcx + r11]
cmp byte [rdi + r9], cl
jne 0x1401eb5a8
inc eax
jmp 0x1401eb59b
cmp edx, eax
jne 0x1401ebb1d
jmp 0x1401eb6fc
add eax, r10d
mov rcx, qword [rsp + 0x30]
mov edx, r15d
mov eax, eax
mov al, byte [rdi + rax]
cmp byte [rcx + rdx], al
jae 0x1401eb5b3
jmp 0x1401ebb1d
mov rdx, qword [rsp + 0x78]
mov dword [rsp + 0x88], r8d
call fcn.140229340
mov r8d, dword [rsp + 0x88]
add eax, r8d
mov dword [rsp + 0xa4], eax
jmp 0x1401eb515
cmp dword [rsp + 0x58], 0
je 0x1401ebb28
mov rdx, rbx
mov rcx, rbp
call fcn.1401ee1d0
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x1401eb7c5
mov esi, dword [rax + 0xc]
mov r13d, dword [rax + 8]
mov rdi, qword [rax]
cmp esi, r13d
jge 0x1401eb673
mov ecx, esi
lea rdx, [rsp + 0xa4]
add rcx, rdi
call fcn.140229340
mov r14d, dword [rsp + 0xa4]
cmp r14d, 3
jbe 0x1401eb5ee
mov ecx, r14d
movsxd rdx, esi
cmp rcx, rdx
jge 0x1401eb5ee
xor r8d, r8d
lea rdx, [rsp + 0xac]
add rcx, rdi
add esi, eax
mov dword [rsp + 0xa8], r8d
mov dword [rsp + 0xb0], r14d
call fcn.140229340
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 0x1401eb5ee
test r15d, r15d
je 0x1401eb5ee
mov edx, dword [rbx + 0xc]
lea eax, [r14 + r15]
mov r9, qword [rsp + 0x30]
lea rcx, [rbp + 0x3c]
mov qword [rbx + 0x20], rax
mov r8d, dword [rsp + 0xa8]
mov dword [rbx + 0x40], edx
lea rdx, [rbx + 0x68]
mov dword [rbx + 0x44], eax
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0x78], rcx
call fcn.140227fd0
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x78]
mov r8d, r15d
lea r9, [rdi + r14]
call fcn.140227eb0
cmp esi, r13d
jb 0x1401eb787
mov rax, qword [rbx + 0x10]
mov eax, dword [rax + 8]
inc eax
jmp 0x1401eb7a9
mov ecx, esi
lea rdx, [rsp + 0xb8]
add rcx, rdi
call fcn.140229340
add esi, eax
mov eax, dword [rsp + 0xb8]
add eax, dword [rsp + 0xb0]
mov dword [rbx + 0x4c], eax
mov rdx, rbx
mov rcx, rbp
mov dword [rbx + 0x48], esi
call fcn.1401edda0
mov rdx, rbx
mov rcx, rbp
call fcn.1401edce0
mov edi, dword [rsp + 0x58]
or edi, dword [rbp + 0x3c]
jne 0x1401eb998
mov eax, dword [rbx + 8]
mov rcx, qword [rbx + 0x10]
mov edx, eax
or edx, 1
mov dword [rbx + 8], edx
test rcx, rcx
je 0x1401eb998
cmp dword [rsp + 0x5c], 0
je 0x1401eb809
or eax, 3
cmp dword [rsp + 0x54], 0
mov dword [rbx + 8], eax
jne 0x1401eb814
mov rax, qword [rbx + 0x60]
test rax, rax
jne 0x1401eb84b
jmp 0x1401eb87b
cmp dword [rsp + 0x54], 0
je 0x1401eb998
mov rax, qword [rbx]
mov edx, dword [rbx + 8]
mov r9d, dword [rbx + 0x40]
mov r8d, dword [rax]
and edx, 2
cmp r9d, dword [rbx + 0xc]
jne 0x1401eb832
mov eax, dword [rcx + 0xc]
cmp dword [rbx + 0x4c], eax
jl 0x1401eb83e
mov rcx, rbp
call fcn.1401e43c0
mov qword [rbx + 0x60], rax
cmp dword [rsp + 0x5c], 0
je 0x1401eb998
jmp 0x1401eb7fe
mov rdx, qword [rbp]
cmp dword [rdx + 0x80], 4
jne 0x1401eb87b
mov edi, dword [rax + 0x1c]
mov rax, qword [rbx]
mov rcx, rbp
movsxd rdx, dword [rax]
movsxd rax, edi
shl rdx, 0x25
add rdx, rax
call fcn.1401ea1e0
mov r15, rax
jmp 0x1401eb92b
mov r8, qword [rbx + 0x10]
mov esi, dword [rbx + 0xc]
mov eax, 4
cmp dword [rbx + 0x40], esi
jne 0x1401eb88f
mov eax, dword [rbx + 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 0x1401eb89a
movsxd rdx, edx
mov eax, dword [r8 + 0xc]
mov qword [rbx + 0x20], rdx
cmp dword [rbx + 0x4c], eax
jl 0x1401eb98d
inc esi
mov r14, qword [rbx]
xor r15d, r15d
movsxd r13, esi
cmp dword [rbp + 0x3c], 0
jne 0x1401eb92b
cmp esi, dword [r14 + 8]
jg 0x1401eb92b
movsxd rdx, dword [r14]
mov rcx, rbp
shl rdx, 0x25
add rdx, r13
call fcn.1401ea1e0
mov rcx, rax
test rax, rax
je 0x1401eb924
mov rdx, qword [rcx]
mov eax, dword [rax + 0xc]
cmp word [rdx], 0
mov dword [rsp + 0x54], eax
mov eax, dword [rcx + 8]
je 0x1401eb911
mov edi, esi
xchg r15, rcx
mov dword [rsp + 0x78], eax
call fcn.14025a080
mov eax, dword [rsp + 0x78]
cmp dword [rsp + 0x54], eax
jl 0x1401eb92b
inc esi
inc r13
jmp 0x1401eb8d3
test r15, r15
je 0x1401eb98d
mov rcx, qword [rbx + 0x10]
call fcn.14025a080
mov rcx, qword [r15]
mov esi, dword [r15 + 0xc]
mov dword [rbx + 0xc], edi
mov qword [rbx + 0x10], r15
mov ax, word [rcx]
xchg al, ah
movzx edi, ax
cmp edi, esi
jle 0x1401eb95c
mov dword [rbp + 0x3c], 0x10b
jmp 0x1401eb998
movzx eax, ax
lea rdx, [rbx + 0x78]
add rcx, rax
call fcn.1402291a0
movzx eax, al
add eax, edi
cdqe
mov qword [rbx + 0x20], rax
mov eax, dword [r15 + 8]
cmp esi, eax
jl 0x1401eb982
inc eax
jmp 0x1401eb98a
mov rcx, r15
call fcn.1401ea1b0
mov dword [rbx + 0x4c], eax
mov rdx, rbx
mov rcx, rbp
call fcn.1401ee490
mov rcx, rbp
mov rdx, rbx
call fcn.1401ee6e0
mov rcx, rbp
call fcn.1401edc00
dec dword [rsp + 0x64]
add rbx, 0x88
sub qword [rsp + 0x68], 0x38
jmp 0x1401eb351
xor eax, eax
cmp dword [rsp + 0x60], 0
cmovns eax, dword [rsp + 0x60]
add qword [rsp + 0x48], 0x10
add dword [rsp + 0x40], eax
jmp 0x1401eb2f2
dec ebx
add rsi, 2
lea r14, [r12 + 0x60]
movsxd rdi, ebx
shl rsi, 4
imul rdi, rdi, 0x38
test ebx, ebx
jns 0x1401eba0a
cmp dword [rbp + 0x3c], 0
jne 0x1401ebb09
mov eax, dword [r12 + 0x40]
lea ebx, [rax - 1]
jmp 0x1401eba44
mov rdx, qword [r13 + rsi + 8]
add rdx, rdi
cmp dword [rdx + 4], 0
je 0x1401eba23
mov r8, r14
mov rcx, rbp
call fcn.1401edc40
dec ebx
sub rdi, 0x38
add r14, 0x88
jmp 0x1401eb9f2
mov edx, ebx
mov rcx, r12
call fcn.1401eabf0
mov esi, eax
test eax, eax
jne 0x1401eba4a
dec ebx
test ebx, ebx
jg 0x1401eba32
jmp 0x1401eba7f
cmp dword [rbp + 0x3c], 0
jne 0x1401eba6c
cdqe
xor r8d, r8d
mov rcx, rbp
imul rax, rax, 0x88
lea rdx, [r12 + rax + 0x60]
call qword [r12 + rax + 0x98]
mov r9d, ebx
mov r8d, esi
mov rdx, r12
mov rcx, rbp
call fcn.1401eab00
jmp 0x1401eba42
mov rcx, r12
call fcn.1401ebfa0
cmp byte [r12 + 0x48], 0
je 0x1401ebac2
mov ecx, dword [rbp + 0x3c]
mov rdx, r12
call fcn.1401eaf30
test eax, eax
je 0x1401ebac2
xor r9d, r9d
xor r8d, r8d
mov rdx, r12
mov rcx, rbp
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.1401ebb50
mov rcx, r12
call fcn.1401eadb0
test eax, eax
jne 0x1401eba9e
cmp byte [r12 + 0x14], 0
jne 0x1401ebb3c
mov rax, qword [r12 + 0x58]
mov rcx, r12
movzx eax, word [rax + 4]
imul rax, rax, 0x88
lea rdx, [r12 + rax + 0x60]
mov rax, qword [r12 + 0x38]
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp rax
mov rcx, r12
call fcn.1401ead00
mov rax, qword [rsp + 0x70]
xor edx, edx
mov qword [rax], rdx
jmp 0x1401ebb3c
cmp dword [rsp + 0x58], 0
jne 0x1401eb6fc
mov rcx, r14
call fcn.14025a080
xor r9d, r9d
mov qword [rbx + 0x10], r9
jmp 0x1401eb7c5
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret