Function at 0x1401a71a0
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 0x1401a7226
test esi, esi
jns 0x1401a7210
xor ebx, ebx
cmp qword [rcx + 0x18], 0
setne bl
add ebx, dword [rbp + 0x10]
jmp 0x1401a7226
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.1401a6f40
mov r13, rax
mov rax, qword [rsp + 0x70]
mov qword [rax], r13
test r13, r13
je 0x1401a7d4e
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 0x1401a727f
lea rcx, [r12 + 0x34]
mov rdx, r13
call fcn.1401a6200
mov eax, dword [r12 + 0x34]
mov dword [rsp + 0x38], eax
test eax, eax
jne 0x1401a7d02
test esi, esi
jns 0x1401a7beb
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 0x1401a7531
cmp qword [rsp + 0x30], 0
lea r15, [r13 + 0x60]
mov dword [rsp + 0x9c], 0
mov qword [rsp + 0xa0], 0
je 0x1401a72eb
mov esi, dword [rsp + 0x44]
and esi, 8
je 0x1401a7384
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x30]
lea r9, [r10 + 0x18]
mov rcx, r10
mov qword [rsp + 0xa8], 0
call fcn.1401a4540
mov rcx, qword [r12 + 0x18]
lea rdx, [rsp + 0xa0]
lea r9, [rsp + 0x9c]
mov dword [r12 + 0x34], eax
lea r8, [rsp + 0xa8]
call fcn.1401e2dc0
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x1401a734a
call sub.msvcrt.dll_strlen
mov dword [rsp + 0x38], eax
cmp qword [rsp + 0xa8], 0
je 0x1401a751e
lea rcx, [r12 + 0x34]
mov edx, 0x10
call fcn.1401e4190
mov rbx, rax
test rax, rax
je 0x1401a751e
mov rax, qword [rsp + 0xa8]
mov qword [rbx], rax
jmp 0x1401a74a3
mov eax, dword [rsp + 0x40]
mov r8d, dword [r10 + 0x14]
lea edx, [rax - 1]
mov eax, 0xd
movsxd rdx, edx
test edx, edx
js 0x1401a73b6
mov rdi, qword [rsp + 0x30]
lea ecx, [rax*8]
movzx r9d, byte [rdi + rdx]
dec rdx
xor ecx, r9d
xor eax, ecx
jmp 0x1401a7397
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 0x1401a73fe
mov ebx, dword [r14 + 0x1c]
lea eax, [rbx + 1]
cmp dword [rsp + 0x40], eax
jne 0x1401a73f9
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 0x1401a7402
mov r14, qword [r14]
jmp 0x1401a73c8
xor ebx, ebx
jmp 0x1401a7478
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.140216f20
mov edx, dword [rsp + 0x48]
mov r10, qword [rsp + 0x50]
test rax, rax
mov rbx, rax
je 0x1401a7d39
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.1401a43d0
mov edi, dword [rsp + 0x38]
lea r14d, [rdi + rax]
mov dword [rsp + 0x9c], r14d
mov dword [r12 + 0x34], esi
test rbx, rbx
je 0x1401a7489
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 0x1401a751e
mov r9, qword [rsp + 0xa0]
mov r8d, dword [rsp + 0x38]
lea rcx, [r12 + 0x34]
lea rdx, [r13 + 0xb8]
call fcn.1401e19b0
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.1401e2b60
cmp dword [rsp + 0x58], 0
movzx eax, al
mov qword [r13 + 0x80], rax
mov eax, dword [rbx + 8]
mov dword [r13 + 0x9c], eax
je 0x1401a7513
or dword [r13 + 0x68], 2
mov rdx, r15
mov rcx, r12
call fcn.1401aa520
jmp 0x1401a751e
mov rdx, r15
mov rcx, r12
call fcn.1401a9d20
mov rdx, r15
mov rcx, r12
call fcn.1401aa7a0
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 0x1401a7c03
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 0x1401a7bcd
mov rax, qword [rsp + 0x48]
mov r14, qword [rsp + 0x68]
add r14, qword [rax + 8]
cmp qword [rsp + 0x30], 0
jne 0x1401a75c7
cmp dword [r14 + 4], 0
je 0x1401a7bba
mov r8, rbp
mov rdx, r14
mov rcx, r12
call fcn.1401a9c90
jmp 0x1401a7bba
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 0x1401a760b
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.140216fc0
lea rdx, [r12 + 0x60]
mov rcx, r12
mov r8, rax
call fcn.1401a54b0
cmp dword [r12 + 0x34], 0
jne 0x1401a7bba
mov r15, qword [r12 + 0x60]
mov r8d, dword [r14]
mov edx, 1
mov rcx, r15
call fcn.140212e40
mov r9d, dword [rsp + 0x40]
mov r8, qword [rsp + 0x30]
mov qword [rsp + 0x20], 0
mov rcx, r15
mov edx, 2
call fcn.140212d60
mov rcx, r15
call fcn.1402187f0
cmp eax, 0x64
jne 0x1401a7672
xor edx, edx
mov rcx, r15
call fcn.140213cf0
movsxd rbx, eax
and eax, 1
mov dword [rsp + 0x50], eax
sar rbx, 1
jmp 0x1401a767f
mov dword [rsp + 0x50], 0
mov ebx, 1
mov rcx, r15
call fcn.140217a70
mov edx, 2
mov rcx, r15
mov dword [r12 + 0x34], eax
call fcn.140212eb0
mov eax, dword [r14 + 4]
cmp eax, ebx
jle 0x1401a76ab
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.1401aa230
mov rax, qword [rbp + 0x10]
test rax, rax
je 0x1401a79d9
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.1401e2cf0
mov edx, dword [rsp + 0xa0]
mov dword [rsp + 0x94], edx
cmp edi, edx
jb 0x1401a7815
add ebx, eax
lea rax, [rsp + 0x9c]
xor r15d, r15d
mov qword [rsp + 0x88], rax
jmp 0x1401a7759
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 0x1401a7863
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 0x1401a779c
mov rdx, qword [rsp + 0x88]
mov dword [rsp + 0x94], eax
call fcn.1401e2cf0
add dword [rsp + 0x94], eax
cmp dword [rsp + 0x98], r15d
jb 0x1401a7d18
mov r14d, r15d
jne 0x1401a77df
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 0x1401a7823
cmp dword [rsp + 0x40], r14d
je 0x1401a783d
cmp edx, eax
ja 0x1401a784a
cmp edi, ebx
jbe 0x1401a7880
mov ecx, ebx
mov rdx, qword [rsp + 0x78]
add rcx, rsi
call fcn.1401e2cf0
add ebx, eax
mov eax, dword [rsp + 0x98]
add eax, dword [rsp + 0xa0]
mov dword [rsp + 0xa0], eax
cmp edi, eax
ja 0x1401a7732
mov dword [r12 + 0x34], 0x10b
jmp 0x1401a79d9
mov r10, qword [rsp + 0x30]
mov r11d, r14d
lea r8d, [r9 + rax]
mov r11b, byte [r10 + r11]
cmp byte [rsi + r8], r11b
jne 0x1401a77d4
inc eax
jmp 0x1401a77cc
cmp edx, eax
jne 0x1401a7d18
jmp 0x1401a7912
mov rcx, qword [rsp + 0x30]
lea edx, [r9 + rax]
mov eax, r14d
mov al, byte [rcx + rax]
cmp byte [rsi + rdx], al
jbe 0x1401a77df
jmp 0x1401a7d18
mov rdx, qword [rsp + 0x78]
mov dword [rsp + 0x94], eax
call fcn.1401e2cf0
add dword [rsp + 0x94], eax
jmp 0x1401a7756
cmp dword [rsp + 0x64], 0
je 0x1401a7d23
mov rdx, rbp
mov rcx, r12
call fcn.1401aa230
mov rax, qword [rbp + 0x10]
test rax, rax
je 0x1401a79d9
mov ebx, dword [rax + 0xc]
cmp ebx, dword [rax + 8]
jge 0x1401a788b
mov rsi, qword [rax]
mov ecx, ebx
lea rdx, [rsp + 0x94]
add rcx, rsi
call fcn.1401e2cf0
mov edx, dword [rsp + 0x94]
cmp edx, 3
jbe 0x1401a7815
mov r8, qword [rbp + 0x10]
mov ecx, edx
movsxd r9, dword [r8 + 0xc]
cmp rcx, r9
jge 0x1401a7815
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.1401e2cf0
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 0x1401a7815
test edx, edx
je 0x1401a7815
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.1401e19b0
mov eax, dword [rsp + 0x94]
mov rdx, r15
mov rcx, r14
mov r8d, dword [rsp + 0x9c]
lea r9, [rsi + rax]
call fcn.1401e1880
cmp edi, ebx
ja 0x1401a799b
mov rax, qword [rbp + 0x10]
mov eax, dword [rax + 8]
inc eax
jmp 0x1401a79bd
mov ecx, ebx
lea rdx, [rsp + 0xa8]
add rcx, rsi
call fcn.1401e2cf0
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.1401a9dd0
mov rdx, rbp
mov rcx, r12
call fcn.1401a9d20
mov esi, dword [rsp + 0x64]
or esi, dword [r12 + 0x34]
jne 0x1401a7baf
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 0x1401a7baf
cmp dword [rsp + 0x58], 0
je 0x1401a7a42
or eax, 3
cmp dword [rsp + 0x50], 0
mov dword [rbp + 8], eax
jne 0x1401a7a4d
mov r14, qword [rbp + 0x50]
test r14, r14
je 0x1401a7a85
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.1401a6590
mov r14, rax
jmp 0x1401a7b39
cmp dword [rsp + 0x50], 0
je 0x1401a7baf
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 0x1401a7a6c
mov eax, dword [rcx + 0xc]
cmp dword [rbp + 0x3c], eax
jl 0x1401a7a78
mov rcx, r12
call fcn.1401a17f0
mov qword [rbp + 0x50], rax
cmp dword [rsp + 0x58], 0
je 0x1401a7baf
jmp 0x1401a7a14
mov r9, qword [rbp + 0x10]
mov ebx, dword [rbp + 0xc]
mov eax, 4
cmp dword [rbp + 0x30], ebx
jne 0x1401a7a99
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 0x1401a7aa3
mov qword [rbp + 0x20], rdx
mov eax, dword [r9 + 0xc]
cmp dword [rbp + 0x3c], eax
jl 0x1401a7ba4
inc ebx
mov r15, qword [rbp]
movsxd rdi, ebx
cmp dword [r12 + 0x34], 0
jne 0x1401a7b39
cmp ebx, dword [r15 + 8]
jg 0x1401a7b39
movsxd rdx, dword [r15]
mov rcx, r12
shl rdx, 0x25
add rdx, rdi
call fcn.1401a6590
mov rcx, rax
test rax, rax
je 0x1401a7b32
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 0x1401a7b23
mov esi, ebx
xchg r14, rcx
call fcn.140216000
mov edx, dword [rsp + 0x64]
cmp dword [rsp + 0x50], edx
jl 0x1401a7b39
inc ebx
inc rdi
jmp 0x1401a7ad6
test r14, r14
je 0x1401a7ba4
mov rcx, qword [rbp + 0x10]
call fcn.140216000
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 0x1401a7b71
mov dword [r12 + 0x34], 0x10b
jmp 0x1401a7baf
movzx ecx, cx
lea rdx, [rbp + 0x68]
add rcx, rax
call fcn.1401e2b60
movzx eax, al
add eax, ebx
cdqe
mov qword [rbp + 0x20], rax
mov eax, dword [r14 + 8]
cmp dword [r14 + 0xc], eax
jl 0x1401a7b99
inc eax
jmp 0x1401a7ba1
mov rcx, r14
call fcn.1401a6560
mov dword [rbp + 0x3c], eax
mov rdx, rbp
mov rcx, r12
call fcn.1401aa520
mov rdx, rbp
mov rcx, r12
call fcn.1401aa7a0
dec dword [rsp + 0x60]
add rbp, 0x78
sub qword [rsp + 0x68], 0xc
jmp 0x1401a7588
cmp dword [rsp + 0x5c], 0
mov eax, 0
cmovns eax, dword [rsp + 0x5c]
add qword [rsp + 0x48], 0x10
add dword [rsp + 0x38], eax
jmp 0x1401a7547
dec ebx
inc rsi
lea r14, [r13 + 0x60]
movsxd rdi, ebx
shl rsi, 4
imul rdi, rdi, 0xc
test ebx, ebx
jns 0x1401a7c18
cmp dword [r12 + 0x34], 0
jne 0x1401a7d02
mov eax, dword [r13 + 0x40]
lea ebx, [rax - 1]
jmp 0x1401a7c4f
mov rdx, qword [rbp + rsi + 0x10]
add rdx, rdi
cmp dword [rdx + 4], 0
je 0x1401a7c31
mov r8, r14
mov rcx, r12
call fcn.1401a9c90
dec ebx
add r14, 0x78
sub rdi, 0xc
jmp 0x1401a7bff
mov edx, ebx
mov rcx, r13
call fcn.1401a6fb0
mov esi, eax
test eax, eax
jne 0x1401a7c55
dec ebx
test ebx, ebx
jg 0x1401a7c3d
jmp 0x1401a7c89
cmp dword [r12 + 0x34], 0
jne 0x1401a7c76
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.1401a6ec0
jmp 0x1401a7c4d
mov rcx, r13
call fcn.1401a8100
cmp byte [r13 + 0x48], 0
je 0x1401a7ccd
mov ecx, dword [r12 + 0x34]
mov rdx, r13
call fcn.1401a7170
test eax, eax
je 0x1401a7ccd
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.1401a7d70
cmp byte [r13 + 0x14], 0
jne 0x1401a7d4e
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.1401a70e0
mov rax, qword [rsp + 0x70]
mov qword [rax], 0
jmp 0x1401a7d4e
cmp dword [rsp + 0x64], 0
jne 0x1401a7912
mov rcx, qword [rbp + 0x10]
call fcn.140216000
mov qword [rbp + 0x10], 0
jmp 0x1401a79d9
mov dword [rsp + 0x9c], 0
mov esi, 7
jmp 0x1401a7478
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret