Function at 0x180006490
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 0x18000682e
lea r14, [0x180000000]
lea r15, [0x18014aad0]
nop dword [rax]
mov ecx, dword [rbx + 0x48]
dec ecx
je 0x18000674a
sub ecx, 6
je 0x1800066d1
dec ecx
je 0x1800065e8
dec ecx
jne 0x1800065db
cmp qword [rbx + 0x38], r13
lea rbp, [rbx + 0x38]
jne 0x1800065ce
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, [0x180144ae4]
call fcn.180088380
mov rdi, qword [rsp + 0x80]
mov rcx, rdi
call sym.sqlite.dll_sqlite3_step
cmp eax, 0x64
jne 0x180006599
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 0x180006848
mov rcx, rdi
lea rsi, str._UNION
call sym.sqlite.dll_sqlite3_step
cmp eax, 0x64
je 0x180006552
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.180088380
mov rcx, r12
call sym.sqlite.dll_sqlite3_free
mov edi, r13d
mov esi, 0xb
jmp 0x18000670c
test edi, edi
jns 0x18000670c
jmp 0x180006790
cmp qword [rbx + 0x38], r13
lea rbp, [rbx + 0x38]
jne 0x1800066c7
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, [0x180144ae4]
call fcn.180088380
mov rdi, qword [rsp + 0x88]
mov rcx, rdi
call sym.sqlite.dll_sqlite3_step
cmp eax, 0x64
jne 0x180006692
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 0x180006848
mov rcx, rdi
lea rsi, str._UNION
call sym.sqlite.dll_sqlite3_step
cmp eax, 0x64
je 0x180006650
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.180088380
mov rcx, r12
call sym.sqlite.dll_sqlite3_free
mov edi, r13d
mov esi, 9
jmp 0x18000670c
cmp qword [rbx + 0x38], r13
lea rax, [rbx + 0x38]
jne 0x180006704
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.180088380
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 0x180006739
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 0x18000679a
call sym.sqlite.dll_sqlite3_finalize
mov qword [rbx + 0x38], r13
mov dword [rbx + 0x48], esi
jmp 0x180006824
mov eax, dword [rbx + 0x4c]
cmp eax, 0x93
jl 0x180006761
mov qword [rbx + 0x28], r13
mov dword [rbx + 0x48], 7
jmp 0x18000678d
lea ecx, [rax + 1]
mov dword [rbx + 0x4c], ecx
cmp eax, 0x92
ja 0x18000678d
movsxd rcx, ecx
movzx eax, word [r14 + rcx*2 + 0x14af90]
add rax, r15
mov qword [rbx + 0x28], rax
movzx eax, byte [rcx + r14 + 0x14aec0]
mov dword [rbx + 0x30], eax
or edi, 0xffffffff
cmp qword [rbx + 0x28], r13
je 0x180006824
mov edx, dword [rbx + 0x10]
test edx, edx
je 0x18000682e
cmp edx, dword [rbx + 0x30]
jg 0x180006824
mov r9, qword [rbx + 0x18]
mov r8, qword [rbx + 0x28]
test r9, r9
jne 0x1800067be
neg r8
sbb eax, eax
jmp 0x180006820
test r8, r8
je 0x180006824
test edx, edx
jle 0x1800067fe
nop word [rax + rax]
movzx ecx, byte [r9]
dec edx
test cl, cl
je 0x180006800
movzx eax, byte [r8]
movzx ecx, cl
movzx eax, byte [rax + r14 + 0x144c60]
cmp byte [rcx + r14 + 0x144c60], al
jne 0x180006800
inc r9
inc r8
test edx, edx
jg 0x1800067d0
dec edx
test edx, edx
js 0x18000682e
movzx eax, byte [r8]
movzx ecx, byte [rax + r14 + 0x144c60]
movzx eax, byte [r9]
movzx eax, byte [rax + r14 + 0x144c60]
sub eax, ecx
test eax, eax
je 0x18000682e
cmp dword [rbx + 0x48], 0xb
jne 0x1800064d0
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 0x180006830