Function at 0x40af60
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 [section..data], 8
jne 0x40b088
mov eax, dword [0x40c100]
mov dword [esp + 8], ebx
mov dword [esp], str._s_applicationswine_s.desktop
mov dword [esp + 4], eax
call sym._heap_wprintf
mov dword [esp + 4], 0x5c
mov esi, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_wcsrchr]
xor ecx, ecx
mov word [eax], cx
mov dword [ebp - 0x24], eax
mov eax, esi
call sym._create_directories
mov edx, dword [ebp - 0x24]
test eax, eax
mov edi, eax
jne 0x40b030
test byte [section..data], 4
jne 0x40b2e0
xor edi, edi
mov dword [esp + 8], esi
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov edx, dword fs:[0x18]
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x1c], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov edx, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, edi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x5c
mov ecx, ebx
mov word [edx], ax
mov eax, dword [ebp + 0x18]
mov edx, esi
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 sym._write_desktop_entry
mov edi, eax
test eax, eax
je 0x40b370
mov edi, 1
jmp 0x40afd1
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x40b508
mov eax, dword [ebp + 0x18]
shr eax, 0x10
je 0x40b350
mov eax, dword [ebp + 0x18]
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 0x40b0cc
mov eax, dword [ebp + 0x18]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40b4e8
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x40b408
mov eax, dword [ebp + 0x14]
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 0x40b110
mov eax, dword [ebp + 0x14]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40b518
mov eax, dword [ebp + 0x10]
shr eax, 0x10
je 0x40b3e8
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x28], str._invalid_
sub esp, 8
test eax, eax
jne 0x40b154
mov eax, dword [ebp + 0x10]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x28], eax
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x40b4d8
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x40b4a8
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 0x40b198
mov eax, dword [ebp + 0xc]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x24], eax
mov esi, dword [ebp + 8]
test esi, esi
je 0x40b4c8
mov eax, dword [ebp + 8]
shr eax, 0x10
je 0x40b488
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40b1d9
mov eax, dword [ebp + 8]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov edi, eax
mov eax, dword [ebp - 0x20]
shr eax, 0x10
je 0x40b468
mov esi, dword [ebp - 0x20]
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x34], str._invalid_
sub esp, 8
test eax, eax
jne 0x40b211
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x34], eax
test ebx, ebx
je 0x40b4f8
mov eax, ebx
shr eax, 0x10
je 0x40b448
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 0x40b24a
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
mov esi, eax
mov eax, dword [ebp - 0x1c]
shr eax, 0x10
je 0x40b428
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x40b280
mov eax, dword [ebp - 0x1c]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov ecx, dword [ebp - 0x30]
mov dword [esp + 0x1c], edi
mov edi, dword [ebp - 0x34]
mov dword [esp + 0x14], esi
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 0x18], edi
mov dword [esp + 0x28], ecx
mov ecx, dword [ebp - 0x28]
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp - 0x24]
mov dword [esp + 0xc], str.__s___s___s___s___s___s___s___s__n
mov dword [esp + 0x20], ecx
mov dword [esp + 8], str.write_menu_entry
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40af7e
test esi, esi
je 0x40b550
mov eax, esi
shr eax, 0x10
je 0x40b530
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 0x40b319
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.couldnt_make_parent_directories_for__s_n
mov dword [esp + 8], str.write_menu_entry
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x40afd1
movzx eax, word [ebp + 0x18]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x30], eax
jmp 0x40b0cc
test byte [section..data], 4
je 0x40afcf
test esi, esi
je 0x40b524
mov eax, esi
shr eax, 0x10
je 0x40b560
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 0x40b3b6
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.couldnt_make_desktop_entry__s_n
mov dword [esp + 8], str.write_menu_entry
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x40afd1
movzx eax, word [ebp + 0x10]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x28], eax
jmp 0x40b154
movzx eax, word [ebp + 0x14]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x2c], eax
jmp 0x40b110
movzx eax, word [ebp - 0x1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40b280
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov esi, eax
jmp 0x40b24a
movzx eax, word [ebp - 0x20]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x34], eax
jmp 0x40b211
movzx eax, word [ebp + 8]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov edi, eax
jmp 0x40b1d9
movzx eax, word [ebp + 0xc]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x24], eax
jmp 0x40b198
mov edi, str._null_
jmp 0x40b1d9
mov dword [ebp - 0x24], str._null_
jmp 0x40b198
mov dword [ebp - 0x2c], str._null_
jmp 0x40b110
mov esi, str._null_
jmp 0x40b24a
mov dword [ebp - 0x30], str._null_
jmp 0x40b0cc
mov dword [ebp - 0x28], str._null_
jmp 0x40b154
mov eax, str._null_
jmp 0x40b3b6
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40b319
mov eax, str._null_
jmp 0x40b319
movzx eax, si
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40b3b6