Function at 0x41bb90
Capabilities:
Reference sql statements
Terminate process
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, edx
mov dword [esp], 0
mov eax, dword [edx]
test ecx, ecx
je 0x41bc10
mov ebx, ecx
test eax, eax
je 0x41bd35
mov ecx, esp
push 0
push ecx
push 0xffffffffffffffff
push str.INSERT_INTO_ColNames_name_nlen_chop_reps_suff__VALUES_iif_length__1__0__1____max_length__1__1__0_0__
push eax
call fcn.0042be00
add esp, 0x14
cmp eax, 7
je 0x41be60
push 0
push 0xffffffffffffffff
push ebx
push 1
push dword [esp + 0x10]
call fcn.00432710
add esp, 0x14
cmp eax, 7
je 0x41be60
push dword [esp]
call fcn.0042be30
add esp, 4
cmp eax, 7
je 0x41be60
push dword [esp]
call fcn.0042d1d0
add esp, 4
xor edi, edi
jmp 0x41be56
test eax, eax
je 0x41bd72
mov dword [esp + 4], 0xffffffff
lea ecx, [esp + 4]
push 0
push ecx
push 0xffffffffffffffff
push str.SELECT_count_DISTINCT__substring_name_1_nlen_chop_suff__COLLATE_NOCASE___count_name__FROM_ColNames
push eax
call fcn.0042be00
add esp, 0x14
mov eax, dword [esp + 4]
test eax, eax
je 0x41bd79
push eax
call fcn.0042be30
add esp, 4
mov ecx, dword [esp + 4]
cmp eax, 0x64
jne 0x41bd7b
push 0
push ecx
call fcn.0042d110
add esp, 8
mov edi, eax
push dword [esp + 4]
call fcn.0042d1d0
add esp, 4
test edi, edi
je 0x41bd84
mov eax, dword [esi]
mov dword [esp + 8], 0xffffffff
lea ecx, [esp + 8]
push 0
push ecx
push 0xffffffffffffffff
push str.SELECT_CASE_WHEN__nc___10__THEN_1_WHEN__nc___100__THEN_2__WHEN__nc___1000__THEN_3_WHEN__nc___10000__THEN_4__ELSE_5_FROM__SELECT_count___AS_nc_FROM_ColNames_
push eax
call fcn.0042be00
add esp, 0x14
mov eax, dword [esp + 8]
xor edi, edi
test eax, eax
je 0x41bcc3
push eax
call fcn.0042be30
add esp, 4
cmp eax, 0x64
jne 0x41bcc3
push 0
push dword [esp + 0xc]
call fcn.0042d110
add esp, 8
mov edi, eax
push dword [esp + 8]
call fcn.0042d1d0
add esp, 4
push 0
push 0
push 0
push 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_
push dword [esi]
call fcn.00435e30
add esp, 0x14
cmp eax, 7
je 0x41be60
mov eax, esp
push 0
push eax
push 0xffffffffffffffff
push 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_______
push dword [esi]
call fcn.0042be00
add esp, 0x14
cmp eax, 7
je 0x41be60
push edi
push 1
push dword [esp + 8]
call fcn.00432550
add esp, 0xc
push dword [esp]
call fcn.0042be30
add esp, 4
push dword [esp]
call fcn.0042d1d0
add esp, 4
xor ebx, ebx
jmp 0x41bd86
push esi
push 0x51cf2a
call fcn.0043b8e0
add esp, 8
xor edi, edi
test eax, eax
jne 0x41be56
push 0
push 0
push 0
push 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__
push dword [esi]
call fcn.00435e30
add esp, 0x14
cmp eax, 7
je 0x41be60
mov eax, dword [esi]
jmp 0x41bbb0
xor edi, edi
jmp 0x41be56
xor ecx, ecx
push ecx
call fcn.0042d1d0
add esp, 4
mov bl, 1
mov ebp, esp
push 0
push ebp
push 0xffffffffffffffff
push 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_
push dword [esi]
call fcn.0042be00
add esp, 0x14
cmp eax, 7
je 0x41be60
push dword [esp]
call fcn.0042be30
add esp, 4
xor edi, edi
cmp eax, 0x64
jne 0x41bdd5
push 0
push dword [esp + 4]
call fcn.00431d90
add esp, 8
push eax
push 0x51d22f
call fcn.00428600
add esp, 8
mov edi, eax
cmp dword [esp + 0x20], 0
je 0x41be3b
mov eax, ebx
xor ebx, ebx
test al, al
jne 0x41be35
push dword [esp]
call fcn.0042d1d0
add esp, 4
push 0
push ebp
push 0xffffffffffffffff
push str.SELECT_group_concat__printf___w__to___w__name_printf___.s_s__nlen_chop__name__suff_____x0a_FROM_ColNames_WHERE_suff___OR_chop_0
push dword [esi]
call fcn.0042be00
add esp, 0x14
test eax, eax
jne 0x41be35
push dword [esp]
call fcn.0042be30
add esp, 4
cmp eax, 0x64
jne 0x41be35
push 0
push dword [esp + 4]
call fcn.00431d90
add esp, 8
push eax
push 0x51d22f
call fcn.00428600
add esp, 8
mov ebx, eax
mov eax, dword [esp + 0x20]
mov dword [eax], ebx
push dword [esp]
call fcn.0042d1d0
add esp, 4
push dword [esi]
call fcn.00439d60
add esp, 4
mov dword [esi], 0
mov eax, edi
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
push 1
push 0x15
push str.Error:_out_of_memory_n
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
push 1
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
nop word cs:[eax + eax]