Function at 0x464ce0
Capabilities:
Access peb ldr_data
Get process heap force flags

Disassembly:
push 0xffffffffffffffff
push 0x4fc278
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.004e5159
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x34]
xor ebp, ebp
mov dword [esi + 0x78], ebp
mov eax, dword [edi + 4]
push eax
mov dword [esp + 0x30], ebp
call dword [sym.imp.USER32.dll_GetMenuItemCount]
xor esi, esi
cmp eax, ebp
mov dword [esp + 0x20], eax
jle 0x464fd8
push ebx
jmp 0x464d40
xor ebp, ebp
mov edi, edi
push 0x400
lea ecx, [esp + 0x18]
push ecx
push esi
mov ecx, edi
call fcn.004eb52a
push 8
call fcn.004e50ce
mov ebx, eax
add esp, 4
cmp ebx, ebp
je 0x464d7b
call fcn.004e5159
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov ebp, ebx
mov dword [ebx], eax
mov dword [esp + 0x38], ebp
jmp 0x464d7f
mov dword [esp + 0x38], ebp
mov ecx, dword [esp + 0x14]
mov ebx, dword [ebp]
lea eax, [ecx - 0x10]
sub ebx, 0x10
cmp eax, ebx
je 0x464dd9
mov edx, dword [ebx + 0xc]
test edx, edx
jl 0x464dcd
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x464dcd
push eax
call fcn.004013d0
mov dword [esp + 0x1c], eax
add esp, 4
or ecx, 0xffffffff
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x464dc1
mov ecx, dword [ebx]
mov edx, dword [ecx]
push ebx
call dword [edx + 4]
mov eax, dword [esp + 0x18]
add eax, 0x10
mov dword [ebp], eax
jmp 0x464dd9
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, ebp
call fcn.00401880
mov ebx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push esi
lea ecx, [ebx + 0x28]
call fcn.004e4b87
cmp eax, 1
jne 0x464df6
mov eax, dword [esp + 0x1c]
jmp 0x464df9
or eax, 0xffffffff
lea ecx, [ebx + 8]
mov dword [ebp + 4], eax
mov edx, dword [ecx + 4]
test edx, edx
jne 0x464e0a
xor ebx, ebx
jmp 0x464e12
mov ebx, dword [ecx + 8]
sub ebx, edx
sar ebx, 2
test edx, edx
je 0x464e2f
mov eax, dword [ecx + 0xc]
sub eax, edx
sar eax, 2
cmp ebx, eax
jae 0x464e2f
mov eax, dword [ecx + 8]
mov dword [eax], ebp
add eax, 4
mov dword [ecx + 8], eax
jmp 0x464e3f
mov eax, dword [ecx + 8]
lea edx, [esp + 0x38]
push edx
push 1
push eax
call fcn.00464a60
mov eax, dword [edi + 4]
push esi
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.004eb495
test eax, eax
push 0x400
push esi
je 0x464f42
mov ecx, dword [edi + 4]
push ecx
call dword [sym.imp.USER32.dll_GetMenuState]
mov edx, dword [edi + 4]
push ebp
push 0
push 0x500
push esi
push edx
mov ebx, eax
call dword [sym.imp.USER32.dll_ModifyMenuA]
mov eax, dword [edi + 4]
and ebx, 3
or ebx, 0x400
push ebx
push esi
push eax
call dword [sym.imp.USER32.dll_EnableMenuItem]
mov ecx, dword [edi + 4]
push esi
push ecx
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.004eb495
test eax, eax
je 0x464eaa
mov eax, dword [eax + 4]
mov ebp, dword [esp + 0x10]
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [ebp + 0x44]
call fcn.004e4b87
mov ecx, dword [esp + 0x20]
mov ebx, eax
dec ebx
neg ebx
sbb ebx, ebx
not ebx
and ebx, ecx
mov dword [esp + 0x38], ebx
je 0x464fca
lea ecx, [ebp + 0x18]
mov ebp, dword [ecx + 4]
test ebp, ebp
jne 0x464ee3
xor edx, edx
jmp 0x464eeb
mov edx, dword [ecx + 8]
sub edx, ebp
sar edx, 2
test ebp, ebp
je 0x464f08
mov eax, dword [ecx + 0xc]
sub eax, ebp
sar eax, 2
cmp edx, eax
jae 0x464f08
mov eax, dword [ecx + 8]
mov dword [eax], ebx
add eax, 4
mov dword [ecx + 8], eax
jmp 0x464f18
mov eax, dword [ecx + 8]
lea edx, [esp + 0x38]
push edx
push 1
push eax
call fcn.00464a60
mov ebp, dword [esp + 0x10]
mov eax, dword [ebp + 0x60]
push eax
mov ecx, ebx
call fcn.00464170
push ebx
mov ecx, ebx
call fcn.00464ce0
mov eax, dword [ebp + 0x78]
mov ecx, dword [ebp + 0x80]
add eax, ecx
mov dword [ebp + 0x78], eax
jmp 0x464fca
mov edx, dword [edi + 4]
push edx
call dword [sym.imp.USER32.dll_GetMenuState]
mov ebx, eax
mov eax, dword [edi + 4]
push esi
push eax
call dword [sym.imp.USER32.dll_GetMenuItemID]
mov ecx, dword [esp + 0x38]
mov edx, dword [edi + 4]
push ecx
mov ebp, eax
push ebp
push 0x500
push esi
push edx
call dword [sym.imp.USER32.dll_ModifyMenuA]
mov eax, dword [edi + 4]
and ebx, 3
or ebx, 0x400
push ebx
push esi
push eax
call dword [sym.imp.USER32.dll_EnableMenuItem]
test ebp, ebp
jne 0x464fb8
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx]
push 0x502a56
push eax
call fcn.004d4c0f
add esp, 8
test eax, eax
jne 0x464fb8
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x80]
mov ecx, dword [eax + 0x78]
shr edx, 1
add ecx, edx
mov dword [eax + 0x78], ecx
jmp 0x464fca
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x78]
mov ecx, dword [eax + 0x80]
add edx, ecx
mov dword [eax + 0x78], edx
mov eax, dword [esp + 0x24]
inc esi
cmp esi, eax
jl 0x464d3c
pop ebx
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x2c], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
pop edi
pop esi
pop ebp
jg 0x465001
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
add esp, 0x24
ret 4