Function at 0x405ae0
Capabilities:
Delete file
Get common file path
Terminate process

Disassembly:
push edi
lea edi, [esp + 8]
and esp, 0xfffffff8
push dword [edi - 4]
push ebp
mov ebp, esp
push edi
push esi
mov esi, ecx
push ebx
mov ebx, eax
sub esp, 0x474
mov dword [ebp - 0x434], edx
mov edi, dword [edi]
mov dword [ebp - 0x42c], 0
mov dword [ebp - 0x428], 0
test byte [0x40d014], 8
jne 0x405db6
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x420]
mov dword [esp + 4], 0x104
mov dword [esp + 8], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetFullPathNameW]
sub eax, 1
sub esp, 0x10
cmp eax, 0x103
ja 0x405e76
lea eax, [ebp - 0x424]
mov ecx, edi
mov dword [esp + 8], eax
lea eax, [ebp - 0x428]
mov dword [esp + 4], eax
lea eax, [ebp - 0x42c]
mov dword [esp], eax
mov edx, dword [ebp - 0x434]
lea eax, [ebp - 0x420]
call fcn.004058b0
test eax, eax
mov ebx, eax
js 0x405d4c
mov eax, dword [ebp - 0x424]
mov edi, dword [ebp - 0x428]
mov dword [ebp - 0x430], eax
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x450], eax
test esi, esi
je 0x406173
cmp word [esi], 0
je 0x406239
mov eax, esi
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x405bc8
sub eax, esi
add eax, 2
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x454], eax
test eax, eax
je 0x4062ab
mov ecx, dword [ebp - 0x454]
xor eax, eax
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x405bf8
mov eax, dword [0x41b228]
mov dword [esp], str._siconshicolor
mov dword [esp + 4], eax
call fcn.00403040
mov edx, dword [ebp - 0x430]
mov dword [ebp - 0x45c], eax
test edx, edx
jle 0x406243
mov eax, dword [sym.imp.ucrtbase.dll_free]
xor edx, edx
mov dword [ebp - 0x43c], edi
mov dword [ebp - 0x434], 0
mov esi, edx
mov dword [ebp - 0x458], eax
mov dword [ebp - 0x44c], esi
mov dword [ebp - 0x218], esi
mov dword [ebp - 0x440], edi
test byte [0x40d014], 8
jne 0x4060f8
test esi, esi
je 0x405f48
movzx ecx, byte [edi]
xor edx, edx
mov eax, dword [ebp - 0x43c]
jmp 0x405c96
add edx, 1
add eax, 0x10
cmp edx, esi
je 0x405f48
cmp byte [eax], cl
jne 0x405c88
movzx ebx, byte [edi + 1]
cmp byte [eax + 1], bl
jne 0x405c88
lea eax, [esi + 1]
mov dword [ebp - 0x438], eax
mov esi, dword [ebp - 0x438]
add edi, 0x10
cmp dword [ebp - 0x430], esi
jg 0x405c50
lea eax, [ebp - 0x218]
mov edi, dword [ebp - 0x43c]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x40fb7e
mov ebx, dword [ebp - 0x45c]
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
lea eax, [ebp - 0x218]
sub esp, 0x10
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov dword [esp], ebx
mov eax, dword [ebp - 0x458]
call eax
mov eax, dword [ebp - 0x434]
test eax, eax
js 0x40618f
mov eax, dword [ebp - 0x42c]
test eax, eax
je 0x405d2f
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov dword [esp], edi
mov eax, dword [ebp - 0x458]
call eax
mov eax, dword [ebp - 0x454]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
mov edi, dword [ebp - 0x428]
test byte [0x40d014], 4
jne 0x405eac
mov dword [ebp - 0x454], 0
mov eax, dword [ebp - 0x42c]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x458], ebx
test eax, eax
je 0x4061cb
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov dword [esp], edi
mov eax, dword [ebp - 0x458]
call eax
mov eax, dword [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [ebp - 0x458]
call eax
mov dword [ebp - 0x454], 0
jmp 0x405d3a
test ecx, ecx
je 0x4061df
mov eax, ecx
shr eax, 0x10
test eax, eax
je 0x405f28
mov dword [esp + 4], 0xffffffff
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov dword [ebp - 0x430], str._invalid_
sub esp, 8
test eax, eax
jne 0x405dfa
mov eax, esi
call fcn.00402980
mov dword [ebp - 0x430], eax
test ebx, ebx
je 0x4061ee
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x4061b6
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, str._invalid_
test edx, edx
jne 0x405e35
mov eax, ebx
call fcn.00402980
mov ecx, dword [ebp - 0x430]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x434]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.path__s__index_d_destFilename__s__n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 0x14], ecx
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x405b24
test byte [0x40d014], 4
je 0x405daa
mov dword [esp + 0xc], str.GetFullPathName_failed_n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 4], 0x40d014
mov dword [esp], 2
call fcn.00402c50
jmp 0x405daa
lea eax, [ebp - 0x420]
shr eax, 0x10
test eax, eax
je 0x406290
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 0x405eed
lea eax, [ebp - 0x420]
call fcn.00402980
mov dword [esp + 0x18], ebx
mov ebx, dword [ebp - 0x434]
mov dword [esp + 0x10], 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 + 0x14], ebx
mov dword [esp + 4], 0x40d014
mov dword [esp], 2
call fcn.00402c50
jmp 0x405d5f
mov dword [esp + 4], ecx
mov dword [esp], str._04x
call fcn.00402b40
mov dword [ebp - 0x430], eax
jmp 0x405dfa
lea edx, [esi + 1]
cmp dword [ebp - 0x430], edx
mov dword [ebp - 0x438], edx
jle 0x406020
movzx ebx, byte [edi]
mov eax, esi
xor esi, esi
mov dword [ebp - 0x444], eax
mov eax, esi
mov ecx, dword [ebp - 0x43c]
mov byte [ebp - 0x445], al
mov byte [ebp - 0x434], bl
jmp 0x405f8b
add edx, 1
cmp dword [ebp - 0x430], edx
je 0x405ff0
mov eax, edx
movzx ebx, byte [ebp - 0x434]
shl eax, 4
cmp byte [ecx + eax], bl
jne 0x405f80
movzx ebx, byte [edi + 1]
cmp byte [ecx + eax + 1], bl
jne 0x405f80
mov ebx, dword [ebp - 0x444]
mov esi, ebx
shl esi, 4
movzx esi, word [ecx + esi + 6]
cmp word [ecx + eax + 6], si
mov eax, 1
movzx esi, byte [ebp - 0x445]
cmovae ebx, edx
cmovae esi, eax
add edx, 1
mov dword [ebp - 0x444], ebx
mov eax, esi
mov byte [ebp - 0x445], al
cmp dword [ebp - 0x430], edx
jne 0x405f8b
lea esi, [esi]
lea esi, [esi]
movzx ebx, byte [ebp - 0x445]
mov eax, dword [ebp - 0x444]
test bl, bl
je 0x406020
mov ebx, dword [ebp - 0x43c]
mov edx, eax
mov dword [ebp - 0x218], eax
shl edx, 4
mov dword [ebp - 0x44c], eax
add ebx, edx
mov dword [ebp - 0x440], ebx
test byte [0x40d014], 8
jne 0x406140
mov ebx, dword [ebp - 0x440]
mov ecx, 0x100
movzx eax, byte [ebx]
movzx edx, byte [ebx + 1]
test al, al
cmove eax, ecx
test dl, dl
cmove edx, ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x45c]
mov dword [esp], str._s_dx_d_apps
mov dword [esp + 4], eax
call fcn.00403040
mov ebx, eax
call fcn.004027f0
mov eax, dword [ebp - 0x454]
mov dword [esp + 4], ebx
mov dword [esp], str._s_s.png
mov dword [esp + 8], eax
call fcn.00403040
mov ecx, dword [ebp - 0x450]
mov esi, eax
mov eax, dword [ecx]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], ecx
call dword [eax + 0x14]
sub esp, 0x14
test eax, eax
mov dword [ebp - 0x434], eax
js 0x4060de
mov eax, dword [ebp - 0x450]
lea edx, [ebp - 0x218]
mov ecx, esi
call fcn.00404730
mov dword [ebp - 0x434], eax
mov dword [esp], ebx
mov ebx, dword [ebp - 0x458]
call ebx
mov dword [esp], esi
call ebx
jmp 0x405cac
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], esi
mov dword [esp + 0xc], str.__d_:__d_x__d____d_n
mov dword [esp + 8], str.platform_write_icon
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
call fcn.00402c50
jmp 0x405c6f
mov eax, dword [ebp - 0x44c]
mov dword [esp + 0xc], str.Selected:__d_n
mov dword [esp + 8], str.platform_write_icon
mov dword [esp + 4], 0x40d014
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.00402c50
jmp 0x40602d
mov eax, dword [ebp - 0x434]
lea edx, [ebp - 0x420]
call fcn.00403100
mov dword [ebp - 0x454], eax
jmp 0x405c08
test byte [0x40d014], 4
jne 0x4061f8
mov eax, dword [ebp - 0x42c]
test eax, eax
jne 0x405d83
mov dword [esp], edi
mov eax, dword [ebp - 0x458]
call eax
jmp 0x405d99
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.00402b40
jmp 0x405e35
mov dword [esp], edi
call ebx
mov dword [ebp - 0x454], 0
jmp 0x405d99
mov dword [ebp - 0x430], str._null_
jmp 0x405dfa
mov eax, str._null_
jmp 0x405e35
mov eax, dword [ebp - 0x434]
mov dword [esp + 0xc], str.writing_icon_failed__error_0x_08lX_n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 4], 0x40d014
mov dword [esp], 2
mov dword [esp + 0x10], eax
call fcn.00402c50
mov eax, dword [ebp - 0x42c]
test eax, eax
jne 0x405d83
jmp 0x4061a6
mov eax, 2
jmp 0x405bd6
lea ebx, [ebp - 0x218]
mov dword [esp + 8], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0x40fb7e
mov esi, dword [ebp - 0x45c]
mov dword [esp], esi
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], esi
mov dword [ebp - 0x458], eax
call eax
jmp 0x405d1a
lea eax, [ebp - 0x420]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00402b40
jmp 0x405eed
test byte [0x40d014], 2
jne 0x4062c1
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 0xc], str.out_of_memory_n
mov dword [esp + 8], str.xmalloc
mov dword [esp + 4], 0x40d014
mov dword [esp], 1
call fcn.00402c50
jmp 0x4062b4