Function at 0x4078e0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, edx
sub esp, 0x5c
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
test byte [0x40d014], 8
jne 0x407a60
mov dword [esp + 8], ebx
mov eax, dword [0x417228]
mov dword [esp], str._s_applicationswine_s.desktop
mov dword [esp + 4], eax
call dbg.heap_wprintf
mov dword [esp + 4], 0x5c
mov esi, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcsrchr]
xor edx, edx
mov word [eax], dx
mov edi, eax
mov eax, esi
call dbg.create_directories
test eax, eax
jne 0x4079a0
test byte [0x40d014], 4
jne 0x407d10
mov dword [ebp - 0x1c], 0
mov dword [esp + 8], esi
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x5c
mov ecx, ebx
mov edx, esi
mov word [edi], ax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call dbg.write_desktop_entry
test eax, eax
jne 0x407cb0
test byte [0x40d014], 4
je 0x407949
test esi, esi
je 0x407f20
mov eax, esi
shr eax, 0x10
je 0x407ee0
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x407a2b
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.couldnt_make_desktop_entry__s_n
mov dword [esp + 8], global___FUNCTION__.12
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x407949
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x407eb0
mov eax, dword [ebp + 0x18]
shr eax, 0x10
je 0x407d80
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x30], str._invalid_
sub esp, 8
test eax, eax
jne 0x407aa4
mov eax, dword [ebp + 0x18]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x407ea0
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x407dc0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x2c], str._invalid_
sub esp, 8
test eax, eax
jne 0x407ae8
mov eax, dword [ebp + 0x14]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x407ec0
mov eax, dword [ebp + 0x10]
shr eax, 0x10
je 0x407e60
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x28], str._invalid_
sub esp, 8
test eax, eax
jne 0x407b2c
mov eax, dword [ebp + 0x10]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x28], eax
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x407e90
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x407e40
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x24], str._invalid_
sub esp, 8
test eax, eax
jne 0x407b70
mov eax, dword [ebp + 0xc]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x407e80
mov eax, dword [ebp + 8]
shr eax, 0x10
je 0x407e20
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 8]
mov esi, str._invalid_
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x407bb1
mov eax, dword [ebp + 8]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov esi, eax
mov eax, dword [ebp - 0x20]
shr eax, 0x10
je 0x407e00
mov dword [esp + 4], 0xffffffff
mov edi, dword [ebp - 0x20]
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x34], str._invalid_
sub esp, 8
test eax, eax
jne 0x407be9
mov eax, edi
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x34], eax
test ebx, ebx
je 0x407ed0
mov eax, ebx
shr eax, 0x10
je 0x407de0
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x407c22
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov edi, eax
mov eax, dword [ebp - 0x1c]
shr eax, 0x10
je 0x407da0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
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 0x407c58
mov eax, dword [ebp - 0x1c]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov ecx, dword [ebp - 0x30]
mov dword [esp + 0x2c], ecx
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0x28], edx
mov ecx, dword [ebp - 0x28]
mov dword [esp + 0x24], ecx
mov edx, dword [ebp - 0x24]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s___s___s___s___s___s___s___s__n
mov dword [esp + 8], global___FUNCTION__.12
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x4078fe
mov eax, dword [ebp - 0x1c]
mov edx, ebx
call dbg.write_menu_file
mov dword [ebp - 0x1c], 1
test eax, eax
jne 0x407950
test byte [0x40d014], 4
je 0x407949
mov dword [esp + 0x10], str._null_
mov dword [esp + 0xc], str.couldnt_make_menu_file__s_n
mov dword [esp + 8], global___FUNCTION__.12
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
jmp 0x407949
test esi, esi
je 0x407f10
mov eax, esi
shr eax, 0x10
je 0x407ef8
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x407d49
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.couldnt_make_parent_directories_for__s_n
mov dword [esp + 8], global___FUNCTION__.12
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0_1
mov dword [ebp - 0x1c], 0
jmp 0x407950
mov eax, dword [ebp + 0x18]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x30], eax
jmp 0x407aa4
mov eax, dword [ebp - 0x1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x407c58
mov eax, dword [ebp + 0x14]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x2c], eax
jmp 0x407ae8
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0_1
mov edi, eax
jmp 0x407c22
mov eax, dword [ebp - 0x20]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x34], eax
jmp 0x407be9
mov eax, dword [ebp + 8]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov esi, eax
jmp 0x407bb1
mov eax, dword [ebp + 0xc]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x24], eax
jmp 0x407b70
mov eax, dword [ebp + 0x10]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x28], eax
jmp 0x407b2c
mov esi, str._null_
jmp 0x407bb1
mov dword [ebp - 0x24], str._null_
jmp 0x407b70
mov dword [ebp - 0x2c], str._null_
jmp 0x407ae8
mov dword [ebp - 0x30], str._null_
jmp 0x407aa4
mov dword [ebp - 0x28], str._null_
jmp 0x407b2c
mov edi, str._null_
jmp 0x407c22
mov dword [esp + 4], esi
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x407a2b
mov dword [esp + 4], esi
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0_1
jmp 0x407d49
mov eax, str._null_
jmp 0x407d49
mov eax, str._null_
jmp 0x407a2b