Function at 0x403c20
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
push ebx
mov ebx, edx
sub esp, 0x380
mov dword [ebp - 0x360], eax
lea eax, [ebp - 0x214]
mov dword [ebp - 0x354], eax
test byte [section..data], 8
jne 0x404110
mov esi, dword [ebp - 0x354]
mov eax, dword [0x41e20c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x411434
mov dword [esp + 0xc], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
mov eax, dword [sym.imp.ucrtbase.dll__wfopen]
sub esp, 0x10
mov dword [esp + 4], 0x411260
mov dword [esp], esi
mov dword [ebp - 0x35c], eax
call eax
xor ecx, ecx
mov edi, eax
test eax, eax
je 0x403f9e
mov dword [esp + 4], str.__DOCTYPE_Menu_PUBLIC_____freedesktop__DTD_Menu_1.0__EN__n
mov dword [esp], eax
call fcn.004011f0
mov dword [esp + 4], str._http:__www.freedesktop.org_standards_menu_spec_menu_1.0.dtd___n
mov dword [esp], edi
call fcn.004011f0
mov dword [esp + 4], str._Menu__n
mov dword [esp], edi
call fcn.004011f0
mov dword [esp + 4], str.___Name_Applications__Name__n
mov dword [esp], edi
call fcn.004011f0
mov dword [esp + 4], ebx
mov dword [esp], str.wine_s.desktop
call fcn.00401930
mov esi, eax
movzx eax, word [eax]
test ax, ax
je 0x404648
mov ecx, dword [sym.imp.ucrtbase.dll_fclose]
mov dword [ebp - 0x350], esi
lea ebx, [esi + 2]
mov dword [ebp - 0x344], 0
mov dword [ebp - 0x358], ecx
mov ecx, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x34c], ecx
jmp 0x403d41
mov edx, ebx
movzx eax, word [ebx]
add ebx, 2
test ax, ax
je 0x403e26
cmp ax, 0x5c
jne 0x403d30
mov eax, dword [ebp - 0x344]
test eax, eax
je 0x403fb0
xor edx, edx
mov word [ebx - 2], dx
mov dword [esp + 4], str.___Menu__n
mov dword [esp], edi
call fcn.004011f0
mov eax, esi
call fcn.00402070
mov dword [esp + 8], 0x41160a
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Name__s_s__Name__n
mov dword [esp], edi
call fcn.004011f0
mov eax, esi
call fcn.00402070
mov dword [esp + 8], 0x41160a
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Directory__s_s.directory__Directory__n
mov dword [esp], edi
call fcn.004011f0
mov eax, 0x41140e
mov dword [esp + 8], eax
mov eax, dword [0x41e208]
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov dword [esp], str._sdesktop_directories_s_s.directory
call fcn.00401930
mov dword [ebp - 0x348], eax
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x404040
mov eax, dword [ebp - 0x348]
mov dword [esp], eax
mov eax, dword [ebp - 0x34c]
call eax
mov eax, 0x2d
mov dword [ebp - 0x350], ebx
mov edx, ebx
mov word [ebx - 2], ax
movzx eax, word [ebx]
add ebx, 2
add dword [ebp - 0x344], 1
test ax, ax
jne 0x403d41
xor ecx, ecx
mov word [edx], cx
mov dword [esp + 4], str._____Include__n
mov dword [esp], edi
call fcn.004011f0
mov eax, esi
call fcn.00402070
mov dword [esp + 4], str._______Filename__s__Filename__n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.004011f0
mov dword [esp + 4], str.______Include__n
mov dword [esp], edi
call fcn.004011f0
mov eax, dword [ebp - 0x344]
test eax, eax
je 0x403e9d
xor ebx, ebx
mov dword [ebp - 0x344], esi
mov esi, ebx
mov ebx, eax
lea esi, [esi]
mov dword [esp + 4], str.____Menu__n
add esi, 1
mov dword [esp], edi
call fcn.004011f0
cmp ebx, esi
jne 0x403e80
mov esi, dword [ebp - 0x344]
mov dword [esp + 4], str.__Menu__n
mov dword [esp], edi
call fcn.004011f0
mov eax, dword [0x41e20c]
mov dword [esp + 8], esi
mov dword [esp], str._s_s
mov dword [esp + 4], eax
call fcn.00401930
cmp word [eax], 0
mov ebx, eax
je 0x4046a0
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x403ed8
sub eax, ebx
sar eax, 1
mov ecx, 0x64
mov edx, str..desktop
jmp 0x403efc
movzx ecx, word [edx + 2]
add edx, 2
test cx, cx
jne 0x403ef8
sub edx, str..desktop
sar edx, 1
sub eax, edx
mov edx, 0x2e
lea ecx, [ebx + eax*2]
xor eax, eax
jmp 0x403f27
movzx edx, word [eax + str..menu]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x403f20
mov dword [esp], edi
mov eax, dword [ebp - 0x358]
call eax
mov eax, dword [ebp - 0x354]
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MoveFileExW]
mov dword [ebp - 0x344], eax
sub esp, 0xc
test eax, eax
jne 0x404020
mov eax, dword [ebp - 0x354]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x344]
sub esp, 4
mov dword [ebp - 0x344], ecx
mov edi, dword [ebp - 0x34c]
mov dword [esp], esi
call edi
mov dword [esp], ebx
call edi
mov ecx, dword [ebp - 0x344]
lea esp, [ebp - 0xc]
mov eax, ecx
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
mov word [ebx - 2], ax
mov dword [esp + 4], str.___Menu__n
mov dword [esp], edi
call fcn.004011f0
mov eax, esi
call fcn.00402070
mov dword [esp + 8], str.wine_
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Name__s_s__Name__n
mov dword [esp], edi
call fcn.004011f0
mov eax, esi
call fcn.00402070
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], edi
call fcn.004011f0
mov eax, 0x411410
jmp 0x403db6
mov edx, dword [ebp - 0x360]
mov eax, ebx
call fcn.00401870
mov ecx, dword [ebp - 0x344]
jmp 0x403f82
test byte [section..data], 8
jne 0x404320
mov eax, dword [ebp - 0x348]
mov dword [esp + 4], 0x411260
mov dword [esp], eax
mov eax, dword [ebp - 0x35c]
call eax
test eax, eax
je 0x403dee
mov dword [esp + 4], str._Desktop_Entry__n
mov dword [esp], eax
mov dword [ebp - 0x364], eax
call fcn.004011f0
mov eax, dword [ebp - 0x364]
mov dword [esp + 4], str.TypeDirectory_n
mov dword [esp], eax
call fcn.004011f0
mov ecx, dword [ebp - 0x350]
mov dword [esp + 4], str.wine
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x404200
mov eax, dword [ebp - 0x350]
call fcn.00401d70
mov dword [esp + 4], str.Name_s_n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x364]
mov dword [esp], eax
call fcn.004011f0
mov eax, dword [ebp - 0x364]
mov dword [esp + 4], str.Iconfolder_n
mov dword [esp], eax
call fcn.004011f0
mov eax, dword [ebp - 0x364]
mov dword [esp], eax
mov eax, dword [ebp - 0x358]
call eax
jmp 0x403dee
test edx, edx
je 0x4046a7
mov eax, edx
shr eax, 0x10
je 0x404238
mov dword [esp + 4], 0xffffffff
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x40424b
movzx eax, word [ebx]
test ax, ax
je 0x4047f9
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x404158
mov ecx, 0x224c
mov dword [ebp - 0x344], ebx
mov esi, ebx
mov word [ebp - 0x214], cx
lea ecx, [ebp - 0x212]
jmp 0x4041ce
cmp ax, 9
je 0x404308
cmp ax, 0xa
jne 0x40429e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea edi, [edx - 1]
test edx, edx
jle 0x4045f8
lea eax, [ebp - 0xf2]
cmp ecx, eax
ja 0x4045f8
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x404280
jbe 0x404188
cmp ax, 0x22
je 0x4042f0
cmp ax, 0x5c
jne 0x404291
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x4041b0
mov eax, dword [ebp - 0x364]
mov dword [esp + 4], str.NameWine_n
mov dword [esp], eax
call fcn.004011f0
mov eax, dword [ebp - 0x364]
mov dword [esp + 4], str.Iconwine_n
mov dword [esp], eax
call fcn.004011f0
jmp 0x4040f4
movzx eax, dx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s__n
mov dword [esp + 8], str.write_menu_file
mov dword [esp + 4], 0x40f000
mov dword [esp], 3
call fcn.00401580
jmp 0x403c4d
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4041b0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x404638
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdef]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x4041b0
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x4041b0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4041b0
mov eax, dword [ebp - 0x348]
test eax, eax
je 0x40486e
shr eax, 0x10
je 0x404838
mov ecx, dword [ebp - 0x348]
mov dword [esp + 4], 0xffffffff
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x368], str._invalid_
sub esp, 8
test eax, eax
jne 0x404470
mov ecx, dword [ebp - 0x348]
cmp word [ecx], 0
je 0x40487d
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [ecx + edx*2 + 2], 0
jne 0x404378
mov eax, 0x224c
mov dword [ebp - 0x36c], esi
lea ecx, [ebp - 0x33e]
mov word [ebp - 0x340], ax
mov eax, dword [ebp - 0x348]
mov dword [ebp - 0x368], edi
mov dword [ebp - 0x364], eax
lea eax, [ebp - 0x21e]
mov dword [ebp - 0x370], ebx
mov esi, eax
jmp 0x4043ed
cmp ax, 9
je 0x4047e8
cmp ax, 0xa
jne 0x40474e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [edx - 1]
cmp ecx, esi
ja 0x40442c
test edx, edx
jle 0x40442c
mov edx, eax
add dword [ebp - 0x364], 2
mov eax, dword [ebp - 0x364]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x4047b8
jbe 0x4043c0
cmp ax, 0x22
je 0x4047a0
cmp ax, 0x5c
jne 0x404741
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x4043e0
mov edi, dword [ebp - 0x368]
mov esi, dword [ebp - 0x36c]
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x370]
test eax, eax
jle 0x404896
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x340]
mov dword [esp], eax
call fcn.0040e1f0
mov dword [ebp - 0x368], eax
mov eax, dword [ebp - 0x350]
shr eax, 0x10
je 0x40481a
mov eax, dword [ebp - 0x350]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x4045bc
mov ecx, dword [ebp - 0x350]
cmp word [ecx], 0
je 0x40489e
lea esi, [esi]
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [ecx + edx*2 + 2], 0
jne 0x4044c0
mov eax, 0x224c
mov dword [ebp - 0x370], esi
lea ecx, [ebp - 0x33e]
mov word [ebp - 0x340], ax
mov eax, dword [ebp - 0x350]
mov dword [ebp - 0x36c], edi
mov dword [ebp - 0x364], eax
lea eax, [ebp - 0x21e]
mov dword [ebp - 0x374], ebx
mov esi, eax
jmp 0x40453d
cmp ax, 9
je 0x4047d0
cmp ax, 0xa
jne 0x4046d6
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [edx - 1]
cmp ecx, esi
ja 0x40457c
test edx, edx
jle 0x40457c
mov edx, eax
add dword [ebp - 0x364], 2
mov eax, dword [ebp - 0x364]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x4046b8
jbe 0x404510
cmp ax, 0x22
je 0x404730
cmp ax, 0x5c
jne 0x4046c9
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x404530
mov edi, dword [ebp - 0x36c]
mov esi, dword [ebp - 0x370]
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x374]
test eax, eax
jle 0x4048b7
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x340]
mov dword [esp], eax
call fcn.0040e1f0
mov edx, eax
mov eax, dword [ebp - 0x368]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.__s__s__n
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.write_directory_entry
mov dword [esp + 4], 0x40f000
mov dword [esp], 3
call fcn.00401580
jmp 0x40404d
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x344]
test edi, edi
jle 0x404812
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x214]
mov dword [esp], eax
mov dword [ebp - 0x354], eax
call fcn.0040e1f0
jmp 0x40424b
mov byte [ecx], al
add ecx, 1
jmp 0x4041b0
mov dword [esp + 4], str._____Include__n
mov dword [esp], edi
call fcn.004011f0
mov eax, esi
call fcn.00402070
mov dword [esp + 4], str._______Filename__s__Filename__n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.004011f0
mov dword [esp + 4], str.______Include__n
mov dword [esp], edi
call fcn.004011f0
mov eax, dword [sym.imp.ucrtbase.dll_fclose]
mov dword [ebp - 0x358], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x34c], eax
jmp 0x403e9d
xor eax, eax
jmp 0x403ee5
mov eax, str._null_
jmp 0x40424b
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x404530
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x404864
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdef]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x404530
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x404530
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40485a
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdef]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdef]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x4043e0
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x4043e0
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4043e0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x404530
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4043e0
mov eax, 0x224c
mov byte [ebp - 0x212], 0x22
lea ecx, [ebp - 0x212]
mov word [ebp - 0x214], ax
lea eax, [ecx + 1]
jmp 0x404619
movzx eax, word [ebp - 0x350]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov edx, eax
jmp 0x4045bc
movzx eax, word [ebp - 0x348]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [ebp - 0x368], eax
jmp 0x404470
mov byte [ecx], al
add ecx, 1
jmp 0x4043e0
mov byte [ecx], al
add ecx, 1
jmp 0x404530
mov dword [ebp - 0x368], str._null_
jmp 0x404470
mov eax, 0x224c
mov byte [ebp - 0x33e], 0x22
lea ecx, [ebp - 0x33e]
mov word [ebp - 0x340], ax
lea eax, [ecx + 1]
jmp 0x404459
mov eax, 0x224c
mov byte [ebp - 0x33e], 0x22
lea ecx, [ebp - 0x33e]
mov word [ebp - 0x340], ax
lea eax, [ecx + 1]
jmp 0x4045a9