Function at 0x40c070
Capabilities:
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x16c
mov dword [ebp - 0x158], eax
mov dword [ebp - 0x14c], edx
mov eax, dword fs:[0x18]
mov dword [esp + 8], 0x24
mov dword [esp + 4], 8
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edi, dword [edi + 0x10]
sub esp, 0xc
mov esi, eax
test edi, edi
je 0x40c3f8
mov eax, dword [ebp - 0x158]
lea edi, [ebp - 0x120]
mov eax, dword [eax + 0x14]
mov ecx, dword [eax]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov ebx, dword [ebp - 0x14c]
mov dword [esp], eax
mov dword [esp + 4], ebx
call dword [ecx + 0x2c]
sub esp, 0x10
test eax, eax
jns 0x40c340
mov edi, dword [ebp - 0x158]
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x144], 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 - 0x141], 0x20
jne 0x40c308
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40c152
call fcn.0040bc10
test eax, eax
jne 0x40c410
mov edi, dword [ebp - 0x158]
movd xmm1, dword [ebp - 0x14c]
mov eax, dword [edi + 0x1c]
movd xmm0, edi
punpckldq xmm0, xmm1
movq qword [esi + 0xc], xmm0
mov dword [ebp - 0x154], eax
mov dword [esp], eax
call sub.user32.dll_GetMenuItemCount
mov ebx, dword [edi + 0x10]
mov edx, 0x24
mov dword [ebp - 0x150], eax
mov eax, 0x30
sub esp, 4
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x11c], edx
test ebx, ebx
je 0x40c3e0
mov ecx, dword [ebp - 0x150]
lea edi, [ebp - 0x120]
xor ebx, ebx
test ecx, ecx
jg 0x40c213
jmp 0x40c260
test ecx, ecx
je 0x40c208
mov dword [esp + 0x14], 0xffffffff
mov eax, dword [eax + 8]
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 0x10], eax
mov eax, dword [esi + 8]
mov dword [esp + 4], 1
mov dword [esp], 0x400
mov dword [esp + 8], eax
call dword [sym.imp.kernel32.dll_CompareStringW]
sub esp, 0x18
cmp eax, 1
je 0x40c254
cmp eax, 2
je 0x40c360
add ebx, 1
cmp dword [ebp - 0x150], ebx
je 0x40c25a
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x154]
mov dword [esp], eax
call sub.user32.dll_GetMenuItemInfoW
mov eax, dword [ebp - 0x100]
sub esp, 0x10
test eax, eax
je 0x40c208
mov edx, dword [eax + 0x14]
mov ecx, dword [esi + 0x14]
test edx, edx
jne 0x40c1c0
test ecx, ecx
je 0x40c1c4
mov dword [ebp - 0x150], ebx
mov ebx, dword [ebp - 0x150]
mov dword [ebp - 0x11c], 0x60
mov eax, dword [esi + 8]
mov dword [ebp - 0x100], esi
mov dword [ebp - 0xfc], eax
mov edx, dword [esi + 0x14]
test edx, edx
je 0x40c2c0
call sub.user32.dll_CreatePopupMenu
lea ecx, [ebp - 0x140]
movq xmm0, qword [0x417690]
mov dword [esi + 0x1c], eax
or dword [ebp - 0x11c], 4
mov dword [ebp - 0x10c], eax
movq qword [ebp - 0x140], xmm0
mov dword [ebp - 0x128], esi
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.user32.dll_SetMenuInfo
sub esp, 8
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x158]
mov eax, dword [eax + 0x1c]
mov dword [esp], eax
call sub.user32.dll_InsertMenuItemW
sub esp, 0x10
mov dword [esi], 0x41105c
mov eax, dword [0x411060]
mov dword [esi + 4], eax
mov dword [eax], esi
mov dword [0x411060], esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [edi + 0x14]
lea ecx, [esi + 0x14]
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0x4161fc
mov dword [esp + 8], 0
mov ecx, dword [ebp - 0x14c]
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0x14]
sub esp, 0x14
jmp 0x40c13e
lea eax, [esi + 8]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], edi
call fcn.0040f340
sub esp, 0xc
jmp 0x40c0f7
mov eax, dword [esi + 0x14]
test eax, eax
je 0x40c41e
mov eax, dword [ebp - 0x100]
mov dword [esi + 0x18], eax
mov eax, dword [eax + 0x1c]
mov dword [esi + 0x1c], eax
mov dword [ebp - 0x100], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x154]
mov dword [esp], eax
call sub.user32.dll_SetMenuItemInfoW
mov eax, 0x1c
mov edx, 8
mov dword [ebp - 0x128], esi
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x140]
sub esp, 0x10
mov dword [ebp - 0x13c], edx
mov dword [esp + 4], eax
mov eax, dword [esi + 0x1c]
mov dword [esp], eax
call sub.user32.dll_SetMenuInfo
sub esp, 8
jmp 0x40c2e4
mov ebx, dword [ebp - 0x150]
lea edi, [ebp - 0x120]
jmp 0x40c260
lea ecx, [eax + 0x14]
lea edx, [eax + 8]
mov eax, dword [ebp - 0x14c]
call fcn.0040bf70
jmp 0x40c13e
mov eax, dword [esi + 0x14]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [esi + 8]
mov dword [esp + 4], 0
mov edi, dword fs:[0x18]
mov ebx, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 8], eax
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
sub esp, 0xc
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword [edi + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call ebx
mov eax, dword [ebp - 0x14c]
sub esp, 0xc
mov dword [esp], eax
call fcn.0040f2dc
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret