Function at 0x140146f70
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 0x140146fd3
jmp 0x1401474fe
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.14013b9f0
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x34], 0
jne 0x1401474cd
mov rcx, qword [rsp + 0x68]
call sym.sqlite3.exe_sqlite3_step
cmp eax, 0x64
jne 0x1401474cd
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 0x1401470a5
jmp 0x140147017
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.14013b970
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
jne 0x1401470eb
jmp 0x1401474cd
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x30]
mov ecx, dword [rcx + 0xc]
cmp dword [rax + 8], ecx
jg 0x140147111
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
jmp 0x14014724d
mov rcx, qword [rsp + 0x30]
call fcn.14013b680
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call fcn.14013b550
movzx eax, ax
mov dword [rsp + 0x84], eax
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x84], eax
jge 0x140147151
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0xc]
cmp dword [rsp + 0x38], eax
jl 0x140147165
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
jmp 0x14014723b
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.14012d6b0
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 0x1401471a5
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x70], eax
jmp 0x1401471ad
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0
jg 0x1401471be
mov dword [rsp + 0x78], 0
jmp 0x140147206
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
jge 0x1401471d2
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x74], eax
jmp 0x1401471da
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.140155250
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x4c], 0
jne 0x140147225
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 0x14014723b
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
mov rdx, qword [rsp + 0x30]
mov rcx, qword [rsp + 0xd0]
call fcn.140146c90
mov rcx, qword [rsp + 0x30]
call fcn.14013b950
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x34], 0
je 0x14014726a
jmp 0x1401474cd
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.140146bb0
mov rax, qword [rsp + 0xd0]
cmp dword [rax + 0x34], 0
je 0x1401472b1
jmp 0x1401474cd
cmp dword [rsp + 0x88], 0
je 0x1401474ae
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.14013d790
mov qword [rsp + 0x60], rax
jmp 0x140147318
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xd0]
call fcn.14013d170
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xd0]
call fcn.14013d210
test eax, eax
jne 0x14014749a
mov eax, dword [rsp + 0x54]
inc eax
mov dword [rsp + 0x3c], eax
jmp 0x140147348
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
mov rcx, qword [rsp + 0x60]
call fcn.14013d970
cmp dword [rsp + 0x3c], eax
jge 0x1401473c5
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.14013b6c0
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x1401473c0
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call fcn.14013b550
movzx eax, ax
test eax, eax
je 0x1401473b6
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
mov rcx, qword [rsp + 0x30]
call fcn.14013b950
jmp 0x14014733e
mov rcx, qword [rsp + 0x60]
call fcn.14013d970
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.14013b6c0
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x140147495
mov rax, qword [rsp + 0x30]
mov rcx, qword [rax]
call fcn.14013b550
movzx eax, ax
mov dword [rsp + 0x7c], eax
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0xc]
cmp dword [rsp + 0x7c], eax
jl 0x140147445
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
jmp 0x14014748b
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.14012d850
mov rcx, qword [rsp + 0x60]
call fcn.14013d950
cmp qword [rsp + 0xb0], rax
je 0x14014748b
mov rax, qword [rsp + 0xd0]
mov dword [rax + 0x34], 0x10b
mov rcx, qword [rsp + 0x30]
call fcn.14013b950
jmp 0x140147306
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x58], eax
mov rcx, qword [rsp + 0x60]
call fcn.14013d720
jmp 0x1401474bd
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 0x140147017
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 0x1401474fe
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0x8c]
mov dword [rax + 0x34], ecx
add rsp, 0xc8
ret