Function at 0x4061d0
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 [0x40c000], 8
jne 0x4064e5
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 0x406592
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 sym._open_icon.constprop.0
mov ebx, eax
test eax, eax
js 0x406458
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 0x4068cb
cmp word [esi], 0
je 0x40697c
mov eax, esi
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4062b0
sub eax, esi
add eax, 2
call dbg.xmalloc
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 0x4062d0
mov eax, dword [0x417208]
mov dword [esp], str._siconshicolor
mov dword [esp + 4], eax
call dbg.heap_wprintf
mov edx, dword [ebp - 0x43c]
mov dword [ebp - 0x464], eax
test edx, edx
jle 0x406986
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 [0x40c000], 8
jne 0x406850
test esi, esi
je 0x40664e
mov dword [ebp - 0x440], ebx
movzx ecx, byte [edi]
mov eax, ebx
xor edx, edx
jmp 0x40636e
add edx, 1
add eax, 0x10
cmp esi, edx
je 0x406648
cmp byte [eax], cl
jne 0x406360
movzx ebx, byte [edi + 1]
cmp byte [eax + 1], bl
jne 0x406360
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 0x406328
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 0x4068e7
mov eax, dword [ebp - 0x434]
test eax, eax
je 0x406424
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 [0x40c000], 4
jne 0x4065ae
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 0x4069ee
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 0x40659f
test ecx, ecx
je 0x406968
mov eax, ecx
shr eax, 0x10
je 0x406628
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 0x40651e
mov eax, esi
call sym._wine_dbgstr_wn.part.0.constprop.0
mov edi, eax
test ebx, ebx
je 0x406972
mov eax, ebx
shr eax, 0x10
je 0x406950
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 0x406557
mov eax, ebx
call sym._wine_dbgstr_wn.part.0.constprop.0
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], global___func__.8
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x406207
test byte [0x40c000], 4
jne 0x406927
mov dword [ebp - 0x45c], 0
jmp 0x40644a
lea eax, [ebp - 0x428]
shr eax, 0x10
je 0x4069fe
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 0x4065ed
lea eax, [ebp - 0x428]
call sym._wine_dbgstr_wn.part.0.constprop.0
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], global___func__.8
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x40646b
movzx eax, cx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
mov edi, eax
jmp 0x40651e
mov ebx, dword [ebp - 0x440]
lea edx, [esi + 1]
mov dword [ebp - 0x444], edx
cmp dword [ebp - 0x43c], edx
jle 0x406713
movzx eax, byte [edi]
xor ecx, ecx
mov dword [ebp - 0x450], esi
mov byte [ebp - 0x44c], cl
mov byte [ebp - 0x440], al
jmp 0x40668b
add edx, 1
cmp dword [ebp - 0x43c], edx
je 0x4066e8
mov eax, edx
movzx ecx, byte [ebp - 0x440]
shl eax, 4
cmp byte [ebx + eax], cl
jne 0x406680
movzx ecx, byte [edi + 1]
cmp byte [ebx + eax + 1], cl
jne 0x406680
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 0x40668b
lea esi, [esi]
movzx eax, byte [ebp - 0x44c]
test al, al
je 0x406713
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 [0x40c000], 8
jne 0x406898
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 dbg.heap_wprintf
mov esi, eax
call dbg.create_directories
mov eax, dword [ebp - 0x45c]
mov dword [esp + 4], esi
mov dword [esp], str._s_s.png
mov dword [esp + 8], eax
call dbg.heap_wprintf
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 0x4067ee
lea eax, [ebp - 0x220]
mov ecx, dword [ebp - 0x440]
mov edx, eax
mov eax, dword [ebp - 0x458]
call sym._convert_to_native_icon.constprop.0
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 0x40638a
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], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x406347
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], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x406720
mov eax, dword [ebp - 0x440]
lea edx, [ebp - 0x428]
call sym._compute_native_identifier.part.0
mov dword [ebp - 0x45c], eax
jmp 0x4062e0
test byte [0x40c000], 4
je 0x406480
mov eax, dword [ebp - 0x44c]
mov dword [esp + 0xc], str.writing_icon_failed__error_0x_08lX_n
mov dword [esp + 8], global___func__.8
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x406480
mov dword [esp + 0xc], str.GetFullPathName_failed_n
mov dword [esp + 8], global___func__.8
mov dword [esp + 4], global___dbch
mov dword [esp], 2
call sym._wine_dbg_log.constprop.0
jmp 0x40659f
movzx eax, bx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0
jmp 0x406557
mov edi, str._null_
jmp 0x40651e
mov eax, str._null_
jmp 0x406557
mov eax, 2
jmp 0x4062be
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 0x40640f
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
jmp 0x40648e
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 sym._wine_dbg_sprintf.constprop.0
jmp 0x4065ed