Function at 0x1401b4832
Capabilities:
Reference sql statements

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xa0
mov qword [rbp + 0x10], rcx
mov dword [rbp + 0x18], edx
mov qword [rbp + 0x20], r8
mov qword [rbp + 0x28], r9
mov dword [rbp - 0x24], 0
mov qword [rbp - 8], 0
lea rax, [0x14036d6da]
mov qword [rbp - 0x10], rax
cmp dword [rbp + 0x30], 0
je 0x1401b4875
lea rax, str._rowid___
jmp 0x1401b487c
lea rax, [0x14036f359]
mov qword [rbp - 0x18], rax
mov dword [rbp - 0x20], 0xffffffff
mov qword [rbp - 0x40], 0
mov dword [rbp - 0x38], 0
mov dword [rbp - 0x34], 0
mov qword [rbp - 0x50], 0
mov dword [rbp - 0x48], 0
mov dword [rbp - 0x44], 0
mov qword [rbp - 0x60], 0
mov dword [rbp - 0x58], 0
mov dword [rbp - 0x54], 0
lea rdx, [rbp - 0x24]
lea rax, [rbp - 0x40]
mov r8, rdx
lea rdx, [0x14037c4bc]
mov rcx, rax
call sym.sessionAppendStr
mov rax, qword [rbp + 0x28]
mov rdx, rax
lea rax, str.sqlite_stat1
mov rcx, rax
call sym.sqlite3_stricmp
test eax, eax
jne 0x1401b495b
lea rdx, [rbp - 0x24]
lea rax, [rbp - 0x40]
mov r8, rdx
lea rdx, str._AND___6_OR__3_IS_stat_
mov rcx, rax
call sym.sessionAppendStr
lea rdx, [rbp - 0x24]
lea rax, [rbp - 0x50]
mov r8, rdx
lea rdx, str.tbl__idx
mov rcx, rax
call sym.sessionAppendStr
lea rdx, [rbp - 0x24]
lea rax, [rbp - 0x60]
mov r8, rdx
lea rdx, str._1___CASE_WHEN__2X_THEN_NULL_ELSE__2_END_
mov rcx, rax
call sym.sessionAppendStr
lea rax, str.tbl___2__stat
mov qword [rbp - 0x18], rax
jmp 0x1401b4a69
mov dword [rbp - 0x1c], 0
jmp 0x1401b4a5d
mov eax, dword [rbp - 0x1c]
movsxd rdx, eax
mov rax, qword [rbp + 0x48]
add rax, rdx
movzx eax, byte [rax]
test al, al
je 0x1401b4a04
lea rcx, [rbp - 0x24]
mov rdx, qword [rbp - 0x10]
lea rax, [rbp - 0x50]
mov r8, rcx
mov rcx, rax
call sym.sessionAppendStr
lea rcx, [rbp - 0x24]
mov rdx, qword [rbp - 0x10]
lea rax, [rbp - 0x60]
mov r8, rcx
mov rcx, rax
call sym.sessionAppendStr
lea rax, [0x140371d71]
mov qword [rbp - 0x10], rax
mov eax, dword [rbp - 0x1c]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x40]
add rax, rdx
mov rdx, qword [rax]
lea rcx, [rbp - 0x24]
lea rax, [rbp - 0x50]
mov r8, rcx
mov rcx, rax
call sym.sessionAppendIdent
mov eax, dword [rbp - 0x1c]
lea ecx, [rax + 1]
lea rdx, [rbp - 0x24]
lea rax, [rbp - 0x60]
mov r9d, ecx
lea r8, [0x14037c523]
mov rcx, rax
call sym.sessionAppendPrintf
jmp 0x1401b4a59
mov eax, dword [rbp - 0x1c]
cdqe
lea rdx, [rax*8]
mov rax, qword [rbp + 0x40]
add rax, rdx
mov rcx, qword [rax]
mov eax, dword [rbp - 0x1c]
lea r8d, [rax + 1]
mov eax, dword [rbp - 0x1c]
lea edx, [rax + 1]
mov eax, dword [rbp + 0x38]
lea r9d, [rdx + rax]
lea rdx, [rbp - 0x24]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x30], rcx
mov rcx, qword [rbp + 0x28]
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], r8d
lea r8, str._AND____d_OR___d_IS__w._w_
mov rcx, rax
call sym.sessionAppendPrintf
add dword [rbp - 0x1c], 1
mov eax, dword [rbp - 0x1c]
cmp eax, dword [rbp + 0x38]
jl 0x1401b4967
mov eax, dword [rbp - 0x24]
test eax, eax
jne 0x1401b4aca
mov r8, qword [rbp - 0x60]
mov rcx, qword [rbp - 0x50]
cmp dword [rbp + 0x18], 0
je 0x1401b4a84
mov rax, qword [rbp - 0x40]
jmp 0x1401b4a8b
lea rax, [0x14036d6da]
mov r9, qword [rbp + 0x20]
mov rdx, qword [rbp - 0x18]
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], rcx
mov rcx, qword [rbp + 0x28]
mov qword [rsp + 0x20], rcx
mov r8, rax
lea rax, str.SELECT__s_s_FROM__Q._Q_WHERE___s__IS___s_
mov rcx, rax
call sym.sqlite3_mprintf
mov qword [rbp - 8], rax
cmp qword [rbp - 8], 0
jne 0x1401b4aca
mov dword [rbp - 0x24], 7
mov eax, dword [rbp - 0x24]
test eax, eax
jne 0x1401b4afa
mov r8, qword [rbp + 0x50]
mov ecx, dword [rbp - 0x20]
mov rdx, qword [rbp - 8]
mov rax, qword [rbp + 0x10]
mov qword [rsp + 0x20], 0
mov r9, r8
mov r8d, ecx
mov rcx, rax
call sym.sqlite3_prepare_v2
mov dword [rbp - 0x24], eax
mov rax, qword [rbp - 8]
mov rcx, rax
call sym.sqlite3_free
mov rax, qword [rbp - 0x40]
mov rcx, rax
call sym.sqlite3_free
mov rax, qword [rbp - 0x50]
mov rcx, rax
call sym.sqlite3_free
mov rax, qword [rbp - 0x60]
mov rcx, rax
call sym.sqlite3_free
mov eax, dword [rbp - 0x24]
add rsp, 0xa0
pop rbp
ret