Function at 0x140014e30
Capabilities:
Reference sql statements

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x40
mov rsi, rcx
mov rbx, rdx
mov rcx, qword [rdx]
mov rbp, r8
mov qword [rsp + 0x38], 0
test rsi, rsi
jne 0x140015008
test rcx, rcx
je 0x1400150a4
lea r13, str.SELECT_count_DISTINCT__substring_name_1_nlen_chop_suff__COLLATE_NOCASE___count_name__FROM_ColNames
lea r12, [rsp + 0x38]
mov rdx, r13
call sym.db_int
mov edi, eax
test eax, eax
je 0x140014f64
mov rcx, qword [rbx]
lea rdx, str.SELECT_CAST_ceil_log_count__0.5___AS_INT__FROM_ColNames
call sym.db_int
mov rcx, qword [rbx]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], 0
lea rdx, str.UPDATE_ColNames_AS_t_SET_reps_SELECT_count___FROM_ColNames_d__WHERE_substring_t.name_1_t.nlen_t.chop_substring_d.name_1_d.nlen_d.chop__COLLATE_NOCASE_
mov r14d, eax
call sym.sqlite3_exec
cmp eax, 7
je 0x140015293
test eax, eax
je 0x140014edf
cmp eax, 0x65
je 0x140014edf
mov r8d, 0x5fd4
lea rdx, str.shell.c
lea rcx, str.rcSQLITE_OKrcSQLITE_DONE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
mov rcx, qword [rbx]
lea r12, [rsp + 0x38]
mov qword [rsp + 0x20], 0
mov r8d, 0xffffffff
mov r9, r12
lea rdx, str.WITH_Lzn_nlz__AS____SELECT_0_AS_nlz__UNION__SELECT_nlz1_AS_nlz_FROM_Lzn__WHERE_EXISTS____SELECT_1___FROM_ColNames_t__ColNames_o___WHERE____iif_t.name_IN__SELECT__FROM_RepeatedNames_______printf__s__s_______t.name__substring_printf__.c_0.d_nlz1_0__1_t.cpos__2________t.name_____________iif_o.name_IN__SELECT__FROM_RepeatedNames_______printf__s__s_______o.name__substring_printf__.c_0.d_nlz1_0__1_o.cpos__2________o.name_________COLLATE_NOCASE____AND_o.cpos__t.cpos___GROUP_BY_t.cpos_____UPDATE_Colnames_AS_t_SET_chop__0__suff__iif_name_IN__SELECT__FROM_RepeatedNames____printf___s__substring____printf__.c_0.d__SELECT_max_nlz__FROM_Lzn_1_0_1_t.cpos__2_______
call sym.sqlite3_prepare_v2
cmp eax, 7
je 0x140015293
test eax, eax
je 0x140014f31
cmp eax, 0x65
je 0x140014f31
mov r8d, 0x5fd4
lea rdx, str.shell.c
lea rcx, str.rcSQLITE_OKrcSQLITE_DONE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
mov rcx, qword [rsp + 0x38]
mov r8d, r14d
mov edx, 1
call sym.sqlite3_bind_int
mov rcx, qword [rsp + 0x38]
call sym.sqlite3_step
mov rcx, qword [rsp + 0x38]
mov r14d, eax
call sym.sqlite3_finalize
cmp r14d, 0x65
jne 0x140015293
mov rcx, qword [rbx]
mov rdx, r13
call sym.db_int
test eax, eax
jne 0x140015150
mov rcx, qword [rbx]
mov r9, r12
mov qword [rsp + 0x20], 0
mov r8d, 0xffffffff
lea rdx, str.SELECT__x0a__group_concat___cname_TEXT____iif__cpos_1__4_0_____x0a______AS_ColsSpec_FROM___SELECT_cpos__printf___w__printf___.s_s__nlen_chop_name_suff___AS_cname__FROM_ColNames_ORDER_BY_cpos_
call sym.sqlite3_prepare_v2
cmp eax, 7
je 0x140015293
test eax, eax
je 0x140014fae
cmp eax, 0x65
jne 0x1400150b8
mov rcx, qword [rsp + 0x38]
call sym.sqlite3_step
cmp eax, 0x64
je 0x140015270
mov rcx, qword [rsp + 0x38]
test rbp, rbp
je 0x140014fdb
test edi, edi
jne 0x140015200
mov qword [rbp], 0
call sym.sqlite3_finalize
mov rcx, qword [rbx]
call sym.sqlite3_close
mov rax, rsi
mov qword [rbx], 0
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
test rcx, rcx
je 0x140015170
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x38]
mov r8d, 0xffffffff
lea rdx, str.INSERT_INTO_ColNames_name_nlen_chop_reps_suff__VALUES_iif_length__1__0__1____max_length__1__1__0_0__
call sym.sqlite3_prepare_v2
cmp eax, 7
je 0x140015293
test eax, eax
je 0x140015047
cmp eax, 0x65
jne 0x140015100
mov rcx, qword [rsp + 0x38]
mov r9d, 0xffffffff
mov r8, rsi
mov edx, 1
mov qword [rsp + 0x20], 0
call sym.sqlite3_bind_text
cmp eax, 7
je 0x140015293
test eax, eax
je 0x14001507a
cmp eax, 0x65
jne 0x1400150e0
mov rcx, qword [rsp + 0x38]
call sym.sqlite3_step
cmp eax, 7
je 0x140015293
test eax, eax
je 0x14001509a
cmp eax, 0x65
jne 0x140015120
mov rcx, qword [rsp + 0x38]
call sym.sqlite3_finalize
xor eax, eax
add rsp, 0x40
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov r8d, 0x5fd4
lea rdx, str.shell.c
lea rcx, str.rcSQLITE_OKrcSQLITE_DONE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
jmp 0x140014fae
mov r8d, 0x5fd4
lea rdx, str.shell.c
lea rcx, str.rcSQLITE_OKrcSQLITE_DONE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
jmp 0x14001507a
mov r8d, 0x5fd4
lea rdx, str.shell.c
lea rcx, str.rcSQLITE_OKrcSQLITE_DONE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
jmp 0x140015047
mov r8d, 0x5fd4
lea rdx, str.shell.c
lea rcx, str.rcSQLITE_OKrcSQLITE_DONE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
mov rcx, qword [rsp + 0x38]
call sym.sqlite3_finalize
jmp 0x1400150a4
mov r8d, 0x607e
lea rdx, str.shell.c
lea rcx, str.db_int_pDb__zHasDupes_0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
jmp 0x140014f77
lea rcx, [0x140152a7c]
call sym.sqlite3_open
test eax, eax
jne 0x1400150a4
mov rcx, qword [rbx]
xor r9d, r9d
xor r8d, r8d
lea rdx, str.CREATE_TABLE_ColNames__cpos_INTEGER_PRIMARY_KEY__name_TEXT__nlen_INT__chop_INT__reps_INT__suff_TEXT__CREATE_VIEW_RepeatedNames_AS_SELECT_DISTINCT_t.name_FROM_ColNames_t_WHERE_t.name_COLLATE_NOCASE_IN___SELECT_o.name_FROM_ColNames_o_WHERE_o.cpos__t.cpos__
mov qword [rsp + 0x20], 0
call sym.sqlite3_exec
cmp eax, 7
je 0x140015293
test eax, eax
je 0x1400151ce
cmp eax, 0x65
je 0x1400151ce
mov r8d, 0x5fd4
lea rdx, str.shell.c
lea rcx, str.rcSQLITE_OKrcSQLITE_DONE
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
mov rcx, qword [rbx]
test rcx, rcx
jne 0x140015011
lea rcx, str.pDb_0
mov r8d, 0x6060
lea rdx, str.shell.c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__assert]
mov rcx, qword [rbx]
jmp 0x140015011
call sym.sqlite3_finalize
mov rcx, qword [rbx]
mov r9, r12
mov qword [rsp + 0x20], 0
mov r8d, 0xffffffff
lea rdx, str.SELECT_group_concat__printf___w__to___w__name_printf___.s_s__nlen_chop__name__suff_____x0a_FROM_ColNames_WHERE_suff___OR_chop_0
call sym.sqlite3_prepare_v2
mov rcx, qword [rsp + 0x38]
test eax, eax
jne 0x140014fd3
call sym.sqlite3_step
mov rcx, qword [rsp + 0x38]
cmp eax, 0x64
jne 0x140014fd3
xor edx, edx
call sym.sqlite3_column_text
lea rcx, [0x1401509b2]
mov rdx, rax
call sym.sqlite3_mprintf
mov rcx, qword [rsp + 0x38]
mov qword [rbp], rax
jmp 0x140014fdb
mov rcx, qword [rsp + 0x38]
xor edx, edx
call sym.sqlite3_column_text
lea rcx, [0x1401509b2]
mov rdx, rax
call sym.sqlite3_mprintf
mov rsi, rax
jmp 0x140014fc1
call sym.shell_out_of_memory
nop
nop dword [rax]