Function at 0x40e340
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, 8
push esi
mov esi, eax
push ebx
mov ebx, 0x24
sub esp, 0x17c
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [ebp - 0x15c], eax
mov eax, dword fs:[0x18]
mov dword [ebp - 0x14c], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ebx, eax
mov eax, dword [esi + 0x10]
sub esp, 0xc
test eax, eax
je 0x40e6f8
mov eax, dword [ebp - 0x15c]
lea esi, [ebp - 0x120]
mov ecx, 1
mov eax, dword [eax + 0x14]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov ecx, dword [ebp - 0x14c]
mov dword [esp + 0xc], esi
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x2c]
sub esp, 0x10
test eax, eax
jns 0x40e620
mov esi, dword [ebp - 0x15c]
lea ecx, [ebp - 0x140]
mov eax, 0x20000000
mov dword [ebp - 0x140], eax
mov eax, dword [esi + 0x14]
mov edx, dword [eax]
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x14c]
mov dword [esp + 8], ecx
mov ecx, 1
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x24]
sub esp, 0x10
test byte [ebp - 0x13d], 0x20
jne 0x40e5e8
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40e427
call sym._shell_folder_is_empty
test eax, eax
jne 0x40e710
mov esi, dword [ebp - 0x15c]
mov edi, 0x30
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 edx, 0x24
mov dword [ebp - 0x120], edi
mov dword [ebp - 0x11c], edx
mov dword [ebp - 0x158], eax
sub esp, 4
test ecx, ecx
je 0x40e6c0
test eax, eax
jle 0x40e77b
lea esi, [ebp - 0x120]
xor edi, edi
jmp 0x40e4e8
test ecx, ecx
je 0x40e4db
mov edx, 0xffffffff
mov ecx, 0xffffffff
mov dword [esp + 0x14], edx
mov eax, dword [eax + 8]
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 8]
mov dword [esp], 0x400
mov dword [esp + 8], eax
mov eax, 1
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 1
je 0x40e530
cmp eax, 2
je 0x40e640
inc edi
cmp dword [ebp - 0x158], edi
je 0x40e6e0
mov dword [esp + 0xc], esi
mov eax, dword [ebp - 0x150]
mov ecx, 1
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [ebp - 0x154], edi
mov dword [esp], eax
call sym._GetMenuItemInfoW_16
mov eax, dword [ebp - 0x100]
sub esp, 0x10
test eax, eax
je 0x40e4db
mov edx, dword [eax + 0x14]
mov ecx, dword [ebx + 0x14]
test edx, edx
jne 0x40e490
test ecx, ecx
je 0x40e494
mov edi, 0x60
mov dword [ebp - 0x11c], edi
mov eax, dword [ebx + 8]
mov dword [ebp - 0x100], ebx
mov dword [ebp - 0xfc], eax
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40e597
call sym._CreatePopupMenu_0
mov edx, 0x1c
mov ecx, 8
mov dword [ebx + 0x1c], eax
mov dword [ebp - 0x13c], edx
lea edx, [ebp - 0x13c]
mov dword [esp + 4], edx
mov dword [esp], eax
or dword [ebp - 0x11c], 4
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x138], ecx
mov dword [ebp - 0x124], ebx
call sym._SetMenuInfo_8
sub esp, 8
mov dword [esp + 0xc], esi
mov eax, 1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x154]
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], 0x41305c
mov eax, dword [0x413060]
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov eax, ebx
mov dword [0x413060], ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 0x14]
lea ecx, [ebx + 0x14]
mov esi, 0x418554
xor edi, edi
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp - 0x14c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x14]
sub esp, 0x14
jmp 0x40e413
mov dword [esp], esi
lea eax, [ebx + 8]
xor edi, edi
mov dword [esp + 8], eax
mov dword [esp + 4], edi
call sym._StrRetToStrW_12
sub esp, 0xc
jmp 0x40e3ca
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40e71e
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 esi, 1
mov dword [esp + 4], edi
mov edi, 0x1c
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [ebp - 0x100], ebx
call sym._SetMenuItemInfoW_16
mov eax, 8
mov dword [ebp - 0x138], eax
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x13c], edi
mov dword [ebp - 0x124], ebx
sub esp, 0x10
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call sym._SetMenuInfo_8
sub esp, 8
jmp 0x40e5c2
mov eax, dword [ebp - 0x158]
lea esi, [ebp - 0x120]
mov dword [ebp - 0x154], eax
jmp 0x40e530
mov eax, dword [ebp - 0x158]
mov dword [ebp - 0x154], eax
jmp 0x40e530
mov eax, dword [ebp - 0x14c]
lea ecx, [ebx + 0x14]
lea edx, [ebx + 8]
call sym._pidl_to_shellfolder
jmp 0x40e413
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]
xor edx, edx
mov dword [esp + 4], edx
mov esi, dword [sym.imp.kernel32.dll_HeapFree]
mov edi, dword fs:[0x18]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call esi
xor ecx, ecx
sub esp, 0xc
mov dword [esp + 8], ebx
xor ebx, ebx
mov dword [esp + 4], ecx
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
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea esi, [ebp - 0x120]
xor eax, eax
mov dword [ebp - 0x154], eax
jmp 0x40e530