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

Disassembly:
push 0xffffffffffffffff
push 0x1000f751
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ac
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], esi
call sym.GuiLib.dll_protected:_void___thiscall_CMenuBar::ExitTrackingMode_void_
mov eax, dword [esi + 0xb8]
push eax
call sub.MFC42.DLL_CMenu::FromHandle
mov edi, eax
xor esi, esi
cmp edi, esi
je 0x10005a71
push ebx
push ebp
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [eax + 4]
mov dword [esp + 0x14], 0x10011aa4
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c4], esi
call dword [sym.imp.USER32.dll_CreatePopupMenu]
push eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CMenu::Attach
mov edx, dword [edi + 4]
mov ebp, dword [sym.imp.USER32.dll_GetMenuItemCount]
push edx
mov dword [esp + 0x40], 0x2c
call ebp
mov ebx, dword [sym.imp.USER32.dll_GetMenuItemInfoA]
cmp eax, esi
mov dword [esp + 0x20], eax
jbe 0x10005784
mov ecx, dword [esp + 0x1c]
lea eax, [esi + 1]
push eax
mov dword [esp + 0x14], eax
call sym.GuiLib.dll_protected:_bool___thiscall_CMenuBar::IsItemClipped_int_const
test al, al
je 0x10005778
mov edx, dword [edi + 4]
lea ecx, [esp + 0x3c]
push ecx
push 1
lea eax, [esp + 0xc0]
push esi
push edx
mov dword [esp + 0x50], 0x17
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], 0x104
call ebx
mov eax, dword [esp + 0x18]
push eax
call ebp
test eax, eax
ja 0x10005765
mov ecx, dword [esp + 0x44]
test ch, 8
jne 0x10005778
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x3c]
push ecx
push 1
push eax
push edx
call dword [sym.imp.USER32.dll_InsertMenuItemA]
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
cmp esi, eax
jb 0x10005713
mov esi, dword [esp + 0x1c]
mov eax, dword [esi + 0xb0]
test eax, eax
je 0x10005905
push 0
push eax
call dword [sym.imp.USER32.dll_GetSystemMenu]
push eax
call sub.MFC42.DLL_CMenu::FromHandle
mov edi, eax
mov eax, dword [esp + 0x18]
push eax
call ebp
test eax, eax
jbe 0x100057c6
mov ecx, dword [esp + 0x18]
push 0
push 0
push 0x800
push ecx
call dword [sym.imp.USER32.dll_AppendMenuA]
mov eax, dword [esi + 0x20]
lea edx, [esp + 0x98]
push edx
push eax
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [esi + 0xd8]
mov dword [esp + 0x10], 0
dec ecx
js 0x10005905
mov edx, dword [esi + 0xd4]
mov eax, dword [esp + 0x10]
mov esi, dword [edx + eax*4]
lea eax, [esp + 0xa8]
push eax
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 4]
mov ecx, dword [eax + 8]
mov eax, dword [esp + 0xa0]
cmp ecx, eax
jle 0x100058e7
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 8]
mov esi, eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0xc4]
cmp eax, 1
je 0x1000583d
cmp eax, 3
je 0x1000583d
cmp eax, 4
jne 0x1000589e
mov eax, dword [edi + 4]
lea edx, [esp + 0x68]
push edx
push 0
lea ecx, [esp + 0xc0]
push esi
push eax
mov dword [esp + 0x78], 0x30
mov dword [esp + 0x7c], 0x1c3
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], 0x104
call ebx
mov esi, dword [esp + 0x74]
mov ecx, dword [esp + 0x18]
and esi, 0xffffefff
push ecx
mov dword [esp + 0x78], esi
call ebp
lea edx, [esp + 0x68]
push edx
push 1
push eax
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_InsertMenuItemA]
jmp 0x100058e7
lea ecx, [esp + 0xb8]
lea edx, [esp + 0x3c]
mov dword [esp + 0x40], 0x11
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], 0x104
mov eax, dword [edi + 4]
push edx
push 0
push esi
push eax
call ebx
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0xb8]
and ah, 0xef
push ecx
push esi
push eax
push edx
mov dword [esp + 0x58], eax
call dword [sym.imp.USER32.dll_AppendMenuA]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
inc eax
mov esi, ecx
mov edx, dword [ecx + 0xd8]
mov dword [esp + 0x10], eax
dec edx
cmp eax, edx
jle 0x100057ed
mov edi, dword [esp + 0x1d0]
test edi, edi
jl 0x100059a3
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea eax, [esp + 0x10]
mov ecx, esi
push eax
push edi
mov byte [esp + 0x1cc], 1
call sub.MFC42.DLL_CToolBar::GetButtonText
mov eax, dword [esp + 0x10]
xor esi, esi
mov cl, byte [eax]
test cl, cl
je 0x1000598e
cmp cl, 0x26
jne 0x10005951
mov cl, byte [esi + eax + 1]
inc esi
test cl, cl
je 0x10005951
cmp cl, 0x26
jne 0x1000595c
mov cl, byte [esi + eax + 1]
inc esi
test cl, cl
jne 0x1000593e
jmp 0x1000598e
mov cl, byte [esi + eax]
mov edi, dword [sym.imp.USER32.dll_keybd_event]
mov byte [esp + 0x20], cl
push 0
mov edx, dword [esp + 0x24]
push 0
push 0
push edx
call edi
mov eax, dword [esp + 0x10]
push 0
push 2
push 0
mov cl, byte [esi + eax]
mov byte [esp + 0x2c], cl
mov edx, dword [esp + 0x2c]
push edx
call edi
lea ecx, [esp + 0x10]
mov byte [esp + 0x1c4], 0
call fcn.1000e7dc
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x1cc]
mov dword [esp + 0x28], 0x14
mov eax, edi
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x30], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x34], ecx
mov edx, dword [eax + 0xc]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x38], edx
mov eax, dword [eax + 0xc4]
cmp eax, 1
je 0x100059ec
cmp eax, 3
je 0x100059ec
cmp eax, 4
je 0x100059ec
xor ebx, ebx
jmp 0x100059f1
mov ebx, 1
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call sub.MFC42.DLL_CWnd::GetParentFrame
mov edx, dword [edi + 0xc]
mov ecx, dword [esp + 0x1c]
neg bl
sbb ebx, ebx
push eax
mov eax, dword [edi]
and ebx, 0x1000
push edx
or ebx, 0x40
push eax
push ebx
push ecx
call sym.GuiLib.dll_public:_static_int___cdecl_CWinAppEx::TrackPopupMenuEx_struct_HMENU_____unsigned_int__int__int__class_CWnd___struct_tagTPMPARAMS__
mov edx, dword [esp + 0x30]
mov esi, dword [sym.imp.USER32.dll_RemoveMenu]
add esp, 0x18
push 0x400
push 0
push edx
call esi
pop ebp
pop ebx
test eax, eax
je 0x10005a4c
mov eax, dword [esp + 0x10]
push 0x400
push 0
push eax
call esi
test eax, eax
jne 0x10005a3a
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CMenu::DestroyMenu
mov dword [esp + 0xc], 0x10011aa4
lea ecx, [esp + 0xc]
mov dword [esp + 0x1bc], 2
call sub.MFC42.DLL_CMenu::DestroyMenu
mov ecx, dword [esp + 0x1b4]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x1b8
ret 8