Function at 0x406180
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, 0x46c
mov dword [ebp - 0x430], edx
mov edi, dword [edi]
mov dword [ebp - 0x42c], 0
mov dword [ebp - 0x428], 0
test byte [section..data], 8
jne 0x40646d
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 0x40652d
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 - 0x430]
lea eax, [ebp - 0x420]
call fcn.00405b00
mov edi, dword [ebp - 0x428]
test eax, eax
mov ebx, eax
js 0x4063f9
mov eax, dword [ebp - 0x424]
mov dword [ebp - 0x434], eax
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x43c], eax
test esi, esi
je 0x40681b
cmp word [esi], 0
je 0x4068e1
mov eax, esi
lea esi, cs:[esi]
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x406270
sub eax, esi
add eax, 2
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x448], eax
test eax, eax
je 0x406953
mov ecx, dword [ebp - 0x448]
xor eax, eax
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x4062a0
mov eax, dword [0x41a208]
mov dword [esp], str._siconshicolor
mov dword [esp + 4], eax
call fcn.00401950
mov edx, dword [ebp - 0x434]
mov dword [ebp - 0x454], eax
test edx, edx
jle 0x4068eb
mov eax, dword [sym.imp.ucrtbase.dll_free]
xor edx, edx
mov esi, edi
mov dword [ebp - 0x440], 0
mov ebx, edx
mov dword [ebp - 0x450], eax
lea esi, [esi]
mov dword [ebp - 0x444], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x438], esi
test byte [section..data], 8
jne 0x4067a0
test ebx, ebx
je 0x406600
movzx ecx, byte [esi]
mov eax, edi
xor edx, edx
mov byte [ebp - 0x430], cl
jmp 0x40634e
add edx, 1
add eax, 0x10
cmp edx, ebx
je 0x406600
movzx ecx, byte [ebp - 0x430]
cmp byte [eax], cl
jne 0x406340
movzx ecx, byte [esi + 1]
cmp byte [eax + 1], cl
jne 0x406340
lea eax, [ebx + 1]
mov dword [ebp - 0x430], eax
mov ebx, dword [ebp - 0x430]
add esi, 0x10
cmp dword [ebp - 0x434], ebx
jg 0x4062f8
lea eax, [ebp - 0x218]
mov dword [esp + 8], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x40ee02
mov esi, dword [ebp - 0x454]
mov dword [esp], esi
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], esi
mov eax, dword [ebp - 0x450]
call eax
mov eax, dword [ebp - 0x440]
test eax, eax
js 0x406837
mov eax, dword [ebp - 0x42c]
test eax, eax
je 0x4063ec
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov dword [esp], edi
mov eax, dword [ebp - 0x450]
call eax
jmp 0x40645b
test byte [section..data], 4
jne 0x406563
mov dword [ebp - 0x448], 0
mov eax, dword [ebp - 0x42c]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x450], esi
test eax, eax
je 0x406873
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov dword [esp], edi
mov eax, dword [ebp - 0x450]
call eax
mov eax, dword [ebp - 0x448]
mov dword [esp], eax
mov eax, dword [ebp - 0x450]
call eax
mov dword [ebp - 0x448], 0
mov eax, dword [ebp - 0x448]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
lea esp, [edi - 8]
pop edi
ret
test ecx, ecx
je 0x406887
mov eax, ecx
shr eax, 0x10
test eax, eax
je 0x4065df
mov dword [esp + 4], 0xffffffff
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
mov dword [ebp - 0x434], str._invalid_
test eax, eax
jne 0x4064b1
mov eax, esi
call fcn.00401280
mov dword [ebp - 0x434], eax
test ebx, ebx
je 0x406896
mov eax, ebx
shr eax, 0x10
test eax, eax
je 0x40685e
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 0x4064ec
mov eax, ebx
call fcn.00401280
mov ecx, dword [ebp - 0x434]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x430]
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], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x4061c4
test byte [section..data], 4
je 0x406451
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.00401550
jmp 0x406451
lea eax, [ebp - 0x420]
shr eax, 0x10
test eax, eax
je 0x406938
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 0x4065a4
lea eax, [ebp - 0x420]
call fcn.00401280
mov dword [esp + 0x18], ebx
mov esi, dword [ebp - 0x430]
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], esi
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
call fcn.00401550
jmp 0x406406
mov dword [esp + 4], ecx
mov dword [esp], str._04x
call fcn.00401440
mov dword [ebp - 0x434], eax
jmp 0x4064b1
lea eax, [ebx + 1]
cmp dword [ebp - 0x434], eax
mov dword [ebp - 0x430], eax
jle 0x4066b8
movzx ecx, byte [esi]
mov byte [ebp - 0x449], 0
mov dword [ebp - 0x440], ebx
jmp 0x40664b
add eax, 1
cmp dword [ebp - 0x434], eax
je 0x406690
mov edx, eax
shl edx, 4
cmp byte [edi + edx], cl
jne 0x406640
movzx ebx, byte [esi + 1]
cmp byte [edi + edx + 1], bl
jne 0x406640
mov ebx, dword [ebp - 0x440]
shl ebx, 4
movzx ebx, word [edi + ebx + 6]
cmp word [edi + edx + 6], bx
jb 0x406640
mov dword [ebp - 0x440], eax
add eax, 1
mov byte [ebp - 0x449], 1
cmp dword [ebp - 0x434], eax
jne 0x40664b
lea esi, [esi]
cmp byte [ebp - 0x449], 0
mov ebx, dword [ebp - 0x440]
je 0x4066b8
mov eax, ebx
mov dword [ebp - 0x218], ebx
shl eax, 4
mov dword [ebp - 0x444], ebx
add eax, edi
mov dword [ebp - 0x438], eax
test byte [section..data], 8
jne 0x4067e8
mov ecx, dword [ebp - 0x438]
mov ebx, 0x100
movzx eax, byte [ecx]
movzx edx, byte [ecx + 1]
test al, al
cmove eax, ebx
test dl, dl
cmove edx, ebx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x454]
mov dword [esp], str._s_dx_d_apps
mov dword [esp + 4], eax
call fcn.00401950
mov ebx, eax
call fcn.00401090
mov eax, dword [ebp - 0x448]
mov dword [esp + 4], ebx
mov dword [esp], str._s_s.png
mov dword [esp + 8], eax
call fcn.00401950
mov edx, dword [ebp - 0x43c]
mov dword [ebp - 0x438], 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]
sub esp, 0x14
test eax, eax
mov dword [ebp - 0x440], eax
js 0x406780
lea eax, [ebp - 0x218]
mov ecx, dword [ebp - 0x438]
mov edx, eax
mov eax, dword [ebp - 0x43c]
call fcn.00404980
mov dword [ebp - 0x440], eax
mov dword [esp], ebx
mov ebx, dword [ebp - 0x450]
call ebx
mov eax, dword [ebp - 0x438]
mov dword [esp], eax
call ebx
jmp 0x40636b
movzx eax, word [esi + 6]
mov dword [esp + 0x1c], eax
movzx eax, byte [esi + 1]
mov dword [esp + 0x18], eax
movzx eax, byte [esi]
mov dword [esp + 0x10], ebx
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], 0x40c000
mov dword [esp], 3
call fcn.00401550
jmp 0x406317
mov eax, dword [ebp - 0x444]
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
mov dword [esp + 0x10], eax
call fcn.00401550
jmp 0x4066c5
mov eax, dword [ebp - 0x430]
lea edx, [ebp - 0x420]
call fcn.00401a10
mov dword [ebp - 0x448], eax
jmp 0x4062b0
test byte [section..data], 4
jne 0x4068a0
mov eax, dword [ebp - 0x42c]
test eax, eax
jne 0x40642a
mov dword [esp], edi
mov eax, dword [ebp - 0x450]
call eax
jmp 0x406440
mov dword [esp + 4], ebx
mov dword [esp], str._04x
call fcn.00401440
jmp 0x4064ec
mov dword [esp], edi
call esi
mov dword [ebp - 0x448], 0
jmp 0x406440
mov dword [ebp - 0x434], str._null_
jmp 0x4064b1
mov eax, str._null_
jmp 0x4064ec
mov eax, dword [ebp - 0x440]
mov dword [esp + 0xc], str.writing_icon_failed__error_0x_08lX_n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 4], 0x40c000
mov dword [esp], 2
mov dword [esp + 0x10], eax
call fcn.00401550
mov eax, dword [ebp - 0x42c]
test eax, eax
jne 0x40642a
jmp 0x40684e
mov eax, 2
jmp 0x40627e
lea ebx, [ebp - 0x218]
mov dword [esp + 8], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0x40ee02
mov esi, dword [ebp - 0x454]
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 - 0x450], eax
call eax
jmp 0x4063d7
lea eax, [ebp - 0x420]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401440
jmp 0x4065a4
test byte [section..data], 2
jne 0x406969
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], 0x40c000
mov dword [esp], 1
call fcn.00401550
jmp 0x40695c