Function at 0x40d250
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 0x40d5a0
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 0x40d4e8
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 0x40d4b0
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x40d332
call sym._shell_folder_is_empty
test eax, eax
jne 0x40d650
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 0x40d510
xor edi, edi
lea esi, [ebp - 0x120]
test eax, eax
jle 0x40d5c6
mov dword [ebp - 0x150], esi
mov esi, edi
jmp 0x40d3f9
test ecx, ecx
je 0x40d3ec
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 0x40d5c0
cmp eax, 2
je 0x40d5d0
inc esi
cmp dword [ebp - 0x158], esi
je 0x40d588
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 0x40d3ec
mov edx, dword [eax + 0x14]
mov ecx, dword [ebx + 0x14]
test edx, edx
jne 0x40d3a0
test ecx, ecx
je 0x40d3a4
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 0x40d542
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], 0x41742c
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0x14
jmp 0x40d31e
lea eax, [ebx + 8]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], esi
call dword [0x41d5fc]
sub esp, 0xc
jmp 0x40d2d7
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 0x40d462
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 [0x412064]
mov dword [ebx], 0x412060
mov dword [ebx + 4], eax
mov dword [eax], ebx
mov dword [0x412064], 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 0x40d521
lea ecx, [eax + 0x14]
lea edx, [eax + 8]
mov eax, dword [ebp - 0x14c]
call sym._pidl_to_shellfolder.isra.0
jmp 0x40d31e
mov esi, dword [ebp - 0x150]
mov eax, dword [ebx + 0x14]
jmp 0x40d521
mov eax, dword [ebx + 0x14]
mov edi, esi
mov esi, dword [ebp - 0x150]
test eax, eax
je 0x40d65e
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 0x40d567
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 [0x41d564]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret