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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4180cb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb38
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0xb44], 0x4193d4
mov edi, dword [ebp + 0xc]
xor esi, esi
cmp edi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x30], 0x43297
jne 0x4056ce
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 0x405749
push 1
call fcn.00403a90
mov ecx, dword [ebx + 8]
push str._t_CProfileConverter::ConvertCommonPreferredProfileList___started_
call fcn.004037f0
mov ecx, dword [ebx + 8]
push 1
call fcn.00403a90
cmp dword [ebx + 0xc], 1
jge 0x405749
mov ecx, dword [ebx + 8]
push 1
call fcn.00403a90
mov ecx, dword [ebx + 8]
push str._tCProfileConverter::ConvertCommonPreferredProfileList_____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::ConvertCommonPreferredProfileList___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
mov eax, dword [ebp + 8]
push 0x104
lea ecx, [ebp - 0x140]
push eax
push ecx
call fcn.00409255
mov edx, dword [str.PreferredProfile.lst]
add esp, 0xc
lea eax, [ebp - 0x140]
push edx
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea ecx, [ebp - 0x140]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40579e
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 - 0x34], eax
jne 0x4057c5
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 - 0x1c], esi
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x11], 0
mov byte [ebp - 0x12], 0
mov byte [ebp - 4], 1
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x24], esi
xor eax, eax
cmp eax, dword [ebx + 0xc]
jge 0x40580c
mov edx, dword [ebx + 0x14]
cmp byte [edx + eax], 0
je 0x405809
mov ecx, dword [ebx + 0x18]
mov ecx, dword [ecx + eax*4]
test cl, 4
je 0x405801
inc edi
inc eax
mov dword [ebp - 0x2c], edi
jmp 0x4057e1
test cl, 2
je 0x405809
inc dword [ebp - 0x24]
inc eax
jmp 0x4057e1
cmp edi, esi
jle 0x405951
lea edx, [edi*4]
push edx
call fcn.00412fea
add esp, 4
cmp eax, esi
mov dword [ebp - 0x1c], eax
jne 0x40585c
mov ecx, dword [ebx + 8]
cmp ecx, esi
je 0x405844
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
xor esi, esi
xor eax, eax
mov dword [ebp - 0x20], esi
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x28], eax
cmp eax, ecx
jge 0x405951
mov ecx, dword [ebx + 0x14]
cmp byte [ecx + eax], 0
je 0x40594b
cmp esi, edi
je 0x405951
mov edx, dword [ebx + 0x18]
test byte [edx + eax*4], 4
je 0x40594b
mov ecx, dword [ebx + 0x10]
mov edi, dword [ecx + eax*4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00412fea
mov edx, eax
mov eax, dword [ebp - 0x1c]
add esp, 4
test edx, edx
mov dword [eax + esi*4], edx
jne 0x405915
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x405915
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 ebx, dword [ebp - 0x1c]
xor edi, edi
cmp edi, esi
jge 0x4058e8
mov eax, dword [ebx + edi*4]
push eax
call fcn.00413013
add esp, 4
inc edi
jmp 0x4058d5
push ebx
call fcn.00413013
mov ecx, dword [ebp - 0x18]
add esp, 4
push ecx
call fcn.00413013
add esp, 4
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 eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 0x28]
mov edi, dword [eax + ecx*4]
or ecx, 0xffffffff
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 - 0x20]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
inc eax
jmp 0x405863
mov eax, dword [ebp - 0x24]
test eax, eax
jle 0x405ab1
mov ecx, eax
lea edx, [ecx*4]
push edx
call fcn.00412fea
add esp, 4
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x4059b2
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x40598e
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, dword [ebp - 0x1c]
push eax
call fcn.00413013
add esp, 4
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 esi, esi
xor eax, eax
mov dword [ebp - 0x20], esi
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x28], eax
cmp eax, ecx
jge 0x405ab1
mov ecx, dword [ebx + 0x14]
cmp byte [ecx + eax], 0
je 0x405aab
cmp esi, dword [ebp - 0x24]
je 0x405ab1
mov edx, dword [ebx + 0x18]
test byte [edx + eax*4], 2
je 0x405aab
mov ecx, dword [ebx + 0x10]
mov edi, dword [ecx + eax*4]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00412fea
mov edx, dword [ebp - 0x18]
add esp, 4
test eax, eax
mov dword [edx + esi*4], eax
jne 0x405a71
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x405a71
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 esi, dword [ebp - 0x2c]
xor edi, edi
cmp edi, esi
jge 0x405a40
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + edi*4]
push eax
call fcn.00413013
add esp, 4
inc edi
jmp 0x405a2a
xor edi, edi
cmp edi, dword [ebp - 0x20]
jge 0x405a59
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + edi*4]
push eax
call fcn.00413013
add esp, 4
inc edi
jmp 0x405a42
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00413013
mov eax, dword [ebp - 0x18]
add esp, 4
push eax
call fcn.00413013
add esp, 4
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebp - 0x28]
xor eax, eax
mov edi, dword [ecx + edx*4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 0x20]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [ebp - 0x18]
mov edx, ecx
mov edi, dword [edi + eax*4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
inc eax
jmp 0x4059b9
mov eax, dword [ebx + 8]
test eax, eax
je 0x405b08
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x940]
push esi
push edi
push str._tSaving_preferred_PRELOGON_profile_list_with_actual__d_entries_for_user:__s
push eax
call fcn.00409203
add esp, 0x10
lea ecx, [ebp - 0x940]
push ecx
mov ecx, dword [ebx + 8]
call fcn.004037f0
mov edx, dword [ebp - 0x24]
push esi
push edx
lea eax, [ebp - 0x940]
push str._tSaving_preferred_PERSISTENT_profile_list_with_actual__d_entries_for_user:__s
push eax
call fcn.00409203
add esp, 0x10
lea ecx, [ebp - 0x940]
push ecx
mov ecx, dword [ebx + 8]
call fcn.004037f0
test edi, edi
jle 0x405ba4
mov al, byte [ebx + 0x2c]
test al, al
jne 0x405ba4
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x34]
push 4
push 0
push edi
push edx
push eax
mov ecx, ebx
call fcn.00404e00
cmp eax, 0x43297
mov dword [ebp - 0x30], eax
jne 0x405b43
mov byte [ebp - 0x11], 1
mov byte [ebx + 0x2c], 1
jmp 0x405ba8
mov ecx, dword [ebx + 8]
mov byte [ebp - 0x11], 0
test ecx, ecx
je 0x405ba8
lea edi, [eax + 0x7ffbcd63]
cmp edi, 0x15
ja case.0x405b61.2147208543
xor edx, edx
mov dl, byte [edi + 0x405e68]
jmp dword [edx*4 + 0x405e54]
push str._t_FAILED__Unable_to_load_the_PfMgrApi.dll_dynamic_library.
call fcn.004037f0
jmp 0x405ba8
push str._t_FAILED__Unable_to_load_function_SavePreferredProfileList___from_PfMgrApi.dll_dynamic_library.
call fcn.004037f0
jmp 0x405ba8
push str._t_FAILED__The_data_in_one_or_more_parameters_are_invalid.
call fcn.004037f0
jmp 0x405ba8
push str._t_FAILED__The_profile_database_is_locked_by_another_user.
call fcn.004037f0
jmp 0x405ba8
push str._t_FAILED__Unknown_fatal_error_occured_while_saving_the_preferred_profile_list.
call fcn.004037f0
jmp 0x405ba8
mov byte [ebp - 0x11], 1
mov eax, dword [ebp - 0x24]
test eax, eax
jle 0x405c97
mov cl, byte [ebx + 0x2d]
test cl, cl
jne 0x405c97
mov ecx, dword [ebp - 0x34]
push 2
push 0
push eax
mov eax, dword [ebp - 0x18]
push eax
push ecx
mov ecx, ebx
call fcn.00404e00
cmp eax, 0x43297
mov dword [ebp - 0x30], eax
jne 0x405be9
mov byte [ebp - 0x12], 1
mov byte [ebx + 0x2d], 1
jmp 0x405ca0
mov ecx, dword [ebx + 8]
mov byte [ebp - 0x12], 0
test ecx, ecx
je 0x405ca0
mov edx, dword [ebp - 0x30]
lea esi, [edx + 0x7ffbcd63]
cmp esi, 0x15
ja case.0x405c0e.2147208543
xor eax, eax
mov al, byte [esi + 0x405e94]
jmp dword [eax*4 + 0x405e80]
push str._t_FAILED__Unable_to_load_the_PfMgrApi.dll_dynamic_library.
call fcn.004037f0
jmp 0x405ca0
push str._t_FAILED__Unable_to_load_function_SavePreferredProfileList___from_PfMgrApi.dll_dynamic_library.
call fcn.004037f0
jmp 0x405ca0
push str._t_FAILED__The_data_in_one_or_more_parameters_are_invalid.
call fcn.004037f0
jmp 0x405ca0
push str._t_FAILED__The_profile_database_is_locked_by_another_user.
call fcn.004037f0
jmp 0x405ca0
push str._t_FAILED__Unknown_fatal_error_occured_while_saving_the_preferred_profile_list.
call fcn.004037f0
jmp 0x405ca0
mov byte [ebp - 0x12], 1
jmp 0x405ca0
mov al, byte [ebp - 0x11]
mov dword [ebp - 4], 0
test al, al
je 0x405d7c
mov al, byte [ebp - 0x12]
test al, al
je 0x405d7c
mov ecx, dword [ebp + 8]
push 0x104
lea edx, [ebp - 0x140]
push ecx
push edx
call fcn.00409255
mov eax, dword [str.PreferredProfile.lst]
add esp, 0xc
lea ecx, [ebp - 0x140]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea edx, [ebp - 0x140]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
mov eax, dword [ebx + 8]
jne 0x405d3f
test eax, eax
je 0x405d2a
lea eax, [ebp - 0x140]
lea ecx, [ebp - 0x940]
push eax
push str._tPreferred_list_file_named__s_does_not_exist.
push ecx
call fcn.00409203
mov ecx, dword [ebx + 8]
add esp, 0xc
lea edx, [ebp - 0x940]
push edx
call fcn.004037f0
lea eax, [ebp - 0x3c]
push 0x41b078
push eax
mov dword [ebp - 0x3c], 0xffffffff
call fcn.00409c14
test eax, eax
je 0x405d6d
lea ecx, [ebp - 0x140]
lea edx, [ebp - 0x940]
push ecx
push str._tDeleting_preferred_list_file_named__s
push edx
call fcn.00409203
mov ecx, dword [ebx + 8]
add esp, 0xc
lea eax, [ebp - 0x940]
push eax
call fcn.004037f0
lea ecx, [ebp - 0x140]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x405dad
mov eax, dword [ebx + 8]
test eax, eax
je 0x405dad
lea edx, [ebp - 0x140]
lea eax, [ebp - 0x940]
push edx
push str._tNot_deleting_preferred_list_file_named__s_because_it_is_NOT_converted.
push eax
call fcn.00409203
add esp, 0xc
lea ecx, [ebp - 0x940]
push ecx
mov ecx, dword [ebx + 8]
call fcn.004037f0
mov edx, dword [ebp - 0x34]
mov ecx, ebx
push edx
call fcn.00404d00
mov eax, dword [ebp - 0x2c]
test eax, eax
jle 0x405dd9
mov esi, dword [ebp - 0x1c]
mov edi, eax
mov eax, dword [esi]
test eax, eax
je 0x405dd3
push eax
call fcn.00413013
add esp, 4
add esi, 4
dec edi
jne 0x405dc4
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x405de9
push eax
call fcn.00413013
add esp, 4
mov edi, dword [ebp - 0x24]
test edi, edi
jle 0x405e08
mov esi, dword [ebp - 0x18]
mov eax, dword [esi]
test eax, eax
je 0x405e02
push eax
call fcn.00413013
add esp, 4
add esi, 4
dec edi
jne 0x405df3
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x405e18
push eax
call fcn.00413013
add esp, 4
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x405e3d
push 1
call fcn.00403a90
mov ecx, dword [ebx + 8]
push str._t_CProfileConverter::ConvertCommonPreferredProfileList___completed_
call fcn.004037f0
mov ecx, dword [ebx + 8]
push 1
call fcn.00403a90
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x30]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8