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

Disassembly:
push 0xffffffffffffffff
push 0x412ec2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa4
push edi
mov edi, ecx
lea ecx, [esp + 0x10]
call fcn.0040d1c0
lea ecx, [esp + 0x30]
mov dword [esp + 0xb0], 0
call fcn.0040d260
mov eax, dword [esp + 0xb8]
mov byte [esp + 0xb0], 1
cmp byte [eax], 0
jne 0x40962d
mov ecx, dword [esp + 0xbc]
cmp byte [ecx], 0
jne 0x40962d
mov edx, dword [esp + 0xc0]
cmp byte [edx], 0
jne 0x40962d
mov ecx, dword [esp + 0xc8]
mov edx, dword [esp + 0xcc]
lea eax, [edi + 0xb8]
mov byte [esp + 0xb0], 0
mov dword [eax], ecx
mov ecx, dword [esp + 0xd0]
mov dword [eax + 4], edx
mov edx, dword [esp + 0xd4]
mov dword [eax + 8], ecx
lea ecx, [esp + 0x30]
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0xc4]
mov dword [edi + 0xc8], eax
call fcn.0040d310
lea ecx, [esp + 0x10]
mov dword [esp + 0xb0], 0xffffffff
call fcn.0040d200
xor eax, eax
jmp 0x4098c1
mov ecx, dword [edi + 0x20]
push ebx
push ebp
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push esi
push 0
push 0
push 0x110a
push ecx
call ebp
mov edx, dword [edi + 0x20]
push eax
push 4
push 0x110a
push edx
call ebp
mov esi, eax
test esi, esi
je 0x409743
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0xc4]
lea ecx, [esp + 0x18]
push eax
mov byte [esp + 0xc0], 2
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [edi + 0x20]
lea ecx, [esp + 0x8c]
push ecx
push 0
push 0x110c
push edx
mov byte [esp + 0xcc], 3
mov dword [esp + 0xa0], esi
mov dword [esp + 0x9c], 0x10
call ebp
mov eax, dword [esp + 0xb0]
test eax, eax
mov ebx, eax
je 0x4096d1
mov ecx, dword [esp + 0x18]
mov eax, dword [eax + 8]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x40970d
mov edx, dword [edi + 0x20]
push esi
push 1
push 0x110a
push edx
call ebp
lea ecx, [esp + 0x18]
mov esi, eax
mov byte [esp + 0xbc], 2
call fcn.00411236
lea ecx, [esp + 0x10]
mov byte [esp + 0xbc], 1
call fcn.00411236
test esi, esi
jne 0x40965d
jmp 0x409743
mov eax, dword [esp + 0x1c]
push ebx
lea ecx, [esp + 0x20]
call dword [eax + 0x1c]
lea ecx, [esp + 0x18]
mov byte [esp + 0xbc], 2
call fcn.00411236
lea ecx, [esp + 0x10]
mov byte [esp + 0xbc], 1
call fcn.00411236
test esi, esi
jne 0x40980f
mov ecx, dword [esp + 0xc4]
push ecx
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::operator_1
mov edx, dword [edi]
lea eax, [esp + 0x1c]
push 0
push eax
mov ecx, edi
mov dword [esp + 0x40], 1
call dword [edx + 0xc0]
call sub.MFC42.DLL_AfxGetThread
test eax, eax
je 0x40977f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
jmp 0x409781
xor eax, eax
mov eax, dword [eax + 0x20]
push eax
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call sub.MFC42.DLL_CMenu::FromHandle
mov esi, eax
test esi, esi
je 0x40980f
mov ecx, dword [esi + 4]
push ecx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov ebp, 0x4167a4
mov ebx, eax
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], 0
mov byte [esp + 0xbc], 4
call dword [sym.imp.USER32.dll_CreateMenu]
push eax
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CMenu::Attach
mov edx, dword [esp + 0xc4]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 4]
push edx
push eax
dec ebx
push 0x410
push ebx
push ecx
call dword [sym.imp.USER32.dll_InsertMenuA]
mov dword [esp + 0x10], ebp
lea ecx, [esp + 0x10]
mov byte [esp + 0xbc], 5
call sub.MFC42.DLL_CMenu::DestroyMenu
mov byte [esp + 0xbc], 1
mov dword [esp + 0x10], 0x4149e4
mov edx, dword [esp + 0xc8]
lea ecx, [esp + 0x44]
push edx
call sub.MFC42.DLL_CString::operator_1
mov eax, dword [esp + 0xcc]
lea ecx, [esp + 0x68]
push eax
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [esp + 0xd0]
mov eax, dword [esp + 0xd4]
mov edx, dword [esp + 0xe4]
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0xd8]
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0xe0]
mov dword [esp + 0x78], ecx
mov ecx, dword [esp + 0xe8]
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0xdc]
mov dword [esp + 0x80], eax
mov dword [esp + 0x70], ecx
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x7c], edx
mov edx, dword [edi]
push eax
push ecx
mov ecx, edi
call dword [edx + 0xc4]
lea ecx, [esp + 0x3c]
mov esi, eax
mov byte [esp + 0xbc], 0
call fcn.0040d310
lea ecx, [esp + 0x1c]
mov dword [esp + 0xbc], 0xffffffff
call fcn.0040d200
mov eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa8]
pop edi
mov dword fs:[0], ecx
add esp, 0xb0
ret 0x28