Function at 0x401e30
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
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 [edi + 0x10]
sub esp, 0xc
mov ebx, eax
test esi, esi
je 0x402180
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 0x4020c8
mov edi, dword [ebp - 0x15c]
lea ecx, [ebp - 0x140]
mov dword [ebp - 0x140], 0x20000000
mov eax, dword [edi + 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 0x402090
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x401f12
call sym._shell_folder_is_empty
test eax, eax
jne 0x402230
mov edi, dword [ebp - 0x15c]
mov eax, dword [ebp - 0x14c]
mov edx, dword [edi + 0x1c]
mov dword [ebx + 0xc], edi
mov dword [ebx + 0x10], eax
mov dword [ebp - 0x154], edx
mov dword [esp], edx
call dword [sym.imp.user32.dll_GetMenuItemCount]
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x120], 0x30
mov dword [ebp - 0x158], eax
sub esp, 4
mov dword [ebp - 0x11c], 0x24
test ecx, ecx
je 0x4020f0
xor edi, edi
lea esi, [ebp - 0x120]
test eax, eax
jle 0x4021a6
mov dword [ebp - 0x150], esi
mov esi, edi
jmp 0x401fd9
test ecx, ecx
je 0x401fcc
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 0x4021a0
cmp eax, 2
je 0x4021b0
inc esi
cmp dword [ebp - 0x158], esi
je 0x402168
mov eax, dword [ebp - 0x150]
mov dword [esp + 8], 1
mov edi, esi
mov dword [esp + 4], esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x154]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetMenuItemInfoW]
mov eax, dword [ebp - 0x100]
sub esp, 0x10
test eax, eax
je 0x401fcc
mov edx, dword [eax + 0x14]
mov ecx, dword [ebx + 0x14]
test edx, edx
jne 0x401f80
test ecx, ecx
je 0x401f84
mov eax, dword [ebx + 8]
mov dword [ebp - 0x100], ebx
mov dword [ebp - 0x11c], 0x60
mov esi, dword [ebp - 0x150]
mov dword [ebp - 0xfc], eax
call dword [sym.imp.user32.dll_CreatePopupMenu]
lea edx, [ebp - 0x13c]
or dword [ebp - 0x11c], 4
mov dword [ebx + 0x1c], eax
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x13c], 0x1c
mov dword [ebp - 0x138], 8
mov dword [ebp - 0x124], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetMenuInfo]
sub esp, 8
jmp 0x402122
mov eax, dword [edi + 0x14]
lea ecx, [ebx + 0x14]
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
mov ecx, dword [ebp - 0x14c]
mov dword [esp + 0xc], 0x416eb0
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
jmp 0x401efe
lea eax, [ebx + 8]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [0x41c5fc]
sub esp, 0xc
jmp 0x401eb7
mov edx, dword [ebp - 0x158]
mov eax, dword [ebx + 0x14]
lea esi, [ebp - 0x120]
mov edi, edx
mov edx, dword [ebx + 8]
mov dword [ebp - 0x100], ebx
mov dword [ebp - 0x11c], 0x60
mov dword [ebp - 0xfc], edx
test eax, eax
jne 0x402042
mov eax, dword [ebp - 0x15c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_InsertMenuItemW]
sub esp, 0x10
mov eax, dword [0x4123f4]
mov dword [ebx], 0x4123f0
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov dword [0x4123f4], ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x158]
mov esi, dword [ebp - 0x150]
mov edi, eax
mov eax, dword [ebx + 0x14]
jmp 0x402101
lea ecx, [eax + 0x14]
lea edx, [eax + 8]
mov eax, dword [ebp - 0x14c]
call sym._pidl_to_shellfolder.isra.0
jmp 0x401efe
mov esi, dword [ebp - 0x150]
mov eax, dword [ebx + 0x14]
jmp 0x402101
mov eax, dword [ebx + 0x14]
mov edi, esi
mov esi, dword [ebp - 0x150]
test eax, eax
je 0x40223e
mov eax, dword [ebp - 0x100]
mov dword [ebx + 0x18], eax
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x100], ebx
mov dword [ebx + 0x1c], eax
mov eax, dword [ebp - 0x154]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetMenuItemInfoW]
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x13c], 0x1c
sub esp, 0x10
mov dword [ebp - 0x124], ebx
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x1c]
mov dword [ebp - 0x138], 8
mov dword [esp], eax
call dword [sym.imp.user32.dll_SetMenuInfo]
sub esp, 8
jmp 0x402147
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 dword [0x41c564]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret