Function at 0x406a40
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
mov ebx, ecx
sub esp, 0x6c
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
test byte [section..data], 8
jne 0x406e7d
lea eax, [ebp - 0x20]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x2c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x24]
mov dword [esp + 4], eax
lea eax, [ebp - 0x28]
mov dword [esp], eax
mov eax, edi
call fcn.00406780
mov esi, eax
test eax, eax
js 0x406df8
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
test ebx, ebx
je 0x406bfc
cmp word [ebx], 0
je 0x407089
mov eax, ebx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x406ac0
sub eax, ebx
add eax, 2
call fcn.00401510
mov dword [ebp - 0x40], eax
mov ecx, eax
xor eax, eax
lea esi, [esi]
movzx edx, word [ebx + eax]
mov word [ecx + eax], dx
add eax, 2
test dx, dx
jne 0x406ae0
mov eax, dword [0x419208]
mov dword [esp], str._siconshicolor
mov dword [esp + 4], eax
call fcn.00401ad0
mov dword [ebp - 0x4c], eax
test esi, esi
jle 0x407016
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov edi, dword [ebp - 0x30]
mov dword [ebp - 0x48], 0
xor ebx, ebx
mov dword [ebp - 0x34], eax
mov eax, dword fs:[0x18]
mov dword [ebp - 0x44], eax
lea esi, [esi]
mov dword [ebp - 0x1c], ebx
test byte [section..data], 8
jne 0x406d80
test ebx, ebx
je 0x406c10
movzx ecx, byte [edi]
mov eax, dword [ebp - 0x30]
xor edx, edx
mov byte [ebp - 0x2c], cl
jmp 0x406b66
add edx, 1
add eax, 0x10
cmp edx, ebx
je 0x406c10
movzx ecx, byte [ebp - 0x2c]
cmp byte [eax], cl
jne 0x406b58
movzx ecx, byte [edi + 1]
cmp byte [eax + 1], cl
jne 0x406b58
add ebx, 1
add edi, 0x10
cmp esi, ebx
jg 0x406b30
mov esi, dword [ebp - 0x4c]
mov eax, esi
call fcn.00401250
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 - 0x34]
call eax
mov eax, dword [ebp - 0x48]
sub esp, 0xc
test eax, eax
js 0x406f27
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x406bcb
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov edx, dword [ebp - 0x24]
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 - 0x34]
call eax
mov eax, dword [ebp - 0x40]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x2c]
mov edx, edi
call fcn.00401b80
mov dword [ebp - 0x40], eax
jmp 0x406af0
add ebx, 1
mov ecx, dword [ebp - 0x1c]
mov eax, edi
mov edx, ebx
cmp esi, ebx
jle 0x406c76
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x3c], ebx
jmp 0x406c3a
add edx, 1
add eax, 0x10
cmp esi, edx
je 0x406c70
movzx ebx, byte [edi]
cmp byte [eax + 0x10], bl
jne 0x406c30
movzx ebx, byte [edi + 1]
cmp byte [eax + 0x11], bl
jne 0x406c30
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
shl ebx, 4
movzx ecx, word [ecx + ebx + 6]
cmp word [eax + 0x16], cx
jb 0x406c30
mov dword [ebp - 0x1c], edx
add eax, 0x10
mov dword [ebp - 0x2c], edx
add edx, 1
cmp esi, edx
jne 0x406c3a
nop
mov ecx, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x3c]
test byte [section..data], 8
jne 0x406dc8
shl ecx, 4
add ecx, dword [ebp - 0x30]
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 - 0x4c]
cmove edx, ecx
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
call fcn.00401ad0
mov dword [ebp - 0x2c], eax
call fcn.00401020
mov ecx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x2c]
mov dword [esp], str._s_s.png
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
call fcn.00401ad0
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x3c], 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 - 0x48], eax
sub esp, 0x14
test eax, eax
js 0x406d2c
lea eax, [ebp - 0x1c]
mov ecx, dword [ebp - 0x3c]
mov edx, eax
mov eax, dword [ebp - 0x38]
call fcn.004053e0
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ecx
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x44]
sub esp, 0xc
mov ecx, dword [ebp - 0x34]
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 0x406b7a
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], 0x40e000
mov dword [esp], 3
call fcn.00401480
jmp 0x406b40
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], 0x40e000
mov dword [esp], 3
call fcn.00401480
mov ecx, dword [ebp - 0x1c]
jmp 0x406c83
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x34], eax
test byte [section..data], 4
jne 0x406f7e
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x407061
mov edx, dword [ebp - 0x24]
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 - 0x34]
call eax
mov esi, dword [ebp - 0x40]
sub esp, 0xc
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 - 0x34]
call eax
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x40]
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test ecx, ecx
je 0x407057
mov eax, ecx
shr eax, 0x10
je 0x406f64
mov dword [esp + 4], 0xffffffff
mov esi, str._invalid_
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
sub esp, 8
test eax, eax
jne 0x406eb6
mov eax, ebx
call fcn.004012a0
mov esi, eax
test edi, edi
je 0x40704d
mov eax, edi
shr eax, 0x10
je 0x406ffe
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x406eef
mov eax, edi
call fcn.004012a0
mov dword [esp + 0x18], esi
mov esi, dword [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], str.path__s__index_d_destFilename__s__n
mov dword [esp + 8], str.extract_icon
mov dword [esp + 4], 0x40e000
mov dword [esp], 3
call fcn.00401480
jmp 0x406a6b
test byte [section..data], 4
je 0x406e14
mov eax, dword [ebp - 0x48]
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], 0x40e000
mov dword [esp], 2
call fcn.00401480
jmp 0x406e14
movzx eax, cx
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004019b0
mov esi, eax
jmp 0x406eb6
test edi, edi
je 0x407093
mov eax, edi
shr eax, 0x10
je 0x407071
mov dword [esp + 4], 0xffffffff
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, str._invalid_
test ecx, ecx
jne 0x406fb7
mov eax, edi
call fcn.004012a0
mov dword [esp + 0x18], esi
mov esi, dword [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
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], 0x40e000
mov dword [esp], 2
call fcn.00401480
mov eax, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x34], eax
jmp 0x406e14
movzx eax, di
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004019b0
jmp 0x406eef
mov esi, dword [ebp - 0x4c]
mov eax, esi
call fcn.00401250
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 - 0x34], eax
call eax
sub esp, 0xc
jmp 0x406bb9
mov eax, str._null_
jmp 0x406eef
mov esi, str._null_
jmp 0x406eb6
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
jmp 0x406e1f
movzx eax, di
mov dword [esp], str._04x
mov dword [esp + 4], eax
call fcn.004019b0
jmp 0x406fb7
mov eax, 2
jmp 0x406ace
mov eax, str._null_
jmp 0x406fb7