Function at 0x402b20
Capabilities:
Check if process is running under wine
Get process heap flags
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x7c
mov dword [ebp - 0x2c], eax
test byte [section..data], 8
jne 0x402da0
mov dword [esp], ebx
call dword [sym.imp.shlwapi.dll_PathFindFileNameW]
sub esp, 4
mov edi, eax
mov dword [esp + 4], str.c:proton_shortcuts
mov dword [esp], 0x40d430
call fcn.004018f0
mov ebx, eax
call section..text
mov dword [esp + 4], ebx
mov dword [esp + 8], edi
mov dword [esp], str._s_s.desktop
call fcn.004018f0
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov esi, eax
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 dword [esp + 4], 0x40d452
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll__wfopen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x402d8f
mov dword [esp + 4], str._Desktop_Entry__n
mov dword [esp], ebx
call fcn.00401180
mov eax, edi
call fcn.004015a0
mov dword [esp + 4], str.Name_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401180
mov dword [esp + 4], str.Exec
mov dword [esp], ebx
call fcn.00401180
mov eax, dword [ebp + 8]
call fcn.004019a0
mov dword [esp + 4], 0x40d478
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401180
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x402c35
mov eax, dword [ebp + 0xc]
call fcn.004019a0
mov dword [esp + 4], 0x40d47b
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401180
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.00401180
mov dword [esp + 4], str.StartupNotifytrue_n
mov dword [esp], ebx
call fcn.00401180
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x402c7a
mov eax, dword [ebp + 0x10]
cmp word [eax], 0
jne 0x403050
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x402c8e
mov eax, dword [ebp + 0x14]
cmp word [eax], 0
jne 0x403080
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x402ca2
mov eax, dword [ebp + 0x18]
cmp word [eax], 0
jne 0x4030b8
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x402cb6
mov eax, dword [ebp + 0x1c]
cmp word [eax], 0
jne 0x4030e8
mov dword [esp], ebx
lea ebx, [ebp - 0x28]
call dword [sym.imp.ucrtbase.dll_fclose]
mov dword [esp], esi
mov dword [ebp - 0x28], str.chmod
mov dword [ebp - 0x24], 0x40d4dc
call sub.kernel32.dll_wine_get_unix_file_name
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], 0
call sub.ntdll.dll___wine_unix_spawnvp
mov edi, dword [ebp - 0x2c]
mov eax, 1
sub esp, 8
test edi, edi
je 0x402d8f
mov dword [esp + 8], ebx
mov dword [esp + 4], str.SoftwareWineMenuFiles
mov dword [esp], 0x80000001
call dword [sym.imp.advapi32.dll_RegCreateKeyW]
sub esp, 0xc
test eax, eax
jne 0x403130
mov ebx, dword [ebp - 0x28]
test ebx, ebx
je 0x40313a
cmp word [edi], 0
mov eax, edi
je 0x4032ca
add eax, 2
cmp word [eax], 0
jne 0x402d40
sub eax, dword [ebp - 0x2c]
add eax, 2
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_RegSetValueExW]
sub esp, 0x18
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
xor eax, eax
test esi, esi
sete al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, edx
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x4032b0
mov eax, dword [ebp + 0x1c]
shr eax, 0x10
je 0x403110
mov eax, dword [ebp + 0x1c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x40], str._invalid_
sub esp, 8
test eax, eax
jne 0x402de6
mov eax, dword [ebp + 0x1c]
call fcn.00401240
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x403260
mov eax, dword [ebp + 0x18]
shr eax, 0x10
je 0x403230
mov eax, dword [ebp + 0x18]
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 0x402e2a
mov eax, dword [ebp + 0x18]
call fcn.00401240
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x403250
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x403210
mov eax, dword [ebp + 0x14]
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 0x402e6e
mov eax, dword [ebp + 0x14]
call fcn.00401240
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403280
mov eax, dword [ebp + 0x10]
shr eax, 0x10
je 0x4031f0
mov eax, dword [ebp + 0x10]
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 0x402eb2
mov eax, dword [ebp + 0x10]
call fcn.00401240
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x403270
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x4031d0
mov eax, dword [ebp + 0xc]
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 0x402ef6
mov eax, dword [ebp + 0xc]
call fcn.00401240
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
shr eax, 0x10
je 0x4031b0
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x44], str._invalid_
sub esp, 8
test eax, eax
jne 0x402f2f
mov eax, dword [ebp + 8]
call fcn.00401240
mov dword [ebp - 0x44], eax
test ebx, ebx
je 0x4032a0
mov eax, ebx
shr eax, 0x10
je 0x403190
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 0x402f68
mov eax, ebx
call fcn.00401240
mov esi, eax
test edi, edi
je 0x403290
mov eax, edi
shr eax, 0x10
je 0x403170
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 0x402fa1
mov eax, edi
call fcn.00401240
mov edx, eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4032c0
shr eax, 0x10
mov dword [ebp - 0x48], edx
je 0x403150
mov edi, dword [ebp - 0x2c]
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, dword [ebp - 0x48]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x402fe7
mov eax, edi
call fcn.00401240
mov edx, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x40]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp - 0x38]
mov dword [esp + 0xc], str.__s__s__s__s__s__s__s__s__s__n
mov dword [esp + 0x28], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 8], str.write_desktop_entry
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp - 0x30]
mov dword [esp + 4], 0x40c000
mov dword [esp + 0x20], ecx
mov ecx, dword [ebp - 0x44]
mov dword [esp], 3
mov dword [esp + 0x1c], ecx
call fcn.004014e0
jmp 0x402b3b
call fcn.004015a0
mov dword [esp + 4], str.Comment_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401180
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jne 0x402c81
jmp 0x402c8e
mov dword [esp], eax
call sub.kernel32.dll_wine_get_unix_file_name
test eax, eax
je 0x402c8e
mov dword [esp + 8], eax
mov dword [esp + 4], str.Path_s_n
mov dword [esp], ebx
call fcn.00401180
mov edx, dword [ebp + 0x18]
test edx, edx
jne 0x402c95
jmp 0x402ca2
call fcn.004015a0
mov dword [esp + 4], str.Icon_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401180
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x402ca9
jmp 0x402cb6
call fcn.004015a0
mov dword [esp + 4], str.StartupWMClass_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call fcn.00401180
jmp 0x402cb6
movzx eax, word [ebp + 0x1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov dword [ebp - 0x40], eax
jmp 0x402de6
mov edx, dword fs:[0x18]
mov dword [edx + 0x34], eax
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x34]
jmp 0x402d88
movzx eax, word [ebp - 0x2c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov edx, dword [ebp - 0x48]
jmp 0x402fe7
movzx edi, di
mov dword [esp], str._04x
mov dword [esp + 4], edi
call fcn.00401420
mov edx, eax
jmp 0x402fa1
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov esi, eax
jmp 0x402f68
movzx eax, word [ebp + 8]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov dword [ebp - 0x44], eax
jmp 0x402f2f
movzx eax, word [ebp + 0xc]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov dword [ebp - 0x30], eax
jmp 0x402ef6
movzx eax, word [ebp + 0x10]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov dword [ebp - 0x34], eax
jmp 0x402eb2
movzx eax, word [ebp + 0x14]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov dword [ebp - 0x38], eax
jmp 0x402e6e
movzx eax, word [ebp + 0x18]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov dword [ebp - 0x3c], eax
jmp 0x402e2a
mov dword [ebp - 0x38], str._null_
jmp 0x402e6e
mov dword [ebp - 0x3c], str._null_
jmp 0x402e2a
mov dword [ebp - 0x30], str._null_
jmp 0x402ef6
mov dword [ebp - 0x34], str._null_
jmp 0x402eb2
mov edx, str._null_
jmp 0x402fa1
mov esi, str._null_
jmp 0x402f68
mov dword [ebp - 0x40], str._null_
jmp 0x402de6
mov eax, str._null_
jmp 0x402fe7
mov eax, 2
jmp 0x402d4f