Function at 0x402e30
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, 0x68
mov dword [ebp - 0x20], eax
mov dword [esp], str.WINECONFIGDIR
call dword [sym.imp.ucrtbase.dll__wgetenv]
mov dword [ebp - 0x28], eax
test byte [section..data], 8
jne 0x403058
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
mov dword [ebp - 0x24], 0
sub esp, 4
mov esi, eax
test edi, edi
je 0x4033e0
mov dword [esp + 4], 0x411260
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll__wfopen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x403008
mov dword [esp + 4], str._Desktop_Entry__n
mov dword [esp], ebx
call fcn.004011f0
mov eax, esi
call fcn.00401d70
mov dword [esp + 4], str.Name_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.004011f0
mov dword [esp + 4], str.Exec
mov dword [esp], ebx
call fcn.004011f0
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x402f1b
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.004011f0
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.004021e0
mov dword [esp + 4], str.wine__s
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.004011f0
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402f5a
mov eax, dword [ebp + 0xc]
call fcn.004021e0
mov dword [esp + 4], 0x4112a3
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.004011f0
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.004011f0
mov dword [esp + 4], str.StartupNotifytrue_n
mov dword [esp], ebx
call fcn.004011f0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x402f9f
mov eax, dword [ebp + 0x10]
cmp word [eax], 0
jne 0x403300
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x402fb3
mov eax, dword [ebp + 0x14]
cmp word [eax], 0
jne 0x403330
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x402fc7
mov eax, dword [ebp + 0x18]
cmp word [eax], 0
jne 0x403368
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x402fdb
mov eax, dword [ebp + 0x1c]
cmp word [eax], 0
jne 0x403398
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_fclose]
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x403010
mov ecx, dword [ebp - 0x20]
mov eax, 1
test ecx, ecx
je 0x403008
mov edx, ecx
mov eax, edi
call fcn.00401870
test eax, eax
sete al
movzx eax, al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
mov dword [ebp - 0x1c], str.chmod
mov dword [ebp - 0x18], 0x411304
call sub.kernel32.dll_wine_get_unix_file_name
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.ntdll.dll___wine_unix_spawnvp]
mov ecx, dword [ebp - 0x20]
mov eax, 1
sub esp, 8
test ecx, ecx
jne 0x402ff7
jmp 0x403008
mov ecx, dword [ebp + 0x1c]
test ecx, ecx
je 0x403560
mov eax, dword [ebp + 0x1c]
shr eax, 0x10
je 0x4033c0
mov eax, dword [ebp + 0x1c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x38], str._invalid_
sub esp, 8
test eax, eax
jne 0x40309c
mov eax, dword [ebp + 0x1c]
call fcn.00401290
mov dword [ebp - 0x38], eax
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x403550
mov eax, dword [ebp + 0x18]
shr eax, 0x10
je 0x4034f0
mov eax, dword [ebp + 0x18]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x34], str._invalid_
sub esp, 8
test eax, eax
jne 0x4030e0
mov eax, dword [ebp + 0x18]
call fcn.00401290
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x403520
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x4034d0
mov eax, dword [ebp + 0x14]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x30], str._invalid_
sub esp, 8
test eax, eax
jne 0x403124
mov eax, dword [ebp + 0x14]
call fcn.00401290
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403510
mov eax, dword [ebp + 0x10]
shr eax, 0x10
je 0x4034b0
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x2c], str._invalid_
sub esp, 8
test eax, eax
jne 0x403168
mov eax, dword [ebp + 0x10]
call fcn.00401290
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403540
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x403490
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x24], str._invalid_
sub esp, 8
test eax, eax
jne 0x4031ac
mov eax, dword [ebp + 0xc]
call fcn.00401290
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
shr eax, 0x10
je 0x403470
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x3c], str._invalid_
sub esp, 8
test eax, eax
jne 0x4031e5
mov eax, dword [ebp + 8]
call fcn.00401290
mov dword [ebp - 0x3c], eax
test ebx, ebx
je 0x403530
mov eax, ebx
shr eax, 0x10
je 0x403450
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 0x40321e
mov eax, ebx
call fcn.00401290
mov esi, eax
test edi, edi
je 0x403580
mov eax, edi
shr eax, 0x10
je 0x403430
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 0x403257
mov eax, edi
call fcn.00401290
mov edx, eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x403570
shr eax, 0x10
mov dword [ebp - 0x40], edx
je 0x403410
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, dword [ebp - 0x40]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x40329e
mov eax, dword [ebp - 0x20]
call fcn.00401290
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x38]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp - 0x30]
mov dword [esp + 0xc], str.__s__s__s__s__s__s__s__s__s__n
mov dword [esp + 0x28], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 8], str.write_desktop_entry
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp - 0x24]
mov dword [esp + 4], 0x40f000
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [esp], 3
mov dword [esp + 0x1c], ecx
call fcn.00401580
jmp 0x402e5d
call fcn.00401d70
mov dword [esp + 4], str.Comment_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.004011f0
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x402fa6
jmp 0x402fb3
mov dword [esp], eax
call sub.kernel32.dll_wine_get_unix_file_name
test eax, eax
je 0x402fb3
mov dword [esp + 8], eax
mov dword [esp + 4], str.Path_s_n
mov dword [esp], ebx
call fcn.004011f0
mov ecx, dword [ebp + 0x18]
test ecx, ecx
jne 0x402fba
jmp 0x402fc7
call fcn.00401d70
mov dword [esp + 4], str.Icon_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.004011f0
mov edx, dword [ebp + 0x1c]
test edx, edx
jne 0x402fce
jmp 0x402fdb
call fcn.00401d70
mov dword [esp + 4], str.StartupWMClass_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.004011f0
jmp 0x402fdb
movzx eax, word [ebp + 0x1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [ebp - 0x38], eax
jmp 0x40309c
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41e000
mov dword [esp], str._s_s.desktop
call fcn.00401930
mov dword [ebp - 0x24], 1
mov edi, eax
jmp 0x402e7a
movzx eax, word [ebp - 0x20]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov edx, dword [ebp - 0x40]
jmp 0x40329e
movzx eax, di
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov edx, eax
jmp 0x403257
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov esi, eax
jmp 0x40321e
movzx eax, word [ebp + 8]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [ebp - 0x3c], eax
jmp 0x4031e5
movzx eax, word [ebp + 0xc]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [ebp - 0x24], eax
jmp 0x4031ac
movzx eax, word [ebp + 0x10]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [ebp - 0x2c], eax
jmp 0x403168
movzx eax, word [ebp + 0x14]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [ebp - 0x30], eax
jmp 0x403124
movzx eax, word [ebp + 0x18]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401470
mov dword [ebp - 0x34], eax
jmp 0x4030e0
mov dword [ebp - 0x2c], str._null_
jmp 0x403168
mov dword [ebp - 0x30], str._null_
jmp 0x403124
mov esi, str._null_
jmp 0x40321e
mov dword [ebp - 0x24], str._null_
jmp 0x4031ac
mov dword [ebp - 0x34], str._null_
jmp 0x4030e0
mov dword [ebp - 0x38], str._null_
jmp 0x40309c
mov eax, str._null_
jmp 0x40329e
mov edx, str._null_
jmp 0x403257