Function at 0x405f20
Capabilities:
Access peb ldr_data
Delete file
Encode data using xor
Get common file path
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
sub esp, 0x47c
mov dword [ebp - 0x43c], edx
mov dword [ebp - 0x434], 0
mov dword [ebp - 0x430], 0
test byte [section..data], 8
jne 0x4064ff
lea eax, [ebp - 0x428]
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]
sub eax, 1
sub esp, 0x10
cmp eax, 0x103
ja 0x4065ed
lea eax, [ebp - 0x42c]
mov edx, dword [ebp - 0x43c]
mov ecx, edi
mov dword [esp + 8], eax
lea eax, [ebp - 0x430]
mov dword [esp + 4], eax
lea eax, [ebp - 0x434]
mov dword [esp], eax
lea eax, [ebp - 0x428]
call fcn.00405610
mov ebx, eax
test eax, eax
js 0x406227
mov eax, dword [ebp - 0x42c]
movzx edx, word [ebp - 0x428]
mov dword [ebp - 0x444], eax
mov eax, dword [ebp - 0x430]
mov dword [ebp - 0x440], eax
mov eax, dword [ebp - 0x434]
mov dword [ebp - 0x448], eax
test dx, dx
je 0x406a4f
lea edi, [ebp - 0x426]
xor eax, eax
lea esi, [esi]
mov ecx, 0x10
lea esi, [esi]
mov esi, edx
xor esi, eax
shr ax, 1
mov ebx, eax
xor bx, 0xa001
and esi, 1
cmovne eax, ebx
shr dx, 1
sub ecx, 1
jne 0x406010
movzx edx, word [edi]
add edi, 2
test dx, dx
jne 0x406008
movzx edi, ax
lea eax, [ebp - 0x428]
mov esi, dword [sym.imp.ucrtbase.dll_wcsrchr]
mov dword [esp + 4], 0x5c
mov dword [esp], eax
call esi
mov dword [esp + 4], 0x2e
test eax, eax
lea ebx, [eax + 2]
lea eax, [ebp - 0x428]
cmove ebx, eax
mov dword [esp], ebx
call esi
mov edx, eax
sub eax, ebx
sar eax, 1
test edx, edx
je 0x4068c3
mov ecx, dword [ebp - 0x43c]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 0x10], ecx
mov dword [esp + 4], edi
mov dword [esp], str._04X__.s._d
call fcn.004018f0
mov dword [esp + 4], str.c:proton_shortcutsicons
mov dword [esp], 0x40d430
mov dword [ebp - 0x44c], eax
call fcn.004018f0
mov dword [ebp - 0x45c], eax
call section..text
mov esi, dword [ebp - 0x444]
test esi, esi
jle 0x4069e7
lea eax, [ebp - 0x220]
mov edi, dword [ebp - 0x440]
xor ebx, ebx
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x460], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x444], eax
mov eax, dword fs:[0x18]
mov dword [ebp - 0x454], eax
lea esi, [esi]
lea esi, [esi]
mov dword [ebp - 0x220], ebx
test byte [section..data], 8
jne 0x406488
test ebx, ebx
je 0x4062d0
movzx ecx, byte [edi]
mov eax, dword [ebp - 0x440]
xor edx, edx
mov byte [ebp - 0x43c], cl
jmp 0x40614e
add edx, 1
add eax, 0x10
cmp edx, ebx
je 0x4062d0
movzx ecx, byte [ebp - 0x43c]
cmp byte [eax], cl
jne 0x406140
movzx ecx, byte [edi + 1]
cmp byte [eax + 1], cl
jne 0x406140
add ebx, 1
add edi, 0x10
cmp esi, ebx
jg 0x406110
mov edi, dword [ebp - 0x460]
mov esi, dword [ebp - 0x45c]
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]
sub esp, 4
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
mov eax, dword [ebp - 0x444]
call eax
mov eax, dword [ebp - 0x458]
sub esp, 0xc
test eax, eax
js 0x40662d
mov eax, dword [ebp - 0x434]
test eax, eax
je 0x4061ed
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov edx, dword [ebp - 0x430]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x444]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x44c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x44c], 0
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x444], eax
test byte [section..data], 4
jne 0x40666d
mov eax, dword [ebp - 0x434]
test eax, eax
jne 0x406a56
mov edx, dword [ebp - 0x430]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x444]
call eax
mov edi, dword [ebp - 0x44c]
sub esp, 0xc
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x444]
call eax
mov dword [ebp - 0x44c], 0
mov eax, dword [ebp - 0x44c]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
add ebx, 1
mov ecx, dword [ebp - 0x220]
mov eax, edi
mov edx, ebx
cmp esi, ebx
jle 0x40634c
mov dword [ebp - 0x43c], ecx
mov dword [ebp - 0x450], ebx
jmp 0x4062fa
add edx, 1
add eax, 0x10
cmp esi, edx
je 0x406340
movzx ebx, byte [edi]
cmp byte [eax + 0x10], bl
jne 0x4062f0
movzx ebx, byte [edi + 1]
cmp byte [eax + 0x11], bl
jne 0x4062f0
mov ebx, dword [ebp - 0x43c]
mov ecx, dword [ebp - 0x440]
shl ebx, 4
movzx ecx, word [ecx + ebx + 6]
cmp word [eax + 0x16], cx
jb 0x4062f0
mov dword [ebp - 0x220], edx
add eax, 0x10
mov dword [ebp - 0x43c], edx
add edx, 1
cmp esi, edx
jne 0x4062fa
lea esi, [esi]
nop
mov ecx, dword [ebp - 0x43c]
mov ebx, dword [ebp - 0x450]
test byte [section..data], 8
jne 0x4064cc
shl ecx, 4
add ecx, dword [ebp - 0x440]
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 - 0x45c]
cmove edx, ecx
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
call fcn.004018f0
mov dword [ebp - 0x43c], eax
call section..text
mov ecx, dword [ebp - 0x44c]
mov eax, dword [ebp - 0x43c]
mov dword [esp], str._s_s.png
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call fcn.004018f0
mov edx, dword [ebp - 0x448]
mov dword [ebp - 0x450], 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 - 0x458], eax
sub esp, 0x14
test eax, eax
js 0x406424
mov ecx, dword [ebp - 0x450]
mov edx, dword [ebp - 0x460]
mov eax, dword [ebp - 0x448]
call fcn.00403de0
mov dword [ebp - 0x458], eax
mov eax, dword [ebp - 0x43c]
mov dword [esp + 4], 0
mov ecx, dword [ebp - 0x444]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x454]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ecx
mov edx, dword [ebp - 0x450]
mov eax, dword [ebp - 0x454]
sub esp, 0xc
mov ecx, dword [ebp - 0x444]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ecx
sub esp, 0xc
jmp 0x406165
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 fcn.004014e0
jmp 0x406123
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 fcn.004014e0
mov ecx, dword [ebp - 0x220]
jmp 0x406359
test eax, eax
je 0x40692b
shr eax, 0x10
je 0x40675a
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x40676f
cmp word [ebx], 0
je 0x4069c6
lea esi, [esi]
nop
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x406540
mov ecx, 0x224c
lea eax, [ebp - 0xfe]
mov dword [ebp - 0x444], ebx
mov esi, ebx
mov word [ebp - 0x220], cx
lea ecx, [ebp - 0x21e]
mov dword [ebp - 0x448], edi
mov dword [ebp - 0x440], eax
jmp 0x4065b9
cmp ax, 9
je 0x406843
cmp ax, 0xa
jne 0x406861
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
nop
lea eax, [edx - 1]
cmp ecx, dword [ebp - 0x440]
ja 0x4068e2
test edx, edx
jle 0x4068e2
mov edx, eax
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x406832
jbe 0x40657b
cmp ax, 0x22
je 0x4068b2
cmp ax, 0x5c
jne 0x406854
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x4065a0
mov dword [ebp - 0x44c], 0
test byte [section..data], 4
je 0x406219
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 fcn.004014e0
jmp 0x406219
test byte [section..data], 4
je 0x406249
mov eax, dword [ebp - 0x458]
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 fcn.004014e0
jmp 0x406249
lea eax, [ebp - 0x428]
shr eax, 0x10
je 0x406a66
lea eax, [ebp - 0x428]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, str._invalid_
sub esp, 8
test eax, eax
jne 0x4067e2
cmp word [ebp - 0x428], 0
je 0x406a9a
mov ecx, eax
lea eax, [eax + 1]
cmp word [ebp + ecx*2 - 0x426], 0
jne 0x4066b1
mov edi, 0x224c
lea eax, [ebp - 0xfe]
mov dword [ebp - 0x444], ebx
lea edx, [ebp - 0x21e]
mov word [ebp - 0x220], di
lea esi, [ebp - 0x428]
mov dword [ebp - 0x440], eax
jmp 0x406726
cmp ax, 9
je 0x406946
cmp ax, 0xa
jne 0x406964
mov eax, 0x6e5c
add edx, 2
mov word [edx - 2], ax
lea eax, [ecx - 1]
cmp edx, dword [ebp - 0x440]
ja 0x4067ae
test ecx, ecx
jle 0x4067ae
mov ecx, eax
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x406935
jbe 0x4066ed
cmp ax, 0x22
je 0x4069b5
cmp ax, 0x5c
jne 0x406957
mov ebx, 0x5c5c
add edx, 2
mov word [edx - 2], bx
jmp 0x40670d
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401420
mov edx, eax
mov eax, dword [ebp - 0x43c]
mov dword [esp + 0x18], str._null_
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
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 fcn.004014e0
jmp 0x405f57
mov byte [edx], 0x22
mov ebx, dword [ebp - 0x444]
test eax, eax
jle 0x406ab3
mov ecx, 0x2e2e
mov byte [edx + 3], 0x2e
lea eax, [edx + 4]
mov word [edx + 1], cx
mov byte [eax], 0
lea eax, [ebp - 0x220]
mov dword [esp], eax
call fcn.0040b160
mov edx, eax
mov eax, dword [ebp - 0x43c]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
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 fcn.004014e0
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x44c], 0
mov dword [ebp - 0x444], eax
jmp 0x406249
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4065a0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x4065a0
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x406921
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefxmalloc]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefxmalloc]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefxmalloc]
and edi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefxmalloc]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x4065a0
mov edi, 0x225c
add ecx, 2
mov word [ecx - 2], di
jmp 0x4065a0
cmp word [ebx], 0
je 0x406abb
mov eax, ebx
nop
add eax, 2
cmp word [eax], 0
jne 0x4068d0
sub eax, ebx
sar eax, 1
jmp 0x40607c
mov ebx, dword [ebp - 0x444]
mov edi, dword [ebp - 0x448]
mov byte [ecx], 0x22
test eax, eax
jle 0x4069df
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x220]
mov dword [esp], eax
call fcn.0040b160
mov edx, eax
jmp 0x40676f
mov byte [ecx], al
add ecx, 1
jmp 0x4065a0
mov edx, str._null_
jmp 0x40676f
mov eax, 0x725c
add edx, 2
mov word [edx - 2], ax
jmp 0x40670d
mov eax, 0x745c
add edx, 2
mov word [edx - 2], ax
jmp 0x40670d
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x406a90
mov edi, eax
mov byte [edx], 0x5c
add edx, 5
shr di, 0xc
movzx edi, di
movzx ebx, byte [edi + str.0123456789abcdefxmalloc]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [edx - 4], bl
movzx ebx, byte [edi + str.0123456789abcdefxmalloc]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + str.0123456789abcdefxmalloc]
and edi, 0xf
mov byte [edx - 3], bl
movzx ebx, byte [edi + str.0123456789abcdefxmalloc]
mov byte [edx - 1], al
mov byte [edx - 2], bl
jmp 0x40670d
mov edi, 0x225c
add edx, 2
mov word [edx - 2], di
jmp 0x40670d
mov eax, 0x224c
mov byte [ebp - 0x21e], 0x22
lea ecx, [ebp - 0x21e]
mov word [ebp - 0x220], ax
lea eax, [ecx + 1]
jmp 0x406909
mov edi, dword [ebp - 0x45c]
lea ebx, [ebp - 0x220]
mov dword [esp + 8], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0x40dcc8
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
sub esp, 0x10
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x444], eax
call eax
sub esp, 0xc
jmp 0x4061d8
xor edi, edi
jmp 0x40603a
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
jmp 0x406257
lea eax, [ebp - 0x428]
mov dword [esp], str._04x
mov dword [ebp - 0x440], eax
movzx eax, word [ebp - 0x440]
mov dword [esp + 4], eax
call fcn.00401420
mov edx, eax
jmp 0x4067e2
mov byte [edx], al
add edx, 1
jmp 0x40670d
mov esi, 0x224c
mov byte [ebp - 0x21e], 0x22
lea edx, [ebp - 0x21e]
mov word [ebp - 0x220], si
lea eax, [edx + 1]
jmp 0x4067cf
xor eax, eax
jmp 0x40607c