Function at 0x406380
Capabilities:
Access peb ldr_data
Delete file
Get common file path
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, ecx
push ebx
mov ebx, eax
sub esp, 0x47c
mov dword [ebp - 0x440], edx
mov dword [ebp - 0x434], 0
mov dword [ebp - 0x430], 0
test byte [section..data], 8
jne 0x406695
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 0x406742
lea eax, [ebp - 0x42c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x430]
mov dword [esp + 4], eax
lea eax, [ebp - 0x434]
mov dword [esp], eax
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x428]
mov edx, dword [ebp - 0x440]
call fcn.00405c40
mov ebx, eax
test eax, eax
js 0x406608
mov eax, dword [ebp - 0x42c]
mov edi, dword [ebp - 0x430]
mov dword [ebp - 0x43c], eax
mov eax, dword [ebp - 0x434]
mov dword [ebp - 0x458], eax
test esi, esi
je 0x406a7b
cmp word [esi], 0
je 0x406b2c
mov eax, esi
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x406460
sub eax, esi
add eax, 2
call fcn.00401590
mov dword [ebp - 0x45c], eax
mov ecx, eax
xor eax, eax
lea esi, [esi]
movzx edx, word [esi + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x406480
mov eax, dword [0x419208]
mov dword [esp], str._siconshicolor
mov dword [esp + 4], eax
call fcn.00401ae0
mov edx, dword [ebp - 0x43c]
mov dword [ebp - 0x464], eax
test edx, edx
jle 0x406b36
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
xor edx, edx
mov ebx, edi
mov dword [ebp - 0x44c], 0
mov esi, edx
mov dword [ebp - 0x460], eax
lea esi, [esi]
mov dword [ebp - 0x454], esi
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x448], edi
test byte [section..data], 8
jne 0x406a00
test esi, esi
je 0x4067fe
mov dword [ebp - 0x440], ebx
movzx ecx, byte [edi]
mov eax, ebx
xor edx, edx
jmp 0x40651e
add edx, 1
add eax, 0x10
cmp esi, edx
je 0x4067f8
cmp byte [eax], cl
jne 0x406510
movzx ebx, byte [edi + 1]
cmp byte [eax + 1], bl
jne 0x406510
lea eax, [esi + 1]
mov ebx, dword [ebp - 0x440]
mov dword [ebp - 0x444], eax
mov esi, dword [ebp - 0x444]
add edi, 0x10
cmp dword [ebp - 0x43c], esi
jg 0x4064d8
lea eax, [ebp - 0x220]
mov dword [esp + 8], 0
mov edi, ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0x40ddfe
mov ebx, dword [ebp - 0x464]
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
lea eax, [ebp - 0x220]
sub esp, 0x10
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov dword [esp + 8], ebx
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 - 0x460]
call eax
mov eax, dword [ebp - 0x44c]
sub esp, 0xc
test eax, eax
js 0x406a97
mov eax, dword [ebp - 0x434]
test eax, eax
je 0x4065d4
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
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 [ebp - 0x460]
call eax
sub esp, 0xc
mov eax, dword [ebp - 0x45c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [ebp - 0x430]
test byte [section..data], 4
jne 0x40675e
mov dword [ebp - 0x45c], 0
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x460], eax
mov eax, dword [ebp - 0x434]
test eax, eax
jne 0x406b9e
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 - 0x460]
call eax
mov edi, dword [ebp - 0x45c]
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 - 0x460]
call eax
sub esp, 0xc
jmp 0x40674f
test ecx, ecx
je 0x406b18
mov eax, ecx
shr eax, 0x10
je 0x4067d8
mov dword [esp + 4], 0xffffffff
mov edi, str._invalid_
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x4066ce
mov eax, esi
call fcn.00401250
mov edi, eax
test ebx, ebx
je 0x406b22
mov eax, ebx
shr eax, 0x10
je 0x406b00
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 0x406707
mov eax, ebx
call fcn.00401250
mov dword [esp + 0x18], edi
mov edi, dword [ebp - 0x440]
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 fcn.00401540
jmp 0x4063b7
test byte [section..data], 4
jne 0x406ad7
mov dword [ebp - 0x45c], 0
jmp 0x4065fa
lea eax, [ebp - 0x428]
shr eax, 0x10
je 0x406bae
lea eax, [ebp - 0x428]
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 0x40679d
lea eax, [ebp - 0x428]
call fcn.00401250
mov dword [esp + 0x18], ebx
mov ebx, dword [ebp - 0x440]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
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.00401540
jmp 0x40661b
movzx eax, cx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
mov edi, eax
jmp 0x4066ce
mov ebx, dword [ebp - 0x440]
lea edx, [esi + 1]
mov dword [ebp - 0x444], edx
cmp dword [ebp - 0x43c], edx
jle 0x4068c3
movzx eax, byte [edi]
xor ecx, ecx
mov dword [ebp - 0x450], esi
mov byte [ebp - 0x44c], cl
mov byte [ebp - 0x440], al
jmp 0x40683b
add edx, 1
cmp dword [ebp - 0x43c], edx
je 0x406898
mov eax, edx
movzx ecx, byte [ebp - 0x440]
shl eax, 4
cmp byte [ebx + eax], cl
jne 0x406830
movzx ecx, byte [edi + 1]
cmp byte [ebx + eax + 1], cl
jne 0x406830
mov ecx, dword [ebp - 0x450]
mov esi, ecx
shl esi, 4
movzx esi, word [ebx + esi + 6]
cmp word [ebx + eax + 6], si
mov eax, 1
cmovae ecx, edx
mov dword [ebp - 0x450], ecx
movzx ecx, byte [ebp - 0x44c]
cmovae ecx, eax
add edx, 1
mov byte [ebp - 0x44c], cl
cmp dword [ebp - 0x43c], edx
jne 0x40683b
lea esi, [esi]
movzx eax, byte [ebp - 0x44c]
test al, al
je 0x4068c3
mov eax, dword [ebp - 0x450]
mov edx, eax
mov dword [ebp - 0x220], eax
shl edx, 4
mov dword [ebp - 0x454], eax
lea ecx, [ebx + edx]
mov dword [ebp - 0x448], ecx
test byte [section..data], 8
jne 0x406a48
mov esi, dword [ebp - 0x448]
mov ecx, 0x100
movzx eax, byte [esi]
movzx esi, byte [esi + 1]
test al, al
mov edx, esi
cmove eax, ecx
movzx edx, dl
mov dword [ebp - 0x440], eax
mov eax, esi
test al, al
cmove edx, ecx
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x440]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x464]
mov dword [esp], str._s_dx_d_apps
mov dword [esp + 4], eax
call fcn.00401ae0
mov esi, eax
call fcn.00401020
mov eax, dword [ebp - 0x45c]
mov dword [esp + 4], esi
mov dword [esp], str._s_s.png
mov dword [esp + 8], eax
call fcn.00401ae0
mov edx, dword [ebp - 0x458]
mov dword [ebp - 0x440], 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 - 0x44c], eax
sub esp, 0x14
test eax, eax
js 0x40699e
lea eax, [ebp - 0x220]
mov ecx, dword [ebp - 0x440]
mov edx, eax
mov eax, dword [ebp - 0x458]
call fcn.00404ae0
mov dword [ebp - 0x44c], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov dword [ebp - 0x448], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov esi, dword [ebp - 0x460]
call esi
mov eax, dword [ebp - 0x440]
sub esp, 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword [ebp - 0x448]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
jmp 0x40653a
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 + 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.00401540
jmp 0x4064f7
mov eax, dword [ebp - 0x454]
mov dword [esp + 0xc], str.Selected:__d_n
mov dword [esp + 8], str.platform_write_icon
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x40c000
mov dword [esp], 3
call fcn.00401540
jmp 0x4068d0
mov eax, dword [ebp - 0x440]
lea edx, [ebp - 0x428]
call fcn.00401b90
mov dword [ebp - 0x45c], eax
jmp 0x406490
test byte [section..data], 4
je 0x406630
mov eax, dword [ebp - 0x44c]
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.00401540
jmp 0x406630
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.00401540
jmp 0x40674f
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x406707
mov edi, str._null_
jmp 0x4066ce
mov eax, str._null_
jmp 0x406707
mov eax, 2
jmp 0x40646e
lea ebx, [ebp - 0x220]
mov dword [esp + 8], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 4], 0x40ddfe
mov esi, dword [ebp - 0x464]
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]
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 [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x460], eax
call eax
sub esp, 0xc
jmp 0x4065bf
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
jmp 0x40663e
lea eax, [ebp - 0x428]
mov dword [ebp - 0x43c], eax
movzx eax, word [ebp - 0x43c]
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.00401430
jmp 0x40679d