Function at 0x407300
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x240
mov dword [ebp - 0x234], eax
test byte [0x40d014], 8
jne 0x4077b8
mov dword [esp + 8], 0
xor edi, edi
lea eax, [ebp - 0x214]
mov dword [esp + 4], 0x40fe1c
mov dword [esp + 0xc], eax
mov eax, dword [0x41b22c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
lea eax, [ebp - 0x214]
sub esp, 0x10
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__wfopen]
mov dword [esp + 4], 0x40fc02
mov dword [ebp - 0x230], eax
call eax
mov ebx, eax
test eax, eax
je 0x40764e
mov dword [esp + 4], str.__DOCTYPE_Menu_PUBLIC_____freedesktop__DTD_Menu_1.0__EN__n
mov dword [esp], eax
call fcn.004028a0
mov dword [esp + 4], str._http:__www.freedesktop.org_standards_menu_spec_menu_1.0.dtd___n
mov dword [esp], ebx
call fcn.004028a0
mov dword [esp + 4], str._Menu__n
mov dword [esp], ebx
call fcn.004028a0
mov dword [esp + 4], str.___Name_Applications__Name__n
mov dword [esp], ebx
call fcn.004028a0
mov dword [esp + 4], esi
mov dword [esp], str.wine_s.desktop
call fcn.00403040
mov ecx, eax
mov dword [ebp - 0x218], eax
movzx eax, word [eax]
test ax, ax
je 0x407948
lea esi, [ecx + 2]
mov dword [ebp - 0x224], ecx
mov ecx, dword [sym.imp.ucrtbase.dll_fclose]
mov dword [ebp - 0x22c], ecx
mov ecx, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x220], ecx
mov ecx, esi
mov esi, edi
mov edi, ecx
jmp 0x407419
movzx eax, word [edi]
lea ecx, [edi + 2]
test ax, ax
je 0x407501
mov edi, ecx
cmp ax, 0x5c
jne 0x407408
test esi, esi
je 0x407660
xor edx, edx
mov word [edi - 2], dx
mov dword [esp + 4], str.___Menu__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, dword [ebp - 0x218]
call fcn.00406d20
mov dword [esp + 8], 0x40fff2
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Name__s_s__Name__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, dword [ebp - 0x218]
call fcn.00406d20
mov dword [esp + 8], 0x40fff2
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Directory__s_s.directory__Directory__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, 0x40fdf6
mov ecx, dword [ebp - 0x218]
mov dword [esp + 8], eax
mov dword [esp + 0xc], ecx
mov eax, dword [0x41b228]
mov dword [esp], str._sdesktop_directories_s_s.directory
mov dword [esp + 4], eax
call fcn.00403040
mov dword [ebp - 0x21c], eax
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x4076e8
mov eax, dword [ebp - 0x21c]
add esi, 1
mov dword [esp], eax
mov eax, dword [ebp - 0x220]
call eax
lea ecx, [edi + 2]
mov eax, 0x2d
mov dword [ebp - 0x224], edi
mov word [edi - 2], ax
movzx eax, word [ecx - 2]
test ax, ax
jne 0x407417
xor ecx, ecx
mov eax, edi
mov edi, esi
mov word [eax], cx
mov dword [esp + 4], str._____Include__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, dword [ebp - 0x218]
call fcn.00406d20
mov dword [esp + 4], str._______Filename__s__Filename__n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.004028a0
mov dword [esp + 4], str.______Include__n
mov dword [esp], ebx
call fcn.004028a0
test esi, esi
jle 0x407567
xor esi, esi
nop
mov dword [esp + 4], str.____Menu__n
add esi, 1
mov dword [esp], ebx
call fcn.004028a0
cmp edi, esi
jne 0x407550
mov dword [esp + 4], str.__Menu__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, dword [ebp - 0x218]
mov dword [esp + 8], eax
mov eax, dword [0x41b22c]
mov dword [esp], str._s_s
mov dword [esp + 4], eax
call fcn.00403040
cmp word [eax], 0
mov esi, eax
je 0x4079a8
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x4075a8
sub eax, esi
sar eax, 1
mov edx, str..desktop
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4075c0
sub edx, str..desktop
sar edx, 1
sub eax, edx
lea ecx, [esi + eax*2]
xor eax, eax
lea esi, [esi]
nop
movzx edx, word [eax + str..menu]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x4075e0
mov dword [esp], ebx
mov eax, dword [ebp - 0x22c]
call eax
lea eax, [ebp - 0x214]
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MoveFileExW]
sub esp, 0xc
mov edi, eax
test eax, eax
jne 0x4076d0
lea eax, [ebp - 0x214]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov eax, dword [ebp - 0x218]
mov dword [esp], eax
mov ebx, dword [ebp - 0x220]
call ebx
mov dword [esp], esi
call ebx
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
mov word [edi - 2], ax
mov dword [esp + 4], str.___Menu__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, dword [ebp - 0x218]
call fcn.00406d20
mov dword [esp + 8], str.wine_
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Name__s_s__Name__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, dword [ebp - 0x218]
call fcn.00406d20
mov dword [esp + 8], str.wine_
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Directory__s_s.directory__Directory__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, 0x40fdf8
jmp 0x407490
mov edx, dword [ebp - 0x234]
mov eax, esi
call fcn.00402f80
jmp 0x407638
test byte [0x40d014], 8
jne 0x407870
mov dword [esp + 4], 0x40fc02
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
mov eax, dword [ebp - 0x230]
call eax
mov dword [ebp - 0x228], eax
test eax, eax
je 0x4074ce
mov dword [esp + 4], str._Desktop_Entry__n
mov dword [esp], eax
call fcn.004028a0
mov dword [esp + 4], str.TypeDirectory_n
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call fcn.004028a0
mov dword [esp + 4], str.wine
mov edx, dword [ebp - 0x224]
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x407820
mov eax, dword [ebp - 0x224]
mov dword [esp], eax
call fcn.004062f0
mov dword [esp + 4], str.Name_s_n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call fcn.004028a0
mov dword [esp + 4], str.Iconfolder_n
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call fcn.004028a0
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
mov eax, dword [ebp - 0x22c]
call eax
jmp 0x4074ce
test edx, edx
je 0x4079af
mov eax, edx
shr eax, 0x10
test eax, eax
je 0x407858
mov dword [esp], edx
mov dword [esp + 4], 0xffffffff
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x4077f3
mov eax, esi
call fcn.00402980
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s__n
mov dword [esp + 8], str.write_menu_file
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x407321
mov dword [esp + 4], str.NameWine_n
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call fcn.004028a0
mov dword [esp + 4], str.Iconwine_n
mov eax, dword [ebp - 0x228]
mov dword [esp], eax
call fcn.004028a0
jmp 0x40779f
mov dword [esp + 4], edx
mov dword [esp], str._04x
call fcn.00402b40
jmp 0x4077f3
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x4079ff
shr eax, 0x10
test eax, eax
je 0x4079d4
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x21c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x228], str._invalid_
sub esp, 8
test eax, eax
jne 0x4078c2
mov eax, dword [ebp - 0x21c]
call fcn.00402980
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x4079f5
shr eax, 0x10
test eax, eax
je 0x4079b9
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x224]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x40790b
mov eax, dword [ebp - 0x224]
call fcn.00402980
mov edx, dword [ebp - 0x228]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s__s__n
mov dword [esp + 8], 0x410e64
mov dword [esp + 4], 0x40d014
mov dword [esp + 0x14], edx
mov dword [esp], 3
call fcn.00402c50
jmp 0x4076f5
mov dword [esp + 4], str._____Include__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, dword [ebp - 0x218]
call fcn.00406d20
mov dword [esp + 4], str._______Filename__s__Filename__n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.004028a0
mov dword [esp + 4], str.______Include__n
mov dword [esp], ebx
call fcn.004028a0
mov eax, dword [sym.imp.ucrtbase.dll_fclose]
mov dword [ebp - 0x22c], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x220], eax
jmp 0x407567
xor eax, eax
jmp 0x4075b5
mov eax, str._null_
jmp 0x4077f3
mov eax, dword [ebp - 0x224]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
jmp 0x40790b
mov eax, dword [ebp - 0x21c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
mov dword [ebp - 0x228], eax
jmp 0x4078c2
mov eax, str._null_
jmp 0x40790b
mov dword [ebp - 0x228], str._null_
jmp 0x4078c2