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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40ecf5
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
mov ebx, dword [esp + 0x70]
push ebp
push esi
mov esi, ecx
xor ebp, ebp
mov eax, dword [esi + 0x15c]
mov dword [esi + 0x158], ebx
cmp eax, ebp
jne 0x405f29
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
add esp, 0x68
ret 4
mov eax, dword [esi + 0x148]
push edi
cmp eax, ebp
je 0x405fd9
mov eax, dword [esi + 0x14c]
cmp eax, ebp
je 0x405f5f
mov ecx, dword [eax - 4]
lea edi, [eax - 4]
push sub.MFC42.DLL_CString::CString
push ecx
push 4
push eax
call fcn.00409194
push edi
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esi + 0x150]
call sub.MFC42.DLL_CMenu::DestroyMenu
mov eax, dword [esi + 0x148]
xor edi, edi
cmp eax, ebp
jle 0x405fac
mov edx, dword [esi + 0x9c]
mov ecx, dword [edx + edi*4]
mov eax, dword [ecx]
call dword [eax + 0x60]
mov ecx, dword [esi + 0x9c]
mov ecx, dword [ecx + edi*4]
cmp ecx, ebp
je 0x405fa1
mov edx, dword [ecx]
push 1
call dword [edx + 4]
mov eax, dword [esi + 0x9c]
mov dword [eax + edi*4], ebp
mov eax, dword [esi + 0x148]
inc edi
cmp edi, eax
jl 0x405f76
mov eax, dword [esi + 0x9c]
push eax
call sub.MFC42.DLL_operatordelete
mov eax, dword [esi + 0xa0]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 8
mov dword [esi + 0x9c], ebp
mov dword [esi + 0xa0], ebp
mov dword [esi + 0x148], ebp
mov eax, ebx
lea edi, [esi + 0x150]
and eax, 0xffff
push eax
push 4
push eax
call sub.MFC42.DLL_AfxFindResourceHandle
push eax
call dword [sym.imp.USER32.dll_LoadMenuA]
push eax
mov ecx, edi
call sub.MFC42.DLL_CMenu::Attach
mov edi, dword [esi + 0x148]
lea ecx, [edi*4 + 4]
push ecx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x7c], eax
cmp eax, ebp
mov dword [esp + 0x74], ebp
je 0x40603a
push sub.MFC42.DLL_CString::CString
push sub.MFC42.DLL_CString::CString_2
lea ebx, [eax + 4]
push edi
push 4
push ebx
mov dword [eax], edi
call fcn.00409288
jmp 0x40603c
xor ebx, ebx
mov eax, dword [esi + 0x148]
xor edi, edi
cmp eax, ebp
mov dword [esp + 0x74], 0xffffffff
mov dword [esi + 0x14c], ebx
jbe 0x4060b8
mov edx, dword [esi + 0x14c]
mov eax, dword [esi + 0x154]
push 0x400
push ebp
push ebp
push edi
push eax
lea ebx, [edx + edi*4]
call dword [sym.imp.USER32.dll_GetMenuStringA]
cmp eax, ebp
jle 0x4060a6
lea ebp, [eax + eax + 2]
mov ecx, ebx
push ebp
call sub.MFC42.DLL_CString::GetBufferSetLength
mov ecx, dword [esi + 0x154]
push 0x400
push ebp
push eax
push edi
push ecx
call dword [sym.imp.USER32.dll_GetMenuStringA]
push 0xffffffffffffffff
mov ecx, ebx
call sub.MFC42.DLL_CString::ReleaseBuffer
xor ebp, ebp
jmp 0x4060ad
mov ecx, ebx
call sub.MFC42.DLL_CString::Empty
mov eax, dword [esi + 0x148]
inc edi
cmp edi, eax
jb 0x406056
call sub.MFC42.DLL_AfxGetModuleState
mov edx, dword [eax + 0xc]
mov edi, dword [0x4179b8]
mov dword [esp + 0x14], edx
call sub.MFC42.DLL_AfxGetModuleState
mov dword [eax + 0xc], edi
mov eax, str.IDB_CAPTIONBAR_MENUBK_N
mov dword [esp + 0x50], eax
mov dword [esp + 0x68], eax
mov eax, dword [esi + 0x148]
mov dword [esp + 0x48], ebp
shl eax, 2
push eax
mov dword [esp + 0x50], ebp
mov dword [esp + 0x58], ebp
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], str.IDB_CAPTIONBAR_MENUBK_D
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ebp
call sub.MFC42.DLL_operatornew
mov edi, dword [esi + 0x148]
mov dword [esi + 0x9c], eax
mov ecx, edi
shl ecx, 4
push ecx
call sub.MFC42.DLL_operatornew
add esp, 8
cmp eax, ebp
je 0x406133
dec edi
mov dword [esp + 0x7c], edi
jmp 0x406135
xor eax, eax
mov dword [esi + 0xa0], eax
mov eax, dword [esi + 0x148]
cmp eax, ebp
jbe 0x40629e
xor edi, edi
mov ebp, 0x3e8
push 0x158
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x7c], eax
test eax, eax
mov dword [esp + 0x74], 1
je 0x40618c
mov edx, dword [esi + 0x14c]
push 0xff00
push 0
push 9
mov edx, dword [edi + edx]
push 3
push edx
push ebp
mov ecx, eax
call fcn.00403370
jmp 0x40618e
xor eax, eax
mov ecx, dword [esi + 0x9c]
lea edx, [esp + 0x48]
push edx
mov dword [esp + 0x78], 0xffffffff
mov dword [edi + ecx], eax
mov eax, dword [esi + 0x9c]
mov ecx, dword [edi + eax]
call fcn.00404470
mov ecx, dword [0x4179b8]
push 0
push str.MyCaptionBar_MenuBt
push str.IDR_COLOR
push ecx
mov ecx, 0x417bf8
call fcn.00407750
mov edx, dword [0x4179b8]
push 1
push str.MyCaptionBar_MenuBt
push str.IDR_COLOR
push edx
mov ecx, 0x417bf8
mov dword [esp + 0x20], eax
call fcn.00407750
mov dword [esp + 0x7c], eax
mov eax, dword [0x4179b8]
push 2
push str.MyCaptionBar_MenuBt
push str.IDR_COLOR
push eax
mov ecx, 0x417bf8
call fcn.00407750
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x10]
mov ebx, eax
mov eax, dword [esi + 0x9c]
push ecx
push edx
mov ecx, dword [edi + eax]
call fcn.004048f0
mov ecx, dword [esi + 0x9c]
push ebx
push ebx
push ebx
mov ecx, dword [edi + ecx]
call fcn.00404540
mov edx, dword [esi + 0x9c]
xor ebx, ebx
push ebx
push ebx
mov ecx, dword [edi + edx]
push 1
push 1
push ebx
push ebx
call fcn.00404730
mov eax, dword [esi + 0x9c]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov ecx, dword [edi + eax]
push ebx
push ebp
mov edx, dword [ecx]
lea eax, [esp + 0x30]
push esi
push eax
push 0x50000000
push 0x417920
push ebx
call dword [edx + 0x5c]
mov eax, dword [esi + 0x148]
inc ebp
add edi, 4
lea ecx, [ebp - 0x3e8]
cmp ecx, eax
jb 0x406150
xor ebp, ebp
call sub.MFC42.DLL_AfxGetModuleState
mov edx, dword [esp + 0x14]
mov dword [eax + 0xc], edx
mov ecx, dword [esi + 0x20]
lea eax, [esp + 0x38]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
sub eax, edx
mov edi, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
sub eax, 0x14
mov dword [esp + 0x1c], edx
cdq
sub eax, edx
mov ebx, edi
sar eax, 1
add eax, 5
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], eax
sub ecx, edi
add eax, 0x14
add ebx, 0x3f
xor edx, edx
cmp ecx, 0x384
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x148]
setge dl
add edx, 7
xor edi, edi
cmp eax, ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x7c], edx
jbe 0x406420
jmp 0x406320
mov ebx, dword [esp + 0x18]
mov eax, dword [esi + 0x14c]
mov ecx, dword [eax + edi*4]
mov edx, dword [ecx - 8]
mov ecx, ebp
imul edx, dword [esp + 0x7c]
lea eax, [edx + ebx - 4]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0xa0]
add ecx, eax
mov dword [ecx], ebx
mov edx, dword [esp + 0x1c]
mov dword [ecx + 4], edx
mov eax, dword [esp + 0x20]
mov dword [ecx + 8], eax
mov edx, dword [esp + 0x24]
mov dword [ecx + 0xc], edx
mov ecx, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
mov eax, dword [esi + 0xe4]
sub ecx, ebx
sub eax, 5
inc ecx
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
mov ecx, esi
call fcn.00405280
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
sub eax, ecx
je 0x4063c9
mov ecx, dword [esi + 0xa0]
mov eax, ebp
add eax, ecx
push 1
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov ebx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub ebx, ecx
sub eax, edx
push ebx
push eax
push ecx
mov ecx, dword [esi + 0x9c]
push edx
mov ecx, dword [ecx + edi*4]
call sub.MFC42.DLL_CWnd::MoveWindow
mov eax, dword [esi + 0x148]
inc edi
add ebp, 0x10
cmp edi, eax
jb 0x40631c
jmp 0x40641e
cmp edi, 0xffffffff
je 0x40641e
mov eax, dword [esi + 0x148]
lea edx, [eax - 1]
cmp edi, edx
je 0x40641e
inc edi
cmp edi, eax
jae 0x40641e
mov ebp, dword [sym.imp.USER32.dll_SetRect]
mov ebx, edi
shl ebx, 4
mov eax, dword [esi + 0x9c]
push 0
mov ecx, dword [eax + edi*4]
call sub.MFC42.DLL_CWnd::ShowWindow
mov edx, dword [esi + 0xa0]
push 0
mov ecx, ebx
push 0
push 0
add ecx, edx
push 0
push ecx
call ebp
mov eax, dword [esi + 0x148]
inc edi
add ebx, 0x10
cmp edi, eax
jb 0x4063eb
xor ebp, ebp
mov edx, dword [esi + 0x20]
push 1
push ebp
push edx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x68
ret 4