Function at 0x40a5e0
Capabilities:
Check if process is running under wine
Get number of processors
Get process heap flags
Set registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x64
mov dword [ebp - 0x20], eax
test byte [section..data], 8
jne 0x40a860
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 sym._heap_wprintf
mov ebx, eax
call sym._create_directories
mov dword [esp + 4], ebx
mov dword [esp + 8], edi
mov dword [esp], str._s_s.desktop
call sym._heap_wprintf
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 0x40a857
mov dword [esp + 4], str._Desktop_Entry__n
mov dword [esp], ebx
call sym._fprintf
mov eax, edi
call sym._wchars_to_utf8_chars
mov dword [esp + 4], str.Name_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._fprintf
mov dword [esp + 4], str.Exec
mov dword [esp], ebx
call sym._fprintf
mov eax, dword [ebp + 8]
call sym._escape
mov dword [esp + 4], 0x40d478
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._fprintf
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40a6f5
mov eax, dword [ebp + 0xc]
call sym._escape
mov dword [esp + 4], 0x40d47b
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._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 sym._fprintf
mov dword [esp + 4], str.StartupNotifytrue_n
mov dword [esp], ebx
call sym._fprintf
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x40a73a
mov eax, dword [ebp + 0x10]
cmp word [eax], 0
jne 0x40ab08
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40a74e
mov eax, dword [ebp + 0x14]
cmp word [eax], 0
jne 0x40ab38
mov edx, dword [ebp + 0x18]
test edx, edx
je 0x40a762
mov eax, dword [ebp + 0x18]
cmp word [eax], 0
jne 0x40ab70
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x40a776
mov eax, dword [ebp + 0x1c]
cmp word [eax], 0
jne 0x40aba0
mov dword [esp], ebx
lea ebx, [ebp - 0x1c]
call dword [sym.imp.ucrtbase.dll_fclose]
mov dword [esp], esi
mov dword [ebp - 0x1c], str.chmod
mov dword [ebp - 0x18], 0x40d4dc
call sym._wine_get_unix_file_name
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], eax
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.ntdll.dll___wine_unix_spawnvp]
mov edi, dword [ebp - 0x20]
mov eax, 1
sub esp, 8
test edi, edi
je 0x40a857
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 0x40abe0
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
je 0x40abea
cmp word [edi], 0
mov eax, edi
je 0x40ad7a
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40a808
sub eax, dword [ebp - 0x20]
add eax, 2
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x20]
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 esi, edx
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x40ad60
mov eax, dword [ebp + 0x1c]
shr eax, 0x10
je 0x40abc0
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 0x40a8a6
mov eax, dword [ebp + 0x1c]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x40ad10
mov eax, dword [ebp + 0x18]
shr eax, 0x10
je 0x40ace0
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 0x40a8ea
mov eax, dword [ebp + 0x18]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x40ad00
mov eax, dword [ebp + 0x14]
shr eax, 0x10
je 0x40acc0
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 0x40a92e
mov eax, dword [ebp + 0x14]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40ad30
mov eax, dword [ebp + 0x10]
shr eax, 0x10
je 0x40aca0
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 0x40a972
mov eax, dword [ebp + 0x10]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40ad20
mov eax, dword [ebp + 0xc]
shr eax, 0x10
je 0x40ac80
mov eax, dword [ebp + 0xc]
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 0x40a9b6
mov eax, dword [ebp + 0xc]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 8]
shr eax, 0x10
je 0x40ac60
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 0x40a9ef
mov eax, dword [ebp + 8]
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x3c], eax
test ebx, ebx
je 0x40ad50
mov eax, ebx
shr eax, 0x10
je 0x40ac40
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x40aa28
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
mov edi, eax
test esi, esi
je 0x40ad40
mov eax, esi
shr eax, 0x10
je 0x40ac20
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x24], str._invalid_
sub esp, 8
test eax, eax
jne 0x40aa64
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40ad70
shr eax, 0x10
je 0x40ac00
mov esi, dword [ebp - 0x20]
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 0x40aaa1
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x30]
mov dword [esp + 0x18], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x30], ecx
mov ecx, dword [ebp - 0x34]
mov dword [esp + 0x28], edx
mov edx, dword [ebp - 0x28]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 0x20], edx
mov edx, dword [ebp - 0x24]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [esp + 0x14], edx
mov dword [esp + 0x1c], ecx
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 sym._wine_dbg_log.constprop.0
jmp 0x40a5fb
call sym._wchars_to_utf8_chars
mov dword [esp + 4], str.Comment_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._fprintf
mov ecx, dword [ebp + 0x14]
test ecx, ecx
jne 0x40a741
jmp 0x40a74e
mov dword [esp], eax
call sym._wine_get_unix_file_name
test eax, eax
je 0x40a74e
mov dword [esp + 8], eax
mov dword [esp + 4], str.Path_s_n
mov dword [esp], ebx
call sym._fprintf
mov edx, dword [ebp + 0x18]
test edx, edx
jne 0x40a755
jmp 0x40a762
call sym._wchars_to_utf8_chars
mov dword [esp + 4], str.Icon_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._fprintf
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x40a769
jmp 0x40a776
call sym._wchars_to_utf8_chars
mov dword [esp + 4], str.StartupWMClass_s_n
mov dword [esp + 8], eax
mov dword [esp], ebx
call sym._fprintf
jmp 0x40a776
movzx eax, word [ebp + 0x1c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x38], eax
jmp 0x40a8a6
mov edx, dword fs:[0x18]
mov dword [edx + 0x34], eax
mov eax, dword fs:[0x18]
mov esi, dword [eax + 0x34]
jmp 0x40a850
movzx eax, word [ebp - 0x20]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x40aaa1
movzx edx, si
mov dword [esp], str._04x
mov dword [esp + 4], edx
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x24], eax
jmp 0x40aa64
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov edi, eax
jmp 0x40aa28
movzx eax, word [ebp + 8]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov dword [ebp - 0x3c], eax
jmp 0x40a9ef
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 - 0x28], eax
jmp 0x40a9b6
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 - 0x2c], eax
jmp 0x40a972
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 - 0x30], eax
jmp 0x40a92e
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 - 0x34], eax
jmp 0x40a8ea
mov dword [ebp - 0x30], str._null_
jmp 0x40a92e
mov dword [ebp - 0x34], str._null_
jmp 0x40a8ea
mov dword [ebp - 0x28], str._null_
jmp 0x40a9b6
mov dword [ebp - 0x2c], str._null_
jmp 0x40a972
mov dword [ebp - 0x24], str._null_
jmp 0x40aa64
mov edi, str._null_
jmp 0x40aa28
mov dword [ebp - 0x38], str._null_
jmp 0x40a8a6
mov eax, str._null_
jmp 0x40aaa1
mov eax, 2
jmp 0x40a817