Function at 0x4063e6
Capabilities:
Reference sql statements

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
lea rbp, [0x004d4196]
or esi, 0xffffffff
xor edi, edi
lea r12, str._UNION
inc qword [rcx + 0x40]
mov rbx, rcx
mov eax, dword [rbx + 0x48]
cmp eax, 0xb
je 0x406681
cmp eax, 7
je 0x406476
jg 0x406428
dec eax
je 0x40643b
jmp 0x406618
cmp eax, 8
je 0x4064a7
cmp eax, 9
je 0x40655c
jmp 0x406618
mov esi, dword [rbx + 0x4c]
call sym.sqlite3_keyword_count
cmp esi, eax
jl 0x40645b
mov qword [rbx + 0x28], 0
or esi, 0xffffffff
mov dword [rbx + 0x48], 7
jmp 0x40640c
mov ecx, dword [rbx + 0x4c]
lea rdx, [rbx + 0x28]
lea r8, [rbx + 0x30]
lea eax, [rcx + 1]
mov dword [rbx + 0x4c], eax
call sym.sqlite3_keyword_name
jmp 0x40661d
cmp qword [rbx + 0x38], 0
jne 0x40662c
mov rcx, qword [rbx + 8]
lea r9, [rbx + 0x38]
or r8d, 0xffffffff
mov qword [rsp + 0x20], 0
lea rdx, str.PRAGMA_database_list
call sym.sqlite3_prepare_v2
jmp 0x40662c
xor esi, esi
cmp qword [rbx + 0x38], 0
mov edi, 9
jne 0x406636
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x38]
or r8d, 0xffffffff
mov rdi, rbp
mov qword [rsp + 0x20], 0
lea rdx, str.PRAGMA_database_list
xor esi, esi
lea r13, str._z_sSELECT_name_FROM___w_.sqlite_schema
call sym.sqlite3_prepare_v2
mov rcx, qword [rsp + 0x38]
call sym.sqlite3_step
mov rcx, qword [rsp + 0x38]
cmp eax, 0x64
jne 0x406526
mov edx, 1
call sym.sqlite3_column_text
mov r8, rdi
mov rdx, rsi
mov rcx, r13
mov r9, rax
mov rdi, r12
call sym.sqlite3_mprintf
test rax, rax
mov rsi, rax
jne 0x4064e7
jmp 0x4065db
call sym.sqlite3_finalize
mov rcx, qword [rbx + 8]
mov rdx, rsi
or r8d, 0xffffffff
lea r9, [rbx + 0x38]
mov edi, 9
mov qword [rsp + 0x20], 0
call sym.sqlite3_prepare_v2
mov rcx, rsi
xor esi, esi
call sym.sqlite3_free
jmp 0x406636
xor esi, esi
cmp qword [rbx + 0x38], 0
mov edi, 0xb
jne 0x406636
mov rcx, qword [rbx + 8]
lea r9, [rsp + 0x38]
or r8d, 0xffffffff
mov rdi, rbp
mov qword [rsp + 0x20], 0
lea rdx, str.PRAGMA_database_list
xor esi, esi
lea r13, str._z_sSELECT_pti.name_FROM___w_.sqlite_schema_AS_sm_JOIN_pragma_table_info_sm.name__Q__AS_pti_WHERE_sm.typetable
call sym.sqlite3_prepare_v2
mov rcx, qword [rsp + 0x38]
call sym.sqlite3_step
mov rcx, qword [rsp + 0x38]
cmp eax, 0x64
jne 0x4065e5
mov edx, 1
call sym.sqlite3_column_text
mov r8, rdi
mov rdx, rsi
mov rcx, r13
mov r9, rax
mov qword [rsp + 0x20], rax
mov rdi, r12
call sym.sqlite3_mprintf
test rax, rax
mov rsi, rax
jne 0x40659c
mov eax, 7
jmp 0x4066a6
call sym.sqlite3_finalize
mov rcx, qword [rbx + 8]
mov rdx, rsi
or r8d, 0xffffffff
lea r9, [rbx + 0x38]
mov edi, 0xb
mov qword [rsp + 0x20], 0
call sym.sqlite3_prepare_v2
mov rcx, rsi
xor esi, esi
call sym.sqlite3_free
jmp 0x406636
cmp esi, 0xffffffff
jne 0x406636
or esi, 0xffffffff
cmp qword [rbx + 0x28], 0
jne 0x406678
jmp 0x40640c
mov esi, 1
mov edi, 8
mov rcx, qword [rbx + 0x38]
call sym.sqlite3_step
mov rcx, qword [rbx + 0x38]
cmp eax, 0x64
jne 0x406663
mov edx, esi
call sym.sqlite3_column_text
mov rcx, qword [rbx + 0x38]
mov edx, esi
mov qword [rbx + 0x28], rax
call sym.sqlite3_column_bytes
mov dword [rbx + 0x30], eax
jmp 0x406678
call sym.sqlite3_finalize
mov qword [rbx + 0x38], 0
mov dword [rbx + 0x48], edi
jmp 0x40640c
mov r8d, dword [rbx + 0x10]
test r8d, r8d
jne 0x406685
xor eax, eax
jmp 0x4066a6
cmp r8d, dword [rbx + 0x30]
jg 0x40640c
mov rdx, qword [rbx + 0x28]
mov rcx, qword [rbx + 0x18]
call sym.sqlite3_strnicmp
test eax, eax
jne 0x40640c
jmp 0x406681
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret