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

Disassembly:
push 0xffffffffffffffff
push 0x432d0b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x80]
mov dword [esp + 0x10], ecx
test edi, edi
jne 0x409de9
mov al, byte [esp + 0x80]
push edi
lea ecx, [esp + 0x28]
mov byte [esp + 0x28], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x446fe0
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x28]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x409dbb
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov edx, ecx
mov esi, 0x446fe0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x50]
push eax
mov dword [esp + 0x78], 0
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::runtime_error::constructor_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [esp + 0x50]
push 0x43bf68
push ecx
mov dword [esp + 0x58], vtable.LogicalError.0
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [edi + 4]
push edx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
xor esi, esi
mov dword [esp + 0x80], eax
test eax, eax
jbe 0x409e52
mov ebx, dword [esp + 0x84]
mov ebp, dword [esp + 0x7c]
mov eax, dword [edi + 4]
push esi
push eax
call dword [sym.imp.USER32.dll_GetMenuItemID]
cmp ebp, eax
je 0x409e69
cmp eax, 0xffffffff
jne 0x409e46
mov ecx, dword [edi + 4]
push esi
push ecx
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call sub.MFC42.DLL_CMenu::FromHandle
xor ecx, ecx
cmp eax, ecx
je 0x409e6f
mov ecx, dword [esp + 0x10]
push ebx
push eax
push ebp
call fcn.00409d30
test eax, eax
jne 0x409e54
mov eax, dword [esp + 0x80]
inc esi
cmp esi, eax
jb 0x409e0b
xor eax, eax
mov ecx, dword [esp + 0x6c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x68
ret 0xc
mov dword [ebx], esi
mov eax, edi
jmp 0x409e54
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov edi, 0x446fe0
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov dl, byte [esp + 0x80]
mov ebx, 1
not ecx
dec ecx
push ebx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
mov byte [esp + 0x1c], dl
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x409ed0
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov eax, ecx
mov esi, 0x446fe0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
lea ecx, [esp + 0x80]
mov dword [esp + 0x74], ebx
push ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x84], 0x446fe0
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
mov dl, byte [esp + 0x14]
push 0
lea ecx, [esp + 0x44]
mov byte [esp + 0x78], 2
mov byte [esp + 0x44], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea edx, [esp + 0x14]
mov ecx, dword [eax]
push ecx
push 0
push edx
lea ecx, [esp + 0x4c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
lea eax, [esp + 0x34]
push 0x43bd40
push eax
mov byte [esp + 0x7c], bl
mov dword [esp + 0x3c], vtable.SystemError.0
call sub.MSVCRT.dll__CxxThrowException
nop
nop
push esi
mov esi, ecx
call fcn.00409f60
test byte [esp + 8], 1
je 0x409f58
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, esi
pop esi
ret 4