Function at 0x518820
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5e1279
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push ebp
push esi
push edi
mov eax, dword [0x72d630]
xor eax, esp
push eax
lea eax, [esp + 0x5c]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, vtable.CMenu.0
xor edi, edi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x64], edi
call fcn.0051b9f0
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push 0x23a1
lea ecx, [esp + 0x2c]
push ecx
mov ecx, eax
call edx
test eax, eax
jne 0x518881
mov dword [esp + 0x28], ebx
jmp 0x518b24
mov eax, dword [esp + 0x2c]
push edi
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call sub.mfc90u.dll_CMenu::FromHandle
mov ebp, eax
mov dword [esp + 0x1c], ebp
cmp ebp, edi
je 0x518878
push edi
call fcn.00554110
mov ecx, dword [esi + 0xb8]
mov dword [esi + 0xbc], eax
mov ecx, dword [ecx + 0xa0]
mov dword [eax + 0xe4], ecx
mov edx, dword [esi + 0xbc]
mov dword [edx + 0x108], esi
mov ecx, dword [esi + 0xb8]
add esp, 4
call fcn.005283a0
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov edi, eax
lea eax, [edi + 4]
push eax
call ebx
mov ecx, dword [esi + 0xbc]
push edi
call fcn.00538f40
mov eax, dword [esi + 0xc0]
add eax, 4
push eax
call ebx
mov ecx, dword [esi + 0xb8]
call fcn.00528100
mov ecx, dword [esi + 0xc0]
mov dword [ecx + 0x78], eax
mov ecx, dword [esi + 0xc0]
push ecx
mov ecx, dword [esi + 0xbc]
call fcn.00538fc0
mov edx, dword [ebp + 4]
xor ebx, ebx
push edx
mov dword [esp + 0x18], ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
test eax, eax
jle 0x518b1c
lea esp, [esp]
mov ecx, dword [ebp + 4]
xor eax, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x30]
push eax
push 1
push ebx
push ecx
mov dword [esp + 0x40], 0x2c
mov dword [esp + 0x44], 0x11
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
mov edx, dword [ebp + 4]
push ebx
push edx
call dword [sym.imp.USER32.dll_GetMenuItemID]
mov edi, eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], edi
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_class]
push 0x400
lea eax, [esp + 0x1c]
push eax
push ebx
push ebp
mov byte [esp + 0x74], 1
call fcn.0051b9f0
mov ecx, eax
call fcn.0051b590
test dword [esp + 0x38], 0x800
jne 0x518af7
test edi, edi
je 0x518af7
cmp edi, 0x23aa
jne 0x518a55
push 0x184
call sub.mfc90u.dll_new_1
add esp, 4
mov dword [esp + 0x24], eax
mov byte [esp + 0x64], 2
test eax, eax
je 0x518a03
mov ecx, eax
call fcn.00553360
mov edi, eax
jmp 0x518a05
xor edi, edi
push 0x264
mov byte [esp + 0x68], 1
call sub.mfc90u.dll_new_1
add esp, 4
mov dword [esp + 0x24], eax
mov byte [esp + 0x64], 3
test eax, eax
je 0x518a2f
mov ecx, eax
call fcn.005578a0
mov ebp, eax
jmp 0x518a31
xor ebp, ebp
push ebp
mov ecx, edi
mov byte [esp + 0x68], 1
mov dword [ebp + 0xd8], 0x23aa
call fcn.00553f90
mov ecx, ebp
call sub.mfc90u.dll_CCmdTarget::InternalRelease
mov ebp, dword [esp + 0x1c]
jmp 0x518aac
cmp edi, 0x23a5
jne 0x518a80
push 0x1b4
call sub.mfc90u.dll_new_1
add esp, 4
mov dword [esp + 0x24], eax
mov byte [esp + 0x64], 4
test eax, eax
je 0x518aa3
mov ecx, eax
call fcn.00517670
jmp 0x518aa5
push 0x174
call sub.mfc90u.dll_new_1
add esp, 4
mov dword [esp + 0x24], eax
mov byte [esp + 0x64], 5
test eax, eax
je 0x518aa3
mov ecx, eax
call fcn.00517a90
jmp 0x518aa5
xor eax, eax
mov edi, eax
mov byte [esp + 0x64], 1
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_]
push eax
mov ecx, edi
call fcn.0052c750
mov edx, dword [esp + 0x20]
mov ecx, dword [esi + 0xbc]
mov ecx, dword [ecx + 0xfc]
push 0
push 0xffffffffffffffff
push 0
push edx
push edi
call fcn.00526540
cmp dword [esp + 0x14], 0
je 0x518aff
mov eax, dword [edi]
mov edx, dword [eax + 0x64]
push 1
mov ecx, edi
call edx
mov dword [esp + 0x14], 0
jmp 0x518aff
mov dword [esp + 0x14], 1
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, dword [ebp + 4]
push eax
inc ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp ebx, eax
jl 0x518940
mov dword [esp + 0x28], vtable.CMenu.0
lea ecx, [esp + 0x28]
mov dword [esp + 0x64], 0xffffffff
call sub.mfc90u.dll_CMenu::DestroyMenu
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret