Function at 0x4051c0
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4180ab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb28
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0xb34], 0x4193d4
mov edi, dword [ebp + 0xc]
xor esi, esi
cmp edi, esi
mov dword [ebp - 4], esi
jne 0x405217
mov eax, 0x800432b1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebx + 8]
cmp ecx, esi
je 0x405292
push 1
call fcn.00403a90
mov ecx, dword [ebx + 8]
push str._t_CProfileConverter::ConvertPreferredProfileList___started_
call fcn.004037f0
mov ecx, dword [ebx + 8]
push 1
call fcn.00403a90
cmp dword [ebx + 0xc], 1
jge 0x405292
mov ecx, dword [ebx + 8]
push 1
call fcn.00403a90
mov ecx, dword [ebx + 8]
push str._tCProfileConverter::ConvertPreferredProfileList_____No_preferred_profiles_available_
call fcn.004037f0
mov ecx, dword [ebx + 8]
push 1
call fcn.00403a90
mov ecx, dword [ebx + 8]
push str._t_CProfileConverter::ConvertPreferredProfileList___completed_
call fcn.004037f0
mov ecx, dword [ebx + 8]
push 1
call fcn.00403a90
mov eax, 0x43297
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push edi
mov ecx, ebx
call fcn.00404cb0
cmp eax, esi
mov dword [ebp - 0x28], eax
jne 0x4052b9
mov eax, 0x80043298
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor edi, edi
mov dword [ebp - 0x14], esi
mov byte [ebp - 4], 1
mov dword [ebp - 0x18], edi
xor eax, eax
cmp eax, dword [ebx + 0xc]
jge 0x4052dc
mov ecx, dword [ebx + 0x14]
cmp byte [ecx + eax], 0
je 0x4052d9
inc edi
mov dword [ebp - 0x18], edi
inc eax
jmp 0x4052c7
lea edx, [edi*4]
push edx
call fcn.00412fea
add esp, 4
cmp eax, esi
mov dword [ebp - 0x14], eax
jne 0x405324
mov ecx, dword [ebx + 8]
cmp ecx, esi
je 0x40530c
push str._tSystem_is_out_of_memory_allocating_memory_for_preferred_profile_name_list_
call fcn.004037f0
mov ecx, dword [ebx + 8]
call fcn.004039d0
mov eax, 0x80043298
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 0x1c], esi
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x24], esi
cmp esi, eax
jge 0x40538e
mov eax, dword [ebx + 0x14]
cmp byte [eax + esi], 0
je 0x40549b
cmp dword [ebp - 0x1c], edi
je 0x40538e
mov ecx, dword [ebx + 0x10]
xor eax, eax
mov edi, dword [ecx + esi*4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00412fea
mov ecx, dword [ebp - 0x1c]
mov edx, eax
mov eax, dword [ebp - 0x14]
add esp, 4
test edx, edx
mov dword [eax + ecx*4], edx
jne 0x40546b
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x40546b
push str._tSystem_is_out_of_memory_allocating_memory_for_preferred_profile_name_
call fcn.004037f0
mov ecx, dword [ebx + 8]
call fcn.004039d0
mov edi, dword [ebp - 0x18]
mov eax, dword [ebx + 8]
test eax, eax
je 0x4053bd
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x930]
push ecx
push edi
push str._tSaving_preferred_list_with_actual__d_entries_for_user:__s
push edx
call fcn.00409203
mov ecx, dword [ebx + 8]
add esp, 0x10
lea eax, [ebp - 0x930]
push eax
call fcn.004037f0
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x28]
push 1
push 0
push edi
push ecx
push edx
mov ecx, ebx
call fcn.00404e00
cmp eax, 0x43297
mov dword [ebp + 0xc], eax
jne 0x40551b
cmp edi, dword [ebx + 0xc]
jne 0x4054e1
mov eax, dword [ebp + 8]
push 0x104
lea ecx, [ebp - 0x130]
push eax
push ecx
call fcn.00409255
mov edx, dword [str.PreferredProfile.lst]
add esp, 0xc
lea eax, [ebp - 0x130]
push edx
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea ecx, [ebp - 0x130]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
mov eax, dword [ebx + 8]
jne 0x4054a1
test eax, eax
je 0x405456
lea edx, [ebp - 0x130]
lea eax, [ebp - 0x930]
push edx
push str._tPreferred_list_file_named__s_does_not_exist.
push eax
call fcn.00409203
add esp, 0xc
lea ecx, [ebp - 0x930]
push ecx
mov ecx, dword [ebx + 8]
call fcn.004037f0
lea edx, [ebp - 0x2c]
push 0x41b078
push edx
mov dword [ebp - 0x2c], 0xffffffff
call fcn.00409c14
mov eax, dword [ebx + 0x10]
or ecx, 0xffffffff
mov edi, dword [eax + esi*4]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x1c]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
inc esi
jmp 0x405327
test eax, eax
je 0x4054cf
lea eax, [ebp - 0x130]
lea ecx, [ebp - 0x930]
push eax
push str._tDeleting_preferred_list_file_named__s
push ecx
call fcn.00409203
mov ecx, dword [ebx + 8]
add esp, 0xc
lea edx, [ebp - 0x930]
push edx
call fcn.004037f0
lea eax, [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x4055c8
mov eax, dword [ebx + 8]
test eax, eax
je 0x4055c8
lea ecx, [ebp - 0x130]
lea edx, [ebp - 0x930]
push ecx
push str._tNot_deleting_preferred_list_file_named__s_because_not_all_profiles_are_converted.
push edx
call fcn.00409203
mov ecx, dword [ebx + 8]
add esp, 0xc
lea eax, [ebp - 0x930]
push eax
call fcn.004037f0
jmp 0x4055c8
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x4055c8
lea esi, [eax + 0x7ffbcd63]
cmp esi, 0x15
ja case.0x405539.2147208543
xor edx, edx
mov dl, byte [esi + 0x405658]
jmp dword [edx*4 + 0x405644]
push str._t_FAILED__Unable_to_load_the_PfMgrApi.dll_dynamic_library.
call fcn.004037f0
jmp 0x4055c8
push str._t_FAILED__Unable_to_load_function_SavePreferredProfileList___from_PfMgrApi.dll_dynamic_library.
call fcn.004037f0
jmp 0x4055c8
push str._t_FAILED__The_data_in_one_or_more_parameters_are_invalid.
call fcn.004037f0
jmp 0x4055c8
push str._t_FAILED__The_profile_database_is_locked_by_another_user.
call fcn.004037f0
jmp 0x4055c8
push str._t_FAILED__Unknown_fatal_error_occured_while_saving_the_preferred_profile_list.
call fcn.004037f0
jmp 0x4055c8
mov eax, dword [ebp - 0x28]
mov ecx, ebx
push eax
mov dword [ebp - 4], 0
call fcn.00404d00
test edi, edi
jle 0x4055f6
mov esi, dword [ebp - 0x14]
mov eax, dword [esi]
test eax, eax
je 0x4055f0
push eax
call fcn.00413013
add esp, 4
add esi, 4
dec edi
jne 0x4055e1
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x405606
push eax
call fcn.00413013
add esp, 4
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x40562b
push 1
call fcn.00403a90
mov ecx, dword [ebx + 8]
push str._t_CProfileConverter::ConvertPreferredProfileList___completed_
call fcn.004037f0
mov ecx, dword [ebx + 8]
push 1
call fcn.00403a90
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8