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

Disassembly:
push 0xffffffffffffffff
push 0x4f60b8
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.004df219
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 0x463078
push ebx
jmp 0x462de0
xor ebp, ebp
mov edi, edi
push 0x400
lea ecx, [esp + 0x18]
push ecx
push esi
mov ecx, edi
call fcn.004e55b8
push 8
call fcn.004df18e
mov ebx, eax
add esp, 4
cmp ebx, ebp
je 0x462e1b
call fcn.004df219
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 0x462e1f
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 0x462e79
mov edx, dword [ebx + 0xc]
test edx, edx
jl 0x462e6d
mov edx, dword [eax]
cmp edx, dword [ebx]
jne 0x462e6d
push eax
call fcn.00401660
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 0x462e61
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 0x462e79
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.004dec47
cmp eax, 1
jne 0x462e96
mov eax, dword [esp + 0x1c]
jmp 0x462e99
or eax, 0xffffffff
lea ecx, [ebx + 8]
mov dword [ebp + 4], eax
mov edx, dword [ecx + 4]
test edx, edx
jne 0x462eaa
xor ebx, ebx
jmp 0x462eb2
mov ebx, dword [ecx + 8]
sub ebx, edx
sar ebx, 2
test edx, edx
je 0x462ecf
mov eax, dword [ecx + 0xc]
sub eax, edx
sar eax, 2
cmp ebx, eax
jae 0x462ecf
mov eax, dword [ecx + 8]
mov dword [eax], ebp
add eax, 4
mov dword [ecx + 8], eax
jmp 0x462edf
mov eax, dword [ecx + 8]
lea edx, [esp + 0x38]
push edx
push 1
push eax
call fcn.00462b00
mov eax, dword [edi + 4]
push esi
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.004e5523
test eax, eax
push 0x400
push esi
je 0x462fe2
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.004e5523
test eax, eax
je 0x462f4a
mov eax, dword [eax + 4]
mov ebp, dword [esp + 0x10]
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [ebp + 0x44]
call fcn.004dec47
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 0x46306a
lea ecx, [ebp + 0x18]
mov ebp, dword [ecx + 4]
test ebp, ebp
jne 0x462f83
xor edx, edx
jmp 0x462f8b
mov edx, dword [ecx + 8]
sub edx, ebp
sar edx, 2
test ebp, ebp
je 0x462fa8
mov eax, dword [ecx + 0xc]
sub eax, ebp
sar eax, 2
cmp edx, eax
jae 0x462fa8
mov eax, dword [ecx + 8]
mov dword [eax], ebx
add eax, 4
mov dword [ecx + 8], eax
jmp 0x462fb8
mov eax, dword [ecx + 8]
lea edx, [esp + 0x38]
push edx
push 1
push eax
call fcn.00462b00
mov ebp, dword [esp + 0x10]
mov eax, dword [ebp + 0x60]
push eax
mov ecx, ebx
call fcn.00462210
push ebx
mov ecx, ebx
call fcn.00462d80
mov eax, dword [ebp + 0x78]
mov ecx, dword [ebp + 0x80]
add eax, ecx
mov dword [ebp + 0x78], eax
jmp 0x46306a
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 0x463058
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx]
push 0x4fca4e
push eax
call fcn.004ceccf
add esp, 8
test eax, eax
jne 0x463058
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 0x46306a
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 0x462ddc
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 0x4630a1
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