Function at 0x406440
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
push ebx
mov ebx, ecx
sub esp, 0x8c
mov dword [ebp - 0x2c], eax
mov dword [esp], str.WINECONFIGDIR
call dword [sym.imp.ucrtbase.dll__wgetenv]
mov dword [ebp - 0x34], eax
test byte [0x40d014], 8
jne 0x406670
mov dword [esp], ebx
call sym._PathFindFileNameW_4
mov dword [ebp - 0x30], 0
sub esp, 4
mov esi, eax
test edi, edi
je 0x4069f0
mov dword [esp + 4], 0x40ec02
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll__wfopen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x40661b
mov dword [esp + 4], str._Desktop_Entry__n
mov dword [esp], ebx
call dbg.fprintf
mov dword [esp], esi
call dbg.wchars_to_utf8_chars
mov dword [esp + 4], str.Name_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call dbg.fprintf
mov dword [esp + 4], str.Exec
mov dword [esp], ebx
call dbg.fprintf
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40652e
mov dword [esp], eax
call sym._wine_get_unix_file_name
mov dword [esp + 4], str.env_WINEPREFIX__s_
mov dword [esp + 8], eax
mov esi, eax
mov dword [esp], ebx
call dbg.fprintf
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov eax, dword [ebp + 8]
call dbg.escape
mov dword [esp + 4], str.wine__s
mov dword [esp + 8], eax
mov dword [esp], ebx
call dbg.fprintf
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40656d
mov eax, dword [ebp + 0xc]
call dbg.escape
mov dword [esp + 4], 0x40ec45
mov dword [esp + 8], eax
mov dword [esp], ebx
call dbg.fprintf
mov dword [esp + 4], ebx
mov dword [esp], 0xa
call dword [sym.imp.ucrtbase.dll_fputc]
mov dword [esp + 4], str.TypeApplication_n
mov dword [esp], ebx
call dbg.fprintf
mov dword [esp + 4], str.StartupNotifytrue_n
mov dword [esp], ebx
call dbg.fprintf
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4065b2
mov eax, dword [ebp + 0x10]
cmp word [eax], 0
jne 0x406918
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4065c6
mov eax, dword [ebp + 0x14]
cmp word [eax], 0
jne 0x406948
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x4065da
mov eax, dword [ebp + 0x18]
cmp word [eax], 0
jne 0x406978
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x4065ee
mov eax, dword [ebp + 0x1c]
cmp word [eax], 0
jne 0x4069a8
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_fclose]
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x406628
mov ecx, dword [ebp - 0x2c]
mov eax, 1
test ecx, ecx
je 0x40661b
mov edx, ecx
mov eax, edi
call sym._register_menus_entry
test eax, eax
sete al
movzx eax, al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x28], str.chmod
mov dword [ebp - 0x24], 0x40eca6
mov dword [esp], edi
call sym._wine_get_unix_file_name
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], 0
mov dword [esp], eax
call sym.___wine_unix_spawnvp_8
mov ecx, dword [ebp - 0x2c]
mov eax, 1
sub esp, 8
test ecx, ecx
jne 0x40660a
jmp 0x40661b
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
je 0x406b70
mov eax, dword [ebp + 0x1c]
shr eax, 0x10
je 0x4069d0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x44], str._invalid_
sub esp, 8
test eax, eax
jne 0x4066b4
mov eax, dword [ebp + 0x1c]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x44], eax
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x406b60
mov eax, dword [ebp + 0x18]
shr eax, 0x10
je 0x406b00
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x40], str._invalid_
sub esp, 8
test eax, eax
jne 0x4066f8
mov eax, dword [ebp + 0x18]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x406b30
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x406ae0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x3c], str._invalid_
sub esp, 8
test eax, eax
jne 0x40673c
mov eax, dword [ebp + 0x14]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x406b20
mov eax, dword [ebp + 0x10]
shr eax, 0x10
je 0x406ac0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x38], str._invalid_
sub esp, 8
test eax, eax
jne 0x406780
mov eax, dword [ebp + 0x10]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x406b50
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x406aa0
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x30], str._invalid_
sub esp, 8
test eax, eax
jne 0x4067c4
mov eax, dword [ebp + 0xc]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
shr eax, 0x10
je 0x406a80
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x48], str._invalid_
sub esp, 8
test eax, eax
jne 0x4067fd
mov eax, dword [ebp + 8]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov dword [ebp - 0x48], eax
test ebx, ebx
je 0x406b40
mov eax, ebx
shr eax, 0x10
je 0x406a60
mov dword [esp + 4], 0xffffffff
mov esi, str._invalid_
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x406836
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov esi, eax
test edi, edi
je 0x406b90
mov eax, edi
shr eax, 0x10
je 0x406a40
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x40686f
mov eax, edi
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov edx, eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x406b80
shr eax, 0x10
mov dword [ebp - 0x4c], edx
je 0x406a20
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, dword [ebp - 0x4c]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x4068b6
mov eax, dword [ebp - 0x2c]
call sym._wine_dbgstr_wn.part.0.constprop.0_1
mov edx, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x44]
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x40]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 0x28], ecx
mov ecx, dword [ebp - 0x38]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp - 0x30]
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp - 0x48]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.__s__s__s__s__s__s__s__s__s__n
mov dword [esp + 8], global___FUNCTION__.10
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_1
jmp 0x406470
mov dword [esp], eax
call dbg.wchars_to_utf8_chars
mov dword [esp + 4], str.Comment_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call dbg.fprintf
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x4065b9
jmp 0x4065c6
mov dword [esp], eax
call sym._wine_get_unix_file_name
test eax, eax
je 0x4065c6
mov dword [esp + 8], eax
mov dword [esp + 4], str.Path_s_n
mov dword [esp], ebx
call dbg.fprintf
jmp 0x4065c6
mov dword [esp], eax
call dbg.wchars_to_utf8_chars
mov dword [esp + 4], str.Icon_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call dbg.fprintf
mov edx, dword [ebp + 0x1c]
test edx, edx
jne 0x4065e1
jmp 0x4065ee
mov dword [esp], eax
call dbg.wchars_to_utf8_chars
mov dword [esp + 4], str.StartupWMClass_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call dbg.fprintf
jmp 0x4065ee
mov eax, dword [ebp + 0x1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x44], eax
jmp 0x4066b4
mov dword [esp + 8], eax
mov dword [esp + 4], 0x417020
mov dword [esp], str._s_s.desktop
call dbg.heap_wprintf
mov dword [ebp - 0x30], 1
mov edi, eax
jmp 0x40648c
mov eax, dword [ebp - 0x2c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov edx, dword [ebp - 0x4c]
jmp 0x4068b6
mov dword [esp + 4], edi
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0_1
mov edx, eax
jmp 0x40686f
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call sym._wine_dbg_sprintf.constprop.0_1
mov esi, eax
jmp 0x406836
mov eax, dword [ebp + 8]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_1
mov dword [ebp - 0x48], eax
jmp 0x4067fd
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 - 0x30], eax
jmp 0x4067c4
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 - 0x38], eax
jmp 0x406780
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 - 0x3c], eax
jmp 0x40673c
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 - 0x40], eax
jmp 0x4066f8
mov dword [ebp - 0x38], str._null_
jmp 0x406780
mov dword [ebp - 0x3c], str._null_
jmp 0x40673c
mov esi, str._null_
jmp 0x406836
mov dword [ebp - 0x30], str._null_
jmp 0x4067c4
mov dword [ebp - 0x40], str._null_
jmp 0x4066f8
mov dword [ebp - 0x44], str._null_
jmp 0x4066b4
mov eax, str._null_
jmp 0x4068b6
mov edx, str._null_
jmp 0x40686f