Function at 0x403860
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 [section..data], 8
jne 0x403a98
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
mov dword [ebp - 0x30], 0
sub esp, 4
mov esi, eax
test edi, edi
je 0x403e20
mov dword [esp + 4], 0x40d33c
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll__wfopen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x403a43
mov dword [esp + 4], str._Desktop_Entry__n
mov dword [esp], ebx
call fcn.00401190
mov eax, esi
call fcn.00401690
mov dword [esp + 4], str.Name_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401190
mov dword [esp + 4], str.Exec
mov dword [esp], ebx
call fcn.00401190
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40394e
mov dword [esp], eax
call sub.kernel32.dll_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 fcn.00401190
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 fcn.00401f50
mov dword [esp + 8], str.wine
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x40d5e7
mov dword [esp], ebx
call fcn.00401190
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403995
mov eax, dword [ebp + 0xc]
call fcn.00401f50
mov dword [esp + 4], 0x40d5ed
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401190
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 fcn.00401190
mov dword [esp + 4], str.StartupNotifytrue_n
mov dword [esp], ebx
call fcn.00401190
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4039da
mov eax, dword [ebp + 0x10]
cmp word [eax], 0
jne 0x403d40
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x4039ee
mov eax, dword [ebp + 0x14]
cmp word [eax], 0
jne 0x403d70
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x403a02
mov eax, dword [ebp + 0x18]
cmp word [eax], 0
jne 0x403da8
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x403a16
mov eax, dword [ebp + 0x1c]
cmp word [eax], 0
jne 0x403dd8
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_fclose]
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x403a50
mov ecx, dword [ebp - 0x2c]
mov eax, 1
test ecx, ecx
je 0x403a43
mov edx, ecx
mov eax, edi
call fcn.00401a20
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], 0x40d64e
mov dword [esp], edi
call sub.kernel32.dll_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 sub.ntdll.dll___wine_unix_spawnvp
mov ecx, dword [ebp - 0x2c]
mov eax, 1
sub esp, 8
test ecx, ecx
jne 0x403a32
jmp 0x403a43
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
je 0x403fa0
mov eax, dword [ebp + 0x1c]
shr eax, 0x10
je 0x403e00
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 0x403adc
mov eax, dword [ebp + 0x1c]
call fcn.00401250
mov dword [ebp - 0x44], eax
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x403f90
mov eax, dword [ebp + 0x18]
shr eax, 0x10
je 0x403f30
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 0x403b20
mov eax, dword [ebp + 0x18]
call fcn.00401250
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x403f60
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x403f10
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 0x403b64
mov eax, dword [ebp + 0x14]
call fcn.00401250
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403f50
mov eax, dword [ebp + 0x10]
shr eax, 0x10
je 0x403ef0
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 0x403ba8
mov eax, dword [ebp + 0x10]
call fcn.00401250
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403f80
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x403ed0
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 0x403bec
mov eax, dword [ebp + 0xc]
call fcn.00401250
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
shr eax, 0x10
je 0x403eb0
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 0x403c25
mov eax, dword [ebp + 8]
call fcn.00401250
mov dword [ebp - 0x48], eax
test ebx, ebx
je 0x403f70
mov eax, ebx
shr eax, 0x10
je 0x403e90
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 0x403c5e
mov eax, ebx
call fcn.00401250
mov esi, eax
test edi, edi
je 0x403fc0
mov eax, edi
shr eax, 0x10
je 0x403e70
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 0x403c97
mov eax, edi
call fcn.00401250
mov edx, eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x403fb0
shr eax, 0x10
mov dword [ebp - 0x4c], edx
je 0x403e50
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 0x403cde
mov eax, dword [ebp - 0x2c]
call fcn.00401250
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], str.write_desktop_entry
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x403890
call fcn.00401690
mov dword [esp + 4], str.Comment_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401190
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x4039e1
jmp 0x4039ee
mov dword [esp], eax
call sub.kernel32.dll_wine_get_unix_file_name
test eax, eax
je 0x4039ee
mov dword [esp + 8], eax
mov dword [esp + 4], str.Path_s_n
mov dword [esp], ebx
call fcn.00401190
mov ecx, dword [ebp + 0x18]
test ecx, ecx
jne 0x4039f5
jmp 0x403a02
call fcn.00401690
mov dword [esp + 4], str.Icon_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401190
mov edx, dword [ebp + 0x1c]
test edx, edx
jne 0x403a09
jmp 0x403a16
call fcn.00401690
mov dword [esp + 4], str.StartupWMClass_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401190
jmp 0x403a16
movzx eax, word [ebp + 0x1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov dword [ebp - 0x44], eax
jmp 0x403adc
mov dword [esp + 8], eax
mov dword [esp + 4], 0x419000
mov dword [esp], str._s_s.desktop
call fcn.00401ae0
mov dword [ebp - 0x30], 1
mov edi, eax
jmp 0x4038ad
movzx eax, word [ebp - 0x2c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov edx, dword [ebp - 0x4c]
jmp 0x403cde
movzx eax, di
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov edx, eax
jmp 0x403c97
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov esi, eax
jmp 0x403c5e
movzx eax, word [ebp + 8]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov dword [ebp - 0x48], eax
jmp 0x403c25
movzx eax, word [ebp + 0xc]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov dword [ebp - 0x30], eax
jmp 0x403bec
movzx eax, word [ebp + 0x10]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov dword [ebp - 0x38], eax
jmp 0x403ba8
movzx eax, word [ebp + 0x14]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov dword [ebp - 0x3c], eax
jmp 0x403b64
movzx eax, word [ebp + 0x18]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov dword [ebp - 0x40], eax
jmp 0x403b20
mov dword [ebp - 0x38], str._null_
jmp 0x403ba8
mov dword [ebp - 0x3c], str._null_
jmp 0x403b64
mov esi, str._null_
jmp 0x403c5e
mov dword [ebp - 0x30], str._null_
jmp 0x403bec
mov dword [ebp - 0x40], str._null_
jmp 0x403b20
mov dword [ebp - 0x44], str._null_
jmp 0x403adc
mov eax, str._null_
jmp 0x403cde
mov edx, str._null_
jmp 0x403c97