Function at 0x14014a900
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0xc8
mov rax, qword [rsp + 0xd0]
mov rax, qword [rax]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0xd8]
mov eax, dword [rax + 4]
dec eax
mov dword [rsp + 0x80], eax
mov rax, qword [rsp + 0xd8]
mov eax, dword [rax + 8]
mov dword [rsp + 0x58], eax
mov rax, qword [rsp + 0xd8]
cmp dword [rax + 4], 0
jne 0x14014a963
jmp 0x14014ae8e
mov rax, qword [rsp + 0xd8]
mov r9d, dword [rax]
mov rax, qword [rsp + 0x98]
mov r8, qword [rax + 0x10]
mov rax, qword [rsp + 0x98]
mov rdx, qword [rax + 8]
lea rcx, str.SELECT_segid__term___pgno__1____pgno1__FROM__Q._q_idx_WHERE_segid_d_ORDER_BY_1__2
call sym.sqlite3.exe_sqlite3_mprintf
mov r8, rax
lea rdx, [rsp + 0x68]
mov rcx, qword [rsp + 0xd0]
call fcn.14013f350
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x34], 0
jne 0x14014ae5d
mov rcx, qword [rsp + 0x68]
call sym.sqlite3.exe_sqlite3_step
cmp eax, 0x64
jne 0x14014ae5d
mov edx, 1
mov rcx, qword [rsp + 0x68]
call sym.sqlite3.exe_sqlite3_column_blob
mov qword [rsp + 0xa8], rax
mov edx, 1
mov rcx, qword [rsp + 0x68]
call sym.sqlite3.exe_sqlite3_column_bytes
mov dword [rsp + 0x44], eax
mov edx, 2
mov rcx, qword [rsp + 0x68]
call sym.sqlite3.exe_sqlite3_column_int
mov dword [rsp + 0x40], eax
mov edx, 3
mov rcx, qword [rsp + 0x68]
call sym.sqlite3.exe_sqlite3_column_int
mov dword [rsp + 0x88], eax
mov rax, qword [rsp + 0xd8]
mov eax, dword [rax + 4]
cmp dword [rsp + 0x40], eax
jge 0x14014aa35
jmp 0x14014a9a7
mov rax, qword [rsp + 0xd8]
movsxd rax, dword [rax]
shl rax, 0x25
movsxd rcx, dword [rsp + 0x40]
add rax, rcx
mov qword [rsp + 0xa0], rax
mov rdx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0xd0]
call fcn.14013f2d0
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x14014aa7b
jmp 0x14014ae5d
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x30]
mov ecx, dword [rcx + 0xc]
cmp dword [rax + 8], ecx
jg 0x14014aaa1
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
jmp 0x14014abdd
mov rcx, qword [rsp + 0x30]
call fcn.14013efe0
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call fcn.14013eeb0
movzx eax, ax
mov dword [rsp + 0x84], eax
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x84], eax
jge 0x14014aae1
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0xc]
cmp dword [rsp + 0x38], eax
jl 0x14014aaf5
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
jmp 0x14014abcb
movsxd rax, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx]
add rcx, rax
mov rax, rcx
lea rdx, [rsp + 0x48]
mov rcx, rax
call fcn.140130f80
mov ecx, dword [rsp + 0x38]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jge 0x14014ab35
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x70], eax
jmp 0x14014ab3d
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jg 0x14014ab4e
mov dword [rsp + 0x78], 0
jmp 0x14014ab96
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jge 0x14014ab62
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x74], eax
jmp 0x14014ab6a
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x74], eax
movsxd rax, dword [rsp + 0x74]
movsxd rcx, dword [rsp + 0x38]
mov rdx, qword [rsp + 0x30]
mov rdx, qword [rdx]
add rdx, rcx
mov rcx, rdx
mov r8, rax
mov rdx, qword [rsp + 0xa8]
call fcn.140158be0
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
jne 0x14014abb5
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x48]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
jge 0x14014abcb
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0xd0]
call fcn.14014a620
mov rcx, qword [rsp + 0x30]
call fcn.14013f2b0
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x34], 0
je 0x14014abfa
jmp 0x14014ae5d
mov eax, dword [rsp + 0x40]
dec eax
mov ecx, dword [rsp + 0x58]
inc ecx
mov edx, dword [rsp + 0x80]
inc edx
mov dword [rsp + 0x20], eax
mov r9d, ecx
mov r8d, edx
mov rdx, qword [rsp + 0xd8]
mov rcx, qword [rsp + 0xd0]
call fcn.14014a540
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x34], 0
je 0x14014ac41
jmp 0x14014ae5d
cmp dword [rsp + 0x88], 0
je 0x14014ae3e
mov qword [rsp + 0x60], 0
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x54], eax
mov rax, qword [rsp + 0xd8]
mov eax, dword [rax]
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x3c], 0
mov r9d, dword [rsp + 0x40]
mov r8d, dword [rsp + 0x50]
xor edx, edx
mov rcx, qword [rsp + 0xd0]
call fcn.1401410f0
mov qword [rsp + 0x60], rax
jmp 0x14014aca8
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xd0]
call fcn.140140ad0
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xd0]
call fcn.140140b70
test eax, eax
jne 0x14014ae2a
mov eax, dword [rsp + 0x54]
inc eax
mov dword [rsp + 0x3c], eax
jmp 0x14014acd8
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
mov rcx, qword [rsp + 0x60]
call fcn.1401412d0
cmp dword [rsp + 0x3c], eax
jge 0x14014ad55
movsxd rax, dword [rsp + 0x50]
shl rax, 0x25
movsxd rcx, dword [rsp + 0x3c]
add rax, rcx
mov qword [rsp + 0x90], rax
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0xd0]
call fcn.14013f020
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x14014ad50
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call fcn.14013eeb0
movzx eax, ax
test eax, eax
je 0x14014ad46
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
mov rcx, qword [rsp + 0x30]
call fcn.14013f2b0
jmp 0x14014acce
mov rcx, qword [rsp + 0x60]
call fcn.1401412d0
mov dword [rsp + 0x54], eax
movsxd rax, dword [rsp + 0x50]
shl rax, 0x25
movsxd rcx, dword [rsp + 0x54]
add rax, rcx
mov qword [rsp + 0x90], rax
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0xd0]
call fcn.14013f020
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x14014ae25
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call fcn.14013eeb0
movzx eax, ax
mov dword [rsp + 0x7c], eax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0xc]
cmp dword [rsp + 0x7c], eax
jl 0x14014add5
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
jmp 0x14014ae1b
movsxd rax, dword [rsp + 0x7c]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx]
add rcx, rax
mov rax, rcx
lea rdx, [rsp + 0xb0]
mov rcx, rax
call fcn.140131120
mov rcx, qword [rsp + 0x60]
call fcn.1401412b0
cmp qword [rsp + 0xb0], rax
je 0x14014ae1b
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
mov rcx, qword [rsp + 0x30]
call fcn.14013f2b0
jmp 0x14014ac96
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x58], eax
mov rcx, qword [rsp + 0x60]
call fcn.140141080
jmp 0x14014ae4d
mov rax, qword [rsp + 0xd8]
mov eax, dword [rax + 8]
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x80], eax
jmp 0x14014a9a7
mov rcx, qword [rsp + 0x68]
call sym.sqlite3.exe_sqlite3_finalize
mov dword [rsp + 0x8c], eax
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x34], 0
jne 0x14014ae8e
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0x8c]
mov dword [rax + 0x34], ecx
add rsp, 0xc8
ret