Function at 0x40ea20
Capabilities:
Check if file exists
Delete file
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x48f76b
mov eax, dword fs:[0]
push eax
mov eax, 0x28b8
call fcn.00477c10
mov eax, dword [0x4b0650]
xor eax, esp
mov dword [esp + 0x28b4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b0650]
xor eax, esp
push eax
lea eax, [esp + 0x28cc]
mov dword fs:[0], eax
push 0x409
push 0x823
lea eax, [esp + 0x1888]
push eax
mov esi, ecx
mov ecx, dword [esi + 4]
push 0x6a
push ecx
call fcn.0040e380
lea eax, [esi + 0x2f4c]
add esp, 0x14
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
lea edi, [esi + 0x2934]
jne 0x40eee6
mov edx, dword [esi + 4]
push 0x104
push edi
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
xor ebx, ebx
push 0x206
lea eax, [esp + 0x1476]
push ebx
push eax
mov word [esp + 0x147c], bx
call fcn.00477c40
add esp, 0xc
push ebx
push 5
lea ecx, [esp + 0x1478]
push ecx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40eb09
xor eax, eax
nop
movzx ecx, word [esp + eax + 0x1470]
mov word [eax + 0x4b1c78], cx
add eax, 2
cmp cx, bx
jne 0x40eaf0
jmp 0x40eb21
mov edx, 0x4b1c78
mov eax, edi
sub edx, edi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x40eb12
xor eax, eax
mov ecx, esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
call fcn.00406760
push 0x400
push 0x104
lea edx, [esp + 0x1680]
push edx
mov dword [esp + 0x28], eax
mov eax, dword [esi + 4]
push 0x1f8
push eax
mov dword [esp + 0x40], 0x40
call fcn.0040e380
add esp, 0x14
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x1678]
push edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], 0x40e9d0
call dword [sym.imp.SHELL32.dll_SHBrowseForFolderW]
push str.Show_SHBrowse_Dlg_for_traget_folder
mov edi, eax
call fcn.00401030
add esp, 4
cmp edi, ebx
je 0x40ee11
lea ebp, [esi + 0x2934]
push ebp
push edi
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push 0x206
lea eax, [esp + 0x126e]
push ebx
push eax
mov word [esp + 0x1274], bx
call fcn.00477c40
push ebp
push str.User_selected_a_target_folder_:__s
lea ecx, [esp + 0x127c]
push 0x104
push ecx
call fcn.00477bdc
lea edx, [esp + 0x1284]
push edx
call fcn.00401030
add esp, 0x20
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], ebx
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x40ec2b
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x14]
push edi
push eax
call edx
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
lea edi, [esp + 0xe58]
lea eax, [esi + 0x2934]
xor ebp, ebp
sub edi, eax
lea esp, [esp]
add ebp, 1
lea eax, [esi + 0x2934]
lea esp, [esp]
movzx ecx, word [eax]
mov word [edi + eax], cx
add eax, 2
cmp cx, bx
jne 0x40ec50
push ebp
lea eax, [esp + 0x1064]
push str._d.exe
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [esp + 0x1060]
push ecx
lea edx, [esp + 0xe5c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0xe58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40ec40
lea ecx, [esp + 0xe58]
push 0x493e30
push ecx
call fcn.00477f07
add esp, 8
cmp eax, ebx
jne 0x40edf8
lea edx, [esp + 0xe58]
push edx
push str._PrepareSavingPath___s__wfopen_failed
call fcn.0040de80
mov ecx, dword [esi + 4]
push 0x400
push 0x32
lea eax, [esp + 0xe04]
push eax
push 0x193
push ecx
call fcn.0040e380
mov eax, dword [esi + 4]
push 0x400
push 0x32
lea edx, [esp + 0xdb4]
push edx
push 0x196
push eax
call fcn.0040e380
mov edx, dword [esi + 4]
push 0x400
push 0x104
lea ecx, [esp + 0x1098]
push ecx
push 0x1f9
push edx
call fcn.0040e380
add esp, 0x44
lea eax, [esp + 0x1060]
push ebx
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0xdf8]
mov dword [esp + 0x44], ecx
push eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0xd9c]
push 4
lea ecx, [esp + 0x6c]
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], 0x492aa0
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
call fcn.00407b90
lea ecx, [esp + 0x5c]
mov dword [esp + 0x28d4], ebx
call fcn.00407530
cmp eax, 0x322
je 0x40edb5
push str.User_click_CANCEL_in_NO_PERMISSION_dlg
call fcn.00401030
add esp, 4
lea ecx, [esp + 0x5c]
mov dword [esp + 0x28d4], 0xffffffff
call fcn.004072f0
jmp 0x40eb21
push str.User_click_OK_in_NO_PERMISSION_dlg
call fcn.00401030
mov eax, 0x4b1c78
lea edx, [esi + 0x2934]
add esp, 4
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x40edd0
lea ecx, [esp + 0x5c]
mov dword [esp + 0x28d4], 0xffffffff
call fcn.004072f0
jmp 0x40ee71
push eax
call fcn.00477fdc
add esp, 4
lea edx, [esp + 0xe58]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40ee71
push ebx
push 5
lea edi, [esi + 0x2934]
push edi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40eed2
mov ecx, 0x492aa0
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40ee57
cmp dx, bx
je 0x40ee53
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40ee57
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40ee31
xor eax, eax
jmp 0x40ee5c
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40eed2
push str.User_cancel_browse_folder__Store_to_CSIDL_PERSONAL_path_
call fcn.00401030
add esp, 4
lea eax, [esi + 0x8a8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea edi, [esi + 0x2934]
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ebx, dword [esp + 0x18]
push ebx
add esi, 0x3154
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push str.TokenID
push 0x495298
call esi
push ebx
lea ecx, [esp + 0x1884]
push ecx
push 0x495428
push 0x495298
call esi
push ebx
push edi
push str.SavePath
push 0x495298
call esi
jmp 0x40ef5b
push str._ERROR_PrepareSavingPath____User_cancel_browse_folder__failed_to_get_CSIDL_PERSONAL_path.
call fcn.00401030
add esp, 4
xor eax, eax
jmp 0x40ef60
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
lea ebp, [esi + 0x8a8]
push ebp
call ebx
push edi
mov esi, eax
call ebx
xor ebx, ebx
lea esp, [esp]
mov cx, word [eax]
cmp cx, word [esi]
jne 0x40ef26
cmp cx, bx
je 0x40ef22
mov cx, word [eax + 2]
cmp cx, word [esi + 2]
jne 0x40ef26
add eax, 4
add esi, 4
cmp cx, bx
jne 0x40ef00
xor eax, eax
jmp 0x40ef2b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
je 0x40ef5b
push edi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [esp + 0x18]
push edx
push edi
push str.SavePath
push 0x495298
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov eax, 1
mov ecx, dword [esp + 0x28cc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x28b4]
xor ecx, esp
call fcn.00477bf8
add esp, 0x28c4
ret