Function at 0x40c4d0
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x17c
mov dword [ebp - 0x15c], eax
mov dword [esp + 8], 0x24
mov dword [esp + 4], 8
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x14c], edx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov esi, dword [esi + 0x10]
sub esp, 0xc
mov ebx, eax
test esi, esi
je 0x40c878
mov eax, dword [ebp - 0x15c]
mov ecx, dword [ebp - 0x14c]
lea esi, [ebp - 0x120]
mov eax, dword [eax + 0x14]
mov edx, dword [eax]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x2c]
sub esp, 0x10
test eax, eax
jns 0x40c798
mov esi, dword [ebp - 0x15c]
lea ecx, [ebp - 0x140]
mov dword [ebp - 0x140], 0x20000000
mov eax, dword [esi + 0x14]
mov edx, dword [eax]
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x14c]
mov dword [esp + 8], ecx
mov dword [esp + 4], 1
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 0x10
test byte [ebp - 0x13d], 0x20
jne 0x40c760
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40c5b2
call dbg.shell_folder_is_empty
test eax, eax
jne 0x40c890
mov esi, dword [ebp - 0x15c]
mov eax, dword [ebp - 0x14c]
mov edx, dword [esi + 0x1c]
mov dword [ebx + 0xc], esi
mov dword [ebx + 0x10], eax
mov dword [esp], edx
mov dword [ebp - 0x150], edx
call sym._GetMenuItemCount_4
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x120], 0x30
mov dword [ebp - 0x158], eax
sub esp, 4
mov dword [ebp - 0x11c], 0x24
test ecx, ecx
je 0x40c840
test eax, eax
jle 0x40c8fb
xor edi, edi
lea esi, [ebp - 0x120]
jmp 0x40c667
test ecx, ecx
je 0x40c658
mov dword [esp + 0x14], 0xffffffff
mov eax, dword [eax + 8]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 8]
mov dword [esp + 4], 1
mov dword [esp + 8], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 1
je 0x40c6b0
cmp eax, 2
je 0x40c7c0
add edi, 1
cmp dword [ebp - 0x158], edi
je 0x40c860
mov eax, dword [ebp - 0x150]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [ebp - 0x154], edi
call sym._GetMenuItemInfoW_16
mov eax, dword [ebp - 0x100]
sub esp, 0x10
test eax, eax
je 0x40c658
mov edx, dword [eax + 0x14]
mov ecx, dword [ebx + 0x14]
test edx, edx
jne 0x40c610
test ecx, ecx
je 0x40c614
nop
mov dword [ebp - 0x11c], 0x60
mov eax, dword [ebx + 8]
mov dword [ebp - 0x100], ebx
mov dword [ebp - 0xfc], eax
mov edx, dword [ebx + 0x14]
test edx, edx
je 0x40c714
call sym._CreatePopupMenu_0
lea edx, [ebp - 0x13c]
mov dword [ebx + 0x1c], eax
mov dword [esp + 4], edx
mov dword [esp], eax
or dword [ebp - 0x11c], 4
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x13c], 0x1c
mov dword [ebp - 0x138], 8
mov dword [ebp - 0x124], ebx
call sym._SetMenuInfo_8
sub esp, 8
mov eax, dword [ebp - 0x154]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x15c]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call sym._InsertMenuItemW_16
sub esp, 0x10
mov dword [ebx], 0x41105c
mov eax, dword [0x411060]
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov dword [0x411060], ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 0x14]
lea ecx, [ebx + 0x14]
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp - 0x14c]
mov dword [esp + 0xc], 0x416178
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
jmp 0x40c59e
lea eax, [ebx + 8]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], esi
call sym._StrRetToStrW_12
sub esp, 0xc
jmp 0x40c557
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40c89e
mov eax, dword [ebp - 0x100]
mov dword [ebx + 0x18], eax
mov eax, dword [eax + 0x1c]
mov dword [ebx + 0x1c], eax
mov eax, dword [ebp - 0x150]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [ebp - 0x100], ebx
call sym._SetMenuItemInfoW_16
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x13c], 0x1c
sub esp, 0x10
mov dword [ebp - 0x124], ebx
mov dword [ebp - 0x138], 8
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call sym._SetMenuInfo_8
sub esp, 8
jmp 0x40c73e
mov eax, dword [ebp - 0x158]
lea esi, [ebp - 0x120]
mov dword [ebp - 0x154], eax
jmp 0x40c6b0
mov eax, dword [ebp - 0x158]
mov dword [ebp - 0x154], eax
jmp 0x40c6b0
lea ecx, [eax + 0x14]
lea edx, [eax + 8]
mov eax, dword [ebp - 0x14c]
call sym._pidl_to_shellfolder.isra.0
jmp 0x40c59e
mov eax, dword [ebx + 0x14]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebx + 8]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
sub esp, 0xc
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
mov eax, dword [ebp - 0x14c]
sub esp, 0xc
mov dword [esp], eax
call sym._CoTaskMemFree_4
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x154], 0
lea esi, [ebp - 0x120]
jmp 0x40c6b0