Function at 0x403bc0
Capabilities:
Check for peb beingdebugged flag
Check if file exists
Delete file
Get common file path
Get file attributes
Get number of processors
Get process heap flags
Move file

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x3ac
mov dword [ebp - 0x378], eax
lea eax, [ebp - 0x220]
mov dword [ebp - 0x36c], eax
test byte [section..data], 8
jne 0x404100
mov esi, dword [ebp - 0x36c]
mov eax, dword [0x41920c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40f434
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], 0x40f368
mov dword [esp], esi
mov dword [ebp - 0x374], eax
call eax
xor ecx, ecx
mov edi, eax
test eax, eax
je 0x403f8f
mov dword [esp + 4], str.__DOCTYPE_Menu_PUBLIC_____freedesktop__DTD_Menu_1.0__EN__n
mov dword [esp], eax
call fcn.00401190
mov dword [esp + 4], str._http:__www.freedesktop.org_standards_menu_spec_menu_1.0.dtd___n
mov dword [esp], edi
call fcn.00401190
mov dword [esp + 4], str._Menu__n
mov dword [esp], edi
call fcn.00401190
mov dword [esp + 4], str.___Name_Applications__Name__n
mov dword [esp], edi
call fcn.00401190
mov dword [esp + 4], ebx
mov dword [esp], str.wine_s.desktop
call fcn.00401ad0
mov esi, eax
movzx eax, word [eax]
test ax, ax
je 0x404638
mov ecx, dword [sym.imp.ucrtbase.dll_fclose]
mov dword [ebp - 0x368], esi
lea ebx, [esi + 2]
mov dword [ebp - 0x35c], 0
mov dword [ebp - 0x370], ecx
mov ecx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x364], ecx
jmp 0x403ce1
mov edx, ebx
movzx eax, word [ebx]
add ebx, 2
test ax, ax
je 0x403de1
cmp ax, 0x5c
jne 0x403cd0
mov eax, dword [ebp - 0x35c]
test eax, eax
je 0x403fa0
xor edx, edx
mov word [ebx - 2], dx
mov dword [esp + 4], str.___Menu__n
mov dword [esp], edi
call fcn.00401190
mov eax, esi
call fcn.00401d20
mov dword [esp + 8], 0x40f60a
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Name__s_s__Name__n
mov dword [esp], edi
call fcn.00401190
mov eax, esi
call fcn.00401d20
mov dword [esp + 8], 0x40f60a
mov dword [esp + 0xc], eax
mov dword [esp + 4], str._____Directory__s_s.directory__Directory__n
mov dword [esp], edi
call fcn.00401190
mov eax, 0x40f40e
mov dword [esp + 8], eax
mov eax, dword [0x419208]
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov dword [esp], str._sdesktop_directories_s_s.directory
call fcn.00401ad0
mov dword [ebp - 0x360], eax
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
je 0x404030
mov ecx, dword [ebp - 0x360]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x364]
call eax
mov eax, 0x2d
mov dword [ebp - 0x368], ebx
mov edx, ebx
mov word [ebx - 2], ax
movzx eax, word [ebx]
add ebx, 2
sub esp, 0xc
add dword [ebp - 0x35c], 1
test ax, ax
jne 0x403ce1
xor ecx, ecx
mov word [edx], cx
mov dword [esp + 4], str._____Include__n
mov dword [esp], edi
call fcn.00401190
mov eax, esi
call fcn.00401d20
mov dword [esp + 4], str._______Filename__s__Filename__n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00401190
mov dword [esp + 4], str.______Include__n
mov dword [esp], edi
call fcn.00401190
mov eax, dword [ebp - 0x35c]
test eax, eax
je 0x403e5d
xor ebx, ebx
mov dword [ebp - 0x35c], esi
mov esi, ebx
mov ebx, eax
lea esi, [esi]
nop
mov dword [esp + 4], str.____Menu__n
add esi, 1
mov dword [esp], edi
call fcn.00401190
cmp ebx, esi
jne 0x403e40
mov esi, dword [ebp - 0x35c]
mov dword [esp + 4], str.__Menu__n
mov dword [esp], edi
call fcn.00401190
mov eax, dword [0x41920c]
mov dword [esp + 8], esi
mov dword [esp], str._s_s
mov dword [esp + 4], eax
call fcn.00401ad0
cmp word [eax], 0
mov ebx, eax
je 0x404690
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x403e98
sub eax, ebx
sar eax, 1
mov ecx, 0x64
mov edx, str..desktop
jmp 0x403ebc
movzx ecx, word [edx + 2]
add edx, 2
test cx, cx
jne 0x403eb8
sub edx, str..desktop
sar edx, 1
sub eax, edx
mov edx, 0x2e
lea ecx, [ebx + eax*2]
xor eax, eax
jmp 0x403ee7
movzx edx, word [eax + str..menu]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x403ee0
mov dword [esp], edi
mov eax, dword [ebp - 0x370]
call eax
mov eax, dword [ebp - 0x36c]
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MoveFileExW]
mov dword [ebp - 0x35c], eax
sub esp, 0xc
test eax, eax
jne 0x404010
mov eax, dword [ebp - 0x36c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
mov ecx, dword [ebp - 0x35c]
sub esp, 4
mov dword [esp + 8], esi
mov esi, dword [ebp - 0x364]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x30]
mov dword [ebp - 0x35c], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov ecx, dword [ebp - 0x35c]
sub esp, 0xc
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.00401190
mov eax, esi
call fcn.00401d20
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.00401190
mov eax, esi
call fcn.00401d20
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.00401190
mov eax, 0x40f410
jmp 0x403d56
mov edx, dword [ebp - 0x378]
mov eax, ebx
call fcn.00401a10
mov ecx, dword [ebp - 0x35c]
jmp 0x403f42
test byte [section..data], 8
jne 0x404310
mov eax, dword [ebp - 0x360]
mov dword [esp + 4], 0x40f368
mov dword [esp], eax
mov eax, dword [ebp - 0x374]
call eax
test eax, eax
je 0x403d8e
mov dword [esp + 4], str._Desktop_Entry__n
mov dword [esp], eax
mov dword [ebp - 0x37c], eax
call fcn.00401190
mov eax, dword [ebp - 0x37c]
mov dword [esp + 4], str.TypeDirectory_n
mov dword [esp], eax
call fcn.00401190
mov ecx, dword [ebp - 0x368]
mov dword [esp + 4], 0x40f566
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_wcscmp]
test eax, eax
je 0x4041f0
mov eax, dword [ebp - 0x368]
call fcn.00401610
mov dword [esp + 4], str.Name_s_n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x37c]
mov dword [esp], eax
call fcn.00401190
mov eax, dword [ebp - 0x37c]
mov dword [esp + 4], str.Iconfolder_n
mov dword [esp], eax
call fcn.00401190
mov eax, dword [ebp - 0x37c]
mov dword [esp], eax
mov eax, dword [ebp - 0x370]
call eax
jmp 0x403d8e
test edx, edx
je 0x404697
mov eax, edx
shr eax, 0x10
je 0x404228
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 0x40423b
movzx eax, word [ebx]
test ax, ax
je 0x4047e9
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x404148
mov ecx, 0x224c
mov dword [ebp - 0x35c], ebx
mov esi, ebx
mov word [ebp - 0x220], cx
lea ecx, [ebp - 0x21e]
jmp 0x4041be
cmp ax, 9
je 0x4042f8
cmp ax, 0xa
jne 0x40428e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea edi, [edx - 1]
test edx, edx
jle 0x4045e8
lea eax, [ebp - 0xfe]
cmp ecx, eax
ja 0x4045e8
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x404270
jbe 0x404178
cmp ax, 0x22
je 0x4042e0
cmp ax, 0x5c
jne 0x404281
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x4041a0
mov eax, dword [ebp - 0x37c]
mov dword [esp + 4], str.NameWine_n
mov dword [esp], eax
call fcn.00401190
mov eax, dword [ebp - 0x37c]
mov dword [esp + 4], str.Iconwine_n
mov dword [esp], eax
call fcn.00401190
jmp 0x4040e4
movzx eax, dx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004019b0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s__n
mov dword [esp + 8], str.write_menu_file
mov dword [esp + 4], 0x40e000
mov dword [esp], 3
call fcn.00401480
jmp 0x403bed
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4041a0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x404628
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 0x4041a0
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x4041a0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4041a0
mov eax, dword [ebp - 0x360]
test eax, eax
je 0x40485e
shr eax, 0x10
je 0x404828
mov ecx, dword [ebp - 0x360]
mov dword [esp + 4], 0xffffffff
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x380], str._invalid_
sub esp, 8
test eax, eax
jne 0x404460
mov ecx, dword [ebp - 0x360]
cmp word [ecx], 0
je 0x40486d
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [ecx + edx*2 + 2], 0
jne 0x404368
mov eax, 0x224c
mov dword [ebp - 0x384], esi
lea ecx, [ebp - 0x34a]
mov word [ebp - 0x34c], ax
mov eax, dword [ebp - 0x360]
mov dword [ebp - 0x380], edi
mov dword [ebp - 0x37c], eax
lea eax, [ebp - 0x22a]
mov dword [ebp - 0x388], ebx
mov esi, eax
jmp 0x4043dd
cmp ax, 9
je 0x4047d8
cmp ax, 0xa
jne 0x40473e
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [edx - 1]
cmp ecx, esi
ja 0x40441c
test edx, edx
jle 0x40441c
mov edx, eax
add dword [ebp - 0x37c], 2
mov eax, dword [ebp - 0x37c]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x4047a8
jbe 0x4043b0
cmp ax, 0x22
je 0x404790
cmp ax, 0x5c
jne 0x404731
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x4043d0
mov edi, dword [ebp - 0x380]
mov esi, dword [ebp - 0x384]
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x388]
test eax, eax
jle 0x404886
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x34c]
mov dword [esp], eax
call fcn.0040dba0
mov dword [ebp - 0x380], eax
mov eax, dword [ebp - 0x368]
shr eax, 0x10
je 0x40480a
mov eax, dword [ebp - 0x368]
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 0x4045ac
mov ecx, dword [ebp - 0x368]
cmp word [ecx], 0
je 0x40488e
lea esi, [esi]
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [ecx + edx*2 + 2], 0
jne 0x4044b0
mov eax, 0x224c
mov dword [ebp - 0x388], esi
lea ecx, [ebp - 0x34a]
mov word [ebp - 0x34c], ax
mov eax, dword [ebp - 0x368]
mov dword [ebp - 0x384], edi
mov dword [ebp - 0x37c], eax
lea eax, [ebp - 0x22a]
mov dword [ebp - 0x38c], ebx
mov esi, eax
jmp 0x40452d
cmp ax, 9
je 0x4047c0
cmp ax, 0xa
jne 0x4046c6
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea eax, [edx - 1]
cmp ecx, esi
ja 0x40456c
test edx, edx
jle 0x40456c
mov edx, eax
add dword [ebp - 0x37c], 2
mov eax, dword [ebp - 0x37c]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x4046a8
jbe 0x404500
cmp ax, 0x22
je 0x404720
cmp ax, 0x5c
jne 0x4046b9
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x404520
mov edi, dword [ebp - 0x384]
mov esi, dword [ebp - 0x388]
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x38c]
test eax, eax
jle 0x4048a7
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x34c]
mov dword [esp], eax
call fcn.0040dba0
mov edx, eax
mov eax, dword [ebp - 0x380]
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], 0x40e000
mov dword [esp], 3
call fcn.00401480
jmp 0x40403d
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x35c]
test edi, edi
jle 0x404802
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x220]
mov dword [esp], eax
mov dword [ebp - 0x36c], eax
call fcn.0040dba0
jmp 0x40423b
mov byte [ecx], al
add ecx, 1
jmp 0x4041a0
mov dword [esp + 4], str._____Include__n
mov dword [esp], edi
call fcn.00401190
mov eax, esi
call fcn.00401d20
mov dword [esp + 4], str._______Filename__s__Filename__n
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.00401190
mov dword [esp + 4], str.______Include__n
mov dword [esp], edi
call fcn.00401190
mov eax, dword [sym.imp.ucrtbase.dll_fclose]
mov dword [ebp - 0x370], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x364], eax
jmp 0x403e5d
xor eax, eax
jmp 0x403ea5
mov eax, str._null_
jmp 0x40423b
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x404520
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x404854
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 0x404520
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x404520
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40484a
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 0x4043d0
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x4043d0
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4043d0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x404520
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4043d0
mov eax, 0x224c
mov byte [ebp - 0x21e], 0x22
lea ecx, [ebp - 0x21e]
mov word [ebp - 0x220], ax
lea eax, [ecx + 1]
jmp 0x404609
movzx eax, word [ebp - 0x368]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004019b0
mov edx, eax
jmp 0x4045ac
movzx eax, word [ebp - 0x360]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004019b0
mov dword [ebp - 0x380], eax
jmp 0x404460
mov byte [ecx], al
add ecx, 1
jmp 0x4043d0
mov byte [ecx], al
add ecx, 1
jmp 0x404520
mov dword [ebp - 0x380], str._null_
jmp 0x404460
mov eax, 0x224c
mov byte [ebp - 0x34a], 0x22
lea ecx, [ebp - 0x34a]
mov word [ebp - 0x34c], ax
lea eax, [ecx + 1]
jmp 0x404449
mov eax, 0x224c
mov byte [ebp - 0x34a], 0x22
lea ecx, [ebp - 0x34a]
mov word [ebp - 0x34c], ax
lea eax, [ecx + 1]
jmp 0x404599