Function at 0x180005640
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
inc qword [rcx + 0x40]
xor r13d, r13d
or edi, 0xffffffff
cmp dword [rcx + 0x48], 0xb
mov rbx, rcx
mov esi, r13d
je 0x1800059de
lea r14, [0x180000000]
lea r15, [0x1801497e0]
nop dword [rax]
mov ecx, dword [rbx + 0x48]
dec ecx
je 0x1800058fa
sub ecx, 6
je 0x180005881
dec ecx
je 0x180005798
dec ecx
jne 0x18000578b
cmp qword [rbx + 0x38], r13
lea rbp, [rbx + 0x38]
jne 0x18000577e
mov rcx, qword [rbx + 8]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
lea rdx, str.PRAGMA_database_list
mov r9d, pe_nt_image_headers64
or r8d, 0xffffffff
mov qword [rsp + 0x20], r13
mov r12, r13
lea rsi, [0x1801437f4]
call fcn.1800873e0
mov rdi, qword [rsp + 0x80]
mov rcx, rdi
call sym.sqlite.dll_sqlite3_step
cmp eax, 0x64
jne 0x180005749
mov edx, 1
mov rcx, rdi
call sym.sqlite.dll_sqlite3_column_text
lea rcx, str._z_sSELECT_pti.name_FROM___w_.sqlite_schema_AS_sm_JOIN_pragma_table_info_sm.name__Q__AS_pti_WHERE_sm.typetable
mov r8, rsi
mov r9, rax
mov rdx, r12
mov qword [rsp + 0x20], rax
call sym.sqlite.dll_sqlite3_mprintf
mov r12, rax
test rax, rax
je 0x1800059f8
mov rcx, rdi
lea rsi, str._UNION
call sym.sqlite.dll_sqlite3_step
cmp eax, 0x64
je 0x180005702
mov rcx, rdi
call sym.sqlite.dll_sqlite3_finalize
mov rcx, qword [rbx + 8]
mov qword [rsp + 0x30], r13
mov r9d, pe_nt_image_headers64
or r8d, 0xffffffff
mov rdx, r12
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], r13
call fcn.1800873e0
mov rcx, r12
call sym.sqlite.dll_sqlite3_free
mov edi, r13d
mov esi, 0xb
jmp 0x1800058bc
test edi, edi
jns 0x1800058bc
jmp 0x180005940
cmp qword [rbx + 0x38], r13
lea rbp, [rbx + 0x38]
jne 0x180005877
mov rcx, qword [rbx + 8]
lea rax, [rsp + 0x88]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
lea rdx, str.PRAGMA_database_list
mov r9d, pe_nt_image_headers64
or r8d, 0xffffffff
mov qword [rsp + 0x20], r13
mov r12, r13
lea rsi, [0x1801437f4]
call fcn.1800873e0
mov rdi, qword [rsp + 0x88]
mov rcx, rdi
call sym.sqlite.dll_sqlite3_step
cmp eax, 0x64
jne 0x180005842
nop word [rax + rax]
mov edx, 1
mov rcx, rdi
call sym.sqlite.dll_sqlite3_column_text
lea rcx, str._z_sSELECT_name_FROM___w_.sqlite_schema
mov r8, rsi
mov r9, rax
mov rdx, r12
call sym.sqlite.dll_sqlite3_mprintf
mov r12, rax
test rax, rax
je 0x1800059f8
mov rcx, rdi
lea rsi, str._UNION
call sym.sqlite.dll_sqlite3_step
cmp eax, 0x64
je 0x180005800
mov rcx, rdi
call sym.sqlite.dll_sqlite3_finalize
mov rcx, qword [rbx + 8]
mov qword [rsp + 0x30], r13
mov r9d, pe_nt_image_headers64
or r8d, 0xffffffff
mov rdx, r12
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], r13
call fcn.1800873e0
mov rcx, r12
call sym.sqlite.dll_sqlite3_free
mov edi, r13d
mov esi, 9
jmp 0x1800058bc
cmp qword [rbx + 0x38], r13
lea rax, [rbx + 0x38]
jne 0x1800058b4
mov rcx, qword [rbx + 8]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
lea rdx, str.PRAGMA_database_list
mov r9d, pe_nt_image_headers64
or r8d, 0xffffffff
mov qword [rsp + 0x20], r13
call fcn.1800873e0
mov edi, 1
lea esi, [rdi + 7]
mov rcx, qword [rbx + 0x38]
call sym.sqlite.dll_sqlite3_step
mov rcx, qword [rbx + 0x38]
cmp eax, 0x64
jne 0x1800058e9
mov edx, edi
call sym.sqlite.dll_sqlite3_column_text
mov rcx, qword [rbx + 0x38]
mov edx, edi
mov qword [rbx + 0x28], rax
call sym.sqlite.dll_sqlite3_column_bytes
mov dword [rbx + 0x30], eax
jmp 0x18000594a
call sym.sqlite.dll_sqlite3_finalize
mov qword [rbx + 0x38], r13
mov dword [rbx + 0x48], esi
jmp 0x1800059d4
mov eax, dword [rbx + 0x4c]
cmp eax, 0x93
jl 0x180005911
mov qword [rbx + 0x28], r13
mov dword [rbx + 0x48], 7
jmp 0x18000593d
lea ecx, [rax + 1]
mov dword [rbx + 0x4c], ecx
cmp eax, 0x92
ja 0x18000593d
movsxd rcx, ecx
movzx eax, word [r14 + rcx*2 + 0x149ca0]
add rax, r15
mov qword [rbx + 0x28], rax
movzx eax, byte [rcx + r14 + 0x149bd0]
mov dword [rbx + 0x30], eax
or edi, 0xffffffff
cmp qword [rbx + 0x28], r13
je 0x1800059d4
mov edx, dword [rbx + 0x10]
test edx, edx
je 0x1800059de
cmp edx, dword [rbx + 0x30]
jg 0x1800059d4
mov r9, qword [rbx + 0x18]
mov r8, qword [rbx + 0x28]
test r9, r9
jne 0x18000596e
neg r8
sbb eax, eax
jmp 0x1800059d0
test r8, r8
je 0x1800059d4
test edx, edx
jle 0x1800059ae
nop word [rax + rax]
movzx ecx, byte [r9]
dec edx
test cl, cl
je 0x1800059b0
movzx eax, byte [r8]
movzx ecx, cl
movzx eax, byte [rax + r14 + 0x143970]
cmp byte [rcx + r14 + 0x143970], al
jne 0x1800059b0
inc r9
inc r8
test edx, edx
jg 0x180005980
dec edx
test edx, edx
js 0x1800059de
movzx eax, byte [r8]
movzx ecx, byte [rax + r14 + 0x143970]
movzx eax, byte [r9]
movzx eax, byte [rax + r14 + 0x143970]
sub eax, ecx
test eax, eax
je 0x1800059de
cmp dword [rbx + 0x48], 0xb
jne 0x180005680
xor eax, eax
mov rbx, qword [rsp + 0x90]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov eax, 7
jmp 0x1800059e0