Function at 0x4ed835
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov edi, eax
mov ebx, edx
mov esi, ecx
sub esp, 0x4c
test edx, edx
mov dword [ebp - 0x1c], 0
jne 0x4ed86b
mov dword [esp + 8], 0x5a8a
mov dword [esp + 4], str.shell.c
mov dword [esp], 0x5081b0
call fcn.004eaa60
test edi, edi
je 0x4ed95c
cmp dword [ebx], 0
jne 0x4ed8bf
mov dword [esp + 4], ebx
mov dword [esp], str.:memory:
call fcn.004b2505
test eax, eax
jne 0x4ed955
mov eax, dword [ebx]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 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 dword [esp], eax
call fcn.00477ee4
call fcn.004ed7fe
cmp dword [ebx], 0
jne 0x4ed8e0
mov dword [esp + 8], 0x5a97
mov dword [esp + 4], str.shell.c
mov dword [esp], str.pDb_0
call fcn.004eaa60
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], str.INSERT_INTO_ColNames_name_nlen_chop_reps_suff__VALUES_iif_length__1__0__1____max_length__1__1__0_0__
mov dword [esp + 0xc], eax
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.0048b371
call fcn.004ed7fe
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0042e1f2
call fcn.004ed7fe
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.0047778f
call fcn.004ed7fe
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.00458aaf
xor eax, eax
jmp 0x4edb4f
mov eax, dword [ebx]
test eax, eax
je 0x4ed955
mov edx, str.SELECT_count_DISTINCT__substring_name_1_nlen_chop_suff__COLLATE_NOCASE___count_name__FROM_ColNames
lea edi, [ebp - 0x1c]
call fcn.004ed65b
test eax, eax
mov dword [ebp - 0x30], eax
je 0x4eda21
mov eax, dword [ebx]
mov edx, str.SELECT_CAST_ceil_log_count__0.5___AS_INT__FROM_ColNames
call fcn.004ed65b
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 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 dword [esp], eax
call fcn.00477ee4
call fcn.004ed7fe
mov eax, dword [ebx]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 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_______
mov dword [esp], eax
call fcn.0048b371
call fcn.004ed7fe
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 1
mov dword [esp + 8], edx
mov dword [esp], eax
call fcn.0042df80
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.0047778f
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.00458aaf
cmp dword [ebp - 0x2c], 0x65
je 0x4eda21
call fcn.004ed6c5
mov eax, dword [ebx]
mov edx, str.SELECT_count_DISTINCT__substring_name_1_nlen_chop_suff__COLLATE_NOCASE___count_name__FROM_ColNames
call fcn.004ed65b
test eax, eax
je 0x4eda4d
mov dword [esp + 8], 0x5ab5
mov dword [esp + 4], str.shell.c
mov dword [esp], str.db_int_pDb__zHasDupes_0
call fcn.004eaa60
mov eax, dword [ebx]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 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_
mov dword [esp], eax
call fcn.0048b371
call fcn.004ed7fe
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.0047778f
cmp eax, 0x64
mov dword [ebp - 0x2c], 0
jne 0x4edab5
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0041feb6
mov dword [esp], 0x506d0a
mov dword [esp + 4], eax
call fcn.004440e8
mov dword [ebp - 0x2c], eax
test esi, esi
je 0x4edb31
cmp dword [ebp - 0x30], 0
jne 0x4edac7
mov dword [esi], 0
jmp 0x4edb31
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.00458aaf
mov eax, dword [ebx]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], str.SELECT_group_concat__printf___w__to___w__name_printf___.s_s__nlen_chop__name__suff_____x0a_FROM_ColNames_WHERE_suff___OR_chop_0
mov dword [esp], eax
call fcn.0048b371
test eax, eax
jne 0x4edabf
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.0047778f
cmp eax, 0x64
jne 0x4edabf
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0041feb6
mov dword [esp], 0x506d0a
mov dword [esp + 4], eax
call fcn.004440e8
mov dword [esi], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.00458aaf
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00457d58
mov eax, dword [ebp - 0x2c]
mov dword [ebx], 0
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret