Function at 0x405fe0
Capabilities:
Delete file
Encode data using xor
Get common file path

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x464
mov dword [ebp - 0x430], edx
mov dword [ebp - 0x434], ecx
mov dword [ebp - 0x42c], 0
mov dword [ebp - 0x428], 0
test byte [section..data], 8
jne 0x406507
lea eax, [ebp - 0x420]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
dec eax
sub esp, 0x10
cmp eax, 0x103
ja 0x4065f5
lea eax, [ebp - 0x424]
mov ecx, dword [ebp - 0x434]
mov edx, dword [ebp - 0x430]
mov dword [esp + 8], eax
lea eax, [ebp - 0x428]
mov dword [esp + 4], eax
lea eax, [ebp - 0x42c]
mov dword [esp], eax
lea eax, [ebp - 0x420]
call sym._open_icon
mov ebx, eax
test eax, eax
js 0x4062b1
mov eax, dword [ebp - 0x424]
movzx edx, word [ebp - 0x420]
mov dword [ebp - 0x438], eax
mov eax, dword [ebp - 0x428]
mov dword [ebp - 0x434], eax
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x43c], eax
test dx, dx
je 0x406a3a
lea edi, [ebp - 0x41e]
xor eax, eax
lea esi, [esi]
mov ecx, 0x10
lea esi, [esi]
mov esi, eax
shr ax, 1
xor esi, edx
mov ebx, eax
xor bx, 0xa001
and esi, 1
cmovne eax, ebx
shr dx, 1
dec ecx
jne 0x4060e0
movzx edx, word [edi]
add edi, 2
test dx, dx
jne 0x4060d8
movzx ebx, ax
lea eax, [ebp - 0x420]
mov edi, dword [sym.imp.ucrtbase.dll_wcsrchr]
mov dword [esp + 4], 0x5c
mov dword [esp], eax
call edi
mov dword [esp + 4], 0x2e
test eax, eax
lea esi, [eax + 2]
lea eax, [ebp - 0x420]
cmove esi, eax
mov dword [esp], esi
call edi
mov edx, eax
sub eax, esi
sar eax, 1
test edx, edx
je 0x4068cb
mov edi, dword [ebp - 0x430]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 0x10], edi
mov dword [esp + 4], ebx
mov dword [esp], str._04X__.s._d
call sym._heap_wprintf
mov dword [esp + 4], str.c:proton_shortcutsicons
mov dword [esp], 0x40d430
mov dword [ebp - 0x440], eax
call sym._heap_wprintf
mov dword [ebp - 0x44c], eax
call sym._create_directories
mov esi, dword [ebp - 0x438]
test esi, esi
jle 0x4069ed
lea eax, [ebp - 0x218]
mov edi, dword [ebp - 0x434]
xor ebx, ebx
mov dword [ebp - 0x448], 0
mov dword [ebp - 0x450], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x438], eax
lea esi, cs:[esi]
mov dword [ebp - 0x218], ebx
test byte [section..data], 8
jne 0x406490
test ebx, ebx
je 0x406310
movzx ecx, byte [edi]
mov eax, dword [ebp - 0x434]
xor edx, edx
mov byte [ebp - 0x430], cl
jmp 0x40620c
inc edx
add eax, 0x10
cmp edx, ebx
je 0x406310
movzx ecx, byte [ebp - 0x430]
cmp byte [eax], cl
jne 0x406200
movzx ecx, byte [edi + 1]
cmp byte [eax + 1], cl
jne 0x406200
inc ebx
add edi, 0x10
cmp esi, ebx
jg 0x4061d0
mov edi, dword [ebp - 0x450]
mov esi, dword [ebp - 0x44c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40dcc8
mov dword [esp + 0xc], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
sub esp, 0x10
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_DeleteFileW]
mov eax, dword [ebp - 0x438]
sub esp, 4
mov dword [esp], esi
call eax
mov eax, dword [ebp - 0x448]
test eax, eax
js 0x406635
mov eax, dword [ebp - 0x42c]
test eax, eax
je 0x40628e
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x428]
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
call eax
mov eax, dword [ebp - 0x440]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
mov dword [ebp - 0x440], 0
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x438], eax
test byte [section..data], 4
jne 0x406675
mov eax, dword [ebp - 0x42c]
test eax, eax
jne 0x406a41
mov eax, dword [ebp - 0x428]
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
call eax
mov eax, dword [ebp - 0x440]
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
call eax
mov dword [ebp - 0x440], 0
jmp 0x40629f
inc ebx
mov ecx, dword [ebp - 0x218]
mov eax, edi
mov edx, ebx
cmp esi, ebx
jle 0x40638c
mov dword [ebp - 0x430], ecx
mov dword [ebp - 0x444], ebx
jmp 0x406338
inc edx
add eax, 0x10
cmp esi, edx
je 0x406380
movzx ebx, byte [edi]
cmp byte [eax + 0x10], bl
jne 0x406330
movzx ebx, byte [edi + 1]
cmp byte [eax + 0x11], bl
jne 0x406330
mov ebx, dword [ebp - 0x430]
mov ecx, dword [ebp - 0x434]
shl ebx, 4
movzx ecx, word [ecx + ebx + 6]
cmp word [eax + 0x16], cx
jb 0x406330
mov dword [ebp - 0x218], edx
add eax, 0x10
mov dword [ebp - 0x430], edx
inc edx
cmp esi, edx
jne 0x406338
lea esi, cs:[esi]
nop
mov ecx, dword [ebp - 0x430]
mov ebx, dword [ebp - 0x444]
test byte [section..data], 8
jne 0x4064d4
shl ecx, 4
add ecx, dword [ebp - 0x434]
mov edx, 0x100
movzx eax, byte [ecx]
test al, al
cmove eax, edx
movzx edx, byte [ecx + 1]
mov ecx, 0x100
mov dword [esp], str._s_dx_d_apps
test dl, dl
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x44c]
cmove edx, ecx
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
call sym._heap_wprintf
mov dword [ebp - 0x430], eax
call sym._create_directories
mov ecx, dword [ebp - 0x440]
mov eax, dword [ebp - 0x430]
mov dword [esp], str._s_s.png
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call sym._heap_wprintf
mov edx, dword [ebp - 0x43c]
mov dword [ebp - 0x444], eax
mov eax, dword [edx]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], edx
call dword [eax + 0x14]
mov dword [ebp - 0x448], eax
sub esp, 0x14
test eax, eax
js 0x406464
mov ecx, dword [ebp - 0x444]
mov edx, dword [ebp - 0x450]
mov eax, dword [ebp - 0x43c]
call sym._convert_to_native_icon.constprop.0
mov dword [ebp - 0x448], eax
mov eax, dword [ebp - 0x430]
mov dword [esp], eax
mov eax, dword [ebp - 0x438]
call eax
mov ecx, dword [ebp - 0x444]
mov eax, dword [ebp - 0x438]
mov dword [esp], ecx
call eax
jmp 0x406221
movzx eax, word [edi + 6]
mov dword [esp + 0x1c], eax
movzx eax, byte [edi + 1]
mov dword [esp + 0x18], eax
movzx eax, byte [edi]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.__d_:__d_x__d____d_n
mov dword [esp + 8], str.platform_write_icon
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x4061e3
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], str.Selected:__d_n
mov dword [esp + 8], str.platform_write_icon
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov ecx, dword [ebp - 0x218]
jmp 0x406399
test eax, eax
je 0x406931
shr eax, 0x10
je 0x406766
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x406779
movzx eax, word [ebx]
test ax, ax
je 0x4069cc
lea esi, cs:[esi]
nop
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x406550
mov ecx, 0x224c
lea edi, [ebp - 0xf6]
mov dword [ebp - 0x43c], ebx
mov esi, ebx
mov word [ebp - 0x218], cx
lea ecx, [ebp - 0x216]
mov dword [ebp - 0x438], edi
jmp 0x4065c4
cmp ax, 9
je 0x40684b
cmp ax, 0xa
jne 0x406869
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
lea edi, [edx - 1]
cmp ecx, dword [ebp - 0x438]
ja 0x4068f2
test edx, edx
jle 0x4068f2
movzx eax, word [esi]
mov edx, edi
add esi, 2
cmp ax, 0xd
je 0x40683a
jbe 0x406585
cmp ax, 0x22
je 0x4068ba
cmp ax, 0x5c
jne 0x40685c
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x4065a8
mov dword [ebp - 0x440], 0
test byte [section..data], 4
je 0x40629f
mov dword [esp + 0xc], str.GetFullPathName_failed_n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x40629f
test byte [section..data], 4
je 0x4062d3
mov eax, dword [ebp - 0x448]
mov dword [esp + 0xc], str.writing_icon_failed__error_0x_08lX_n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x4062d3
lea eax, [ebp - 0x420]
shr eax, 0x10
je 0x406a51
lea eax, [ebp - 0x420]
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 0x4067ea
movzx eax, word [ebp - 0x420]
test ax, ax
je 0x406a81
mov ecx, edx
lea edx, [edx + 1]
cmp word [ebp + ecx*2 - 0x41e], 0
jne 0x4066bd
mov edi, 0x224c
lea esi, [ebp - 0xf6]
mov dword [ebp - 0x438], ebx
lea edx, [ebp - 0x216]
mov word [ebp - 0x218], di
lea edi, [ebp - 0x420]
mov dword [ebp - 0x434], esi
jmp 0x406735
cmp ax, 9
je 0x40694c
cmp ax, 0xa
jne 0x40696a
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
lea esi, [ecx - 1]
cmp edx, dword [ebp - 0x434]
ja 0x4067b8
test ecx, ecx
jle 0x4067b8
movzx eax, word [edi]
mov ecx, esi
add edi, 2
cmp ax, 0xd
je 0x40693b
jbe 0x4066f9
cmp ax, 0x22
je 0x4069bb
cmp ax, 0x5c
jne 0x40695d
mov ebx, 0x5c5c
add edx, 2
mov word [edx - 2], bx
jmp 0x406719
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov edi, dword [ebp - 0x430]
mov dword [esp + 0x18], str._null_
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], str.path__s__index_d_destFilename__s__n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x406026
mov byte [edx], 0x22
mov ebx, dword [ebp - 0x438]
test esi, esi
jle 0x406a9a
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x218]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edi, dword [ebp - 0x430]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0xc], str.opening_icon__s_index__d_failed__hr0x_08lX_n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x438], eax
jmp 0x4062d3
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4065a8
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4065a8
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x406929
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x4065a8
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x4065a8
cmp word [esi], 0
je 0x406aa2
mov eax, esi
lea esi, cs:[esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4068e0
sub eax, esi
sar eax, 1
jmp 0x40614a
mov byte [ecx], 0x22
mov ebx, dword [ebp - 0x43c]
test edi, edi
jle 0x4069e5
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x218]
mov dword [esp], eax
call sym.___wine_dbg_strdup
jmp 0x406779
mov byte [ecx], al
inc ecx
jmp 0x4065a8
mov eax, str._null_
jmp 0x406779
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x406719
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x406719
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x406a79
mov esi, eax
mov byte [edx], 0x5c
add edx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [edx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdefGCC:__GNU__10.3.0]
and esi, 0xf
mov byte [edx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefGCC:__GNU__10.3.0]
mov byte [edx - 1], al
mov byte [edx - 2], bl
jmp 0x406719
mov esi, 0x225c
add edx, 2
mov word [edx - 2], si
jmp 0x406719
mov eax, 0x224c
mov byte [ebp - 0x216], 0x22
lea ecx, [ebp - 0x216]
mov word [ebp - 0x218], ax
lea eax, [ecx + 1]
jmp 0x406913
mov edi, dword [ebp - 0x44c]
lea ebx, [ebp - 0x218]
mov dword [esp + 8], 0
mov dword [esp + 0xc], ebx
mov dword [esp], edi
mov dword [esp + 4], 0x40dcc8
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
sub esp, 0x10
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_DeleteFileW]
mov eax, dword [sym.imp.ucrtbase.dll_free]
sub esp, 4
mov dword [esp], edi
mov dword [ebp - 0x438], eax
call eax
jmp 0x406279
xor ebx, ebx
jmp 0x406108
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
jmp 0x4062e1
lea eax, [ebp - 0x420]
mov dword [esp], str._04x
mov dword [ebp - 0x434], eax
movzx eax, word [ebp - 0x434]
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x4067ea
mov byte [edx], al
inc edx
jmp 0x406719
mov esi, 0x224c
mov byte [ebp - 0x216], 0x22
lea edx, [ebp - 0x216]
mov word [ebp - 0x218], si
lea eax, [edx + 1]
jmp 0x4067d9
xor eax, eax
jmp 0x40614a